|
openGPMP
Open Source Mathematics Package
|
Classes | |
| class | DGEMM |
| Class for performing matrix multiplication on double type arrays. More... | |
| class | IGEMM |
| Class for performing matrix multiplication on int type arrays. More... | |
| class | SGEMM |
| Class for performing matrix multiplication on float type arrays. More... | |
| class | Eigen |
| Class for computing eigenvalues of a matrix. More... | |
| class | LinSys |
| Class for solving linear systems and performing matrix operations. More... | |
| class | Mtx |
| Mtx class offers matrix arithmetic operations. Some methods are element-wise while others make use of grouping and unrolling. More... | |
| class | Matrix |
| Matrix and Scalar operations. More... | |
| struct | mtx |
| Matrix struct. More... | |
| class | SVD |
| class | Tensor |
| Represents a 3D tensor with basic operations. More... | |
Functions | |
| template<typename T > | |
| void | vector_add_i8 (const T *data1, const T *data2, T *result_data, size_t size) |
| Performs vector addition for signed 8-bit integers. More... | |
| template<typename T > | |
| void | vector_add_i16 (const T *data1, const T *data2, T *result_data, size_t size) |
| Performs vector addition for signed 16-bit integers. More... | |
| template<typename T > | |
| void | vector_add_i32 (const T *data1, const T *data2, T *result_data, size_t size) |
| Performs vector addition for signed 32-bit integers. More... | |
| template<typename T > | |
| void | vector_add_i64 (const T *data1, const T *data2, T *result_data, size_t size) |
| Performs vector addition for signed 64-bit integers. More... | |
| void | vector_add (const std::vector< int8_t > &vec1, const std::vector< int8_t > &vec2, std::vector< int8_t > &result) |
| Performs vector addition for vectors of signed 8-bit integers. More... | |
| void | vector_add (const std::vector< uint8_t > &vec1, const std::vector< uint8_t > &vec2, std::vector< uint8_t > &result) |
| Performs vector addition for vectors of unsigned 8-bit integers. More... | |
| void | vector_add (const std::vector< int16_t > &vec1, const std::vector< int16_t > &vec2, std::vector< int16_t > &result) |
| Performs vector addition for vectors of signed 16-bit integers. More... | |
| void | vector_add (const std::vector< uint16_t > &vec1, const std::vector< uint16_t > &vec2, std::vector< uint16_t > &result) |
| Performs vector addition for vectors of unsigned 16-bit integers. More... | |
| void | vector_add (const std::vector< int32_t > &vec1, const std::vector< int32_t > &vec2, std::vector< int32_t > &result) |
| Performs vector addition for vectors of signed 32-bit integers. More... | |
| void | vector_add (const std::vector< uint32_t > &vec1, const std::vector< uint32_t > &vec2, std::vector< uint32_t > &result) |
| Performs vector addition for vectors of unsigned 32-bit integers. More... | |
| void | vector_add (const std::vector< int64_t > &vec1, const std::vector< int64_t > &vec2, std::vector< int64_t > &result) |
| Performs vector addition for vectors of signed 64-bit integers. More... | |
| void | vector_add (const std::vector< uint64_t > &vec1, const std::vector< uint64_t > &vec2, std::vector< uint64_t > &result) |
| Performs vector addition for vectors of unsigned 64-bit integers. More... | |
| template<typename T > | |
| void | vector_sub_i8 (const T *data1, const T *data2, T *result_data, size_t size) |
| Performs vector subtraction for signed 8-bit integers. More... | |
| template<typename T > | |
| void | vector_sub_i16 (const T *data1, const T *data2, T *result_data, size_t size) |
| Performs vector subtraction for signed 16-bit integers. More... | |
| template<typename T > | |
| void | vector_sub_i32 (const T *data1, const T *data2, T *result_data, size_t size) |
| Performs vector subtraction for signed 32-bit integers. More... | |
| template<typename T > | |
| void | vector_sub_i64 (const T *data1, const T *data2, T *result_data, size_t size) |
| Performs vector subtraction for signed 64-bit integers. More... | |
| void | vector_sub (const std::vector< int8_t > &vec1, const std::vector< int8_t > &vec2, std::vector< int8_t > &result) |
| Performs vector subtraction for vectors of signed 8-bit integers. More... | |
| void | vector_sub (const std::vector< uint8_t > &vec1, const std::vector< uint8_t > &vec2, std::vector< uint8_t > &result) |
| Performs vector subtraction for vectors of unsigned 8-bit integers. More... | |
| void | vector_sub (const std::vector< int16_t > &vec1, const std::vector< int16_t > &vec2, std::vector< int16_t > &result) |
| Performs vector subtraction for vectors of signed 16-bit integers. More... | |
| void | vector_sub (const std::vector< uint16_t > &vec1, const std::vector< uint16_t > &vec2, std::vector< uint16_t > &result) |
| Performs vector subtraction for vectors of unsigned 16-bit integers. More... | |
| void | vector_sub (const std::vector< int32_t > &vec1, const std::vector< int32_t > &vec2, std::vector< int32_t > &result) |
| Performs vector subtraction for vectors of signed 32-bit integers. More... | |
| void | vector_sub (const std::vector< uint32_t > &vec1, const std::vector< uint32_t > &vec2, std::vector< uint32_t > &result) |
| Performs vector subtraction for vectors of unsigned 32-bit integers. More... | |
| void | vector_sub (const std::vector< int64_t > &vec1, const std::vector< int64_t > &vec2, std::vector< int64_t > &result) |
| Performs vector subtraction for vectors of signed 64-bit integers. More... | |
| void | vector_sub (const std::vector< uint64_t > &vec1, const std::vector< uint64_t > &vec2, std::vector< uint64_t > &result) |
| Performs vector subtraction for vectors of unsigned 64-bit integers. More... | |
| template<typename T > | |
| void | scalar_mult_i8 (const T *data, int scalar, T *result_data, size_t size) |
| Performs scalar multiplication for signed 8-bit integers. More... | |
| template<typename T > | |
| void | scalar_mult_i16 (const T *data, int scalar, T *result_data, size_t size) |
| Performs scalar multiplication for signed 16-bit integers. More... | |
| template<typename T > | |
| void | scalar_mult_i32 (const T *data, int scalar, T *result_data, size_t size) |
| Performs scalar multiplication for signed 32-bit integers. More... | |
| template<typename T > | |
| void | scalar_mult_i64 (const T *data, int scalar, T *result_data, size_t size) |
| Performs scalar multiplication for signed 64-bit integers. More... | |
| void | scalar_mult (const std::vector< int8_t > &vec1, int scalar, std::vector< int8_t > &result) |
| Performs scalar multiplication for vectors of signed 8-bit integers. More... | |
| void | scalar_mult (const std::vector< uint8_t > &vec1, int scalar, std::vector< uint8_t > &result) |
| Performs scalar multiplication for vectors of unsigned 8-bit integers. More... | |
| void | scalar_mult (const std::vector< int16_t > &vec1, int scalar, std::vector< int16_t > &result) |
| Performs scalar multiplication for vectors of signed 16-bit integers. More... | |
| void | scalar_mult (const std::vector< uint16_t > &vec1, int scalar, std::vector< uint16_t > &result) |
| Performs scalar multiplication for vectors of unsigned 16-bit integers. More... | |
| void | scalar_mult (const std::vector< int32_t > &vec1, int scalar, std::vector< int32_t > &result) |
| Performs scalar multiplication for vectors of signed 32-bit integers. More... | |
| void | scalar_mult (const std::vector< uint32_t > &vec1, int scalar, std::vector< uint32_t > &result) |
| Performs scalar multiplication for vectors of unsigned 32-bit integers. More... | |
| void | scalar_mult (const std::vector< int64_t > &vec1, int scalar, std::vector< int64_t > &result) |
| Performs scalar multiplication for vectors of signed 64-bit integers. More... | |
| void | scalar_mult (const std::vector< uint64_t > &vec1, int scalar, std::vector< uint64_t > &result) |
| Performs scalar multiplication for vectors of unsigned 64-bit integers. More... | |
| template<typename T > | |
| T | dot_product_i8 (const T *vec1, const T *vec2, size_t size) |
| Computes the dot product for signed 8-bit integer vectors. More... | |
| template<typename T > | |
| T | dot_product_i16 (const T *vec1, const T *vec2, size_t size) |
| Computes the dot product for signed 16-bit integer vectors. More... | |
| template<typename T > | |
| T | dot_product_i32 (const T *vec1, const T *vec2, size_t size) |
| Computes the dot product for signed 32-bit integer vectors. More... | |
| template<typename T > | |
| T | dot_product_i64 (const T *vec1, const T *vec2, size_t size) |
| Computes the dot product for signed 64-bit integer vectors. More... | |
| int | dot_product (const std::vector< int8_t > &vec1, const std::vector< int8_t > &vec2) |
| Computes the dot product for vectors of signed 8-bit integers. More... | |
| int | dot_product (const std::vector< uint8_t > &vec1, const std::vector< uint8_t > &vec2) |
| Computes the dot product for vectors of unsigned 8-bit integers. More... | |
| int | dot_product (const std::vector< int16_t > &vec1, const std::vector< int16_t > &vec2) |
| Computes the dot product for vectors of signed 16-bit integers. More... | |
| int | dot_product (const std::vector< uint16_t > &vec1, const std::vector< uint16_t > &vec2) |
| Computes the dot product for vectors of unsigned 16-bit integers. More... | |
| int | dot_product (const std::vector< int32_t > &vec1, const std::vector< int32_t > &vec2) |
| Computes the dot product for vectors of signed 32-bit integers. More... | |
| int | dot_product (const std::vector< uint32_t > &vec1, const std::vector< uint32_t > &vec2) |
| Computes the dot product for vectors of unsigned 32-bit integers. More... | |
| int | dot_product (const std::vector< int64_t > &vec1, const std::vector< int64_t > &vec2) |
| Computes the dot product for vectors of signed 64-bit integers. More... | |
| int | dot_product (const std::vector< uint64_t > &vec1, const std::vector< uint64_t > &vec2) |
| Computes the dot product for vectors of unsigned 64-bit integers. More... | |
| void | vector_add (const std::vector< double > &vec1, const std::vector< double > &vec2, std::vector< double > &result) |
| Performs vector addition for double vectors. More... | |
| void | vector_sub (const std::vector< double > &vec1, const std::vector< double > &vec2, std::vector< double > &result) |
| Performs vector subtraction for double vectors. More... | |
| void | scalar_mult (const std::vector< double > &vec, double scalar, std::vector< double > &result) |
| Performs scalar multiplication for double vectors. More... | |
| double | dot_product (const std::vector< double > &vec1, const std::vector< double > &vec2) |
| Computes the dot product of two double vectors. More... | |
| template<typename T > | |
| void | std_vector_add (const std::vector< T > &vec1, const std::vector< T > &vec2, std::vector< T > &result) |
| Add two vectors element-wise. More... | |
| template<typename T > | |
| void | std_vector_sub (const std::vector< T > &vec1, const std::vector< T > &vec2, std::vector< T > &result) |
| Subtract one vector from another element-wise. More... | |
| template<typename T > | |
| void | std_scalar_mult (const std::vector< T > &vec, int scalar, std::vector< T > &result) |
| Multiply each element of a vector by a scalar. More... | |
| template<typename T > | |
| T | std_dot_product (const std::vector< T > &vec1, const std::vector< T > &vec2) |
| Compute the dot product of two vectors. More... | |
| void | std_cross_product (const std::vector< double > &vec1, const std::vector< double > &vec2, std::vector< double > &result) |
| Compute the cross product of two 3D vectors. More... | |
| double | std_vector_norm (const std::vector< double > &vec) |
| Compute the Euclidean norm (magnitude) of a vector. More... | |
| void | std_vector_normalize (const std::vector< double > &vec, std::vector< double > &result) |
| Normalize a vector to have unit length. More... | |
| void | std_vector_projection (const std::vector< double > &vec, const std::vector< double > &onto_vec, std::vector< double > &result) |
| Compute the projection of one vector onto another. More... | |
| void | std_cross_product (const std::vector< int > &vec1, const std::vector< int > &vec2, std::vector< int > &result) |
| Compute the cross product of two 3D vectors of integers. More... | |
| double | std_vector_norm (const std::vector< int > &vec) |
| Compute the Euclidean norm (magnitude) of a vector of integers. More... | |
| void | std_vector_normalize (const std::vector< int > &vec, std::vector< double > &result) |
| Normalize a vector of integers to have unit length. More... | |
| void | std_vector_projection (const std::vector< int > &vec, const std::vector< int > &onto_vec, std::vector< double > &result) |
| Compute the projection of one vector of integers onto another. More... | |
| double gpmp::linalg::dot_product | ( | const std::vector< double > & | vec1, |
| const std::vector< double > & | vec2 | ||
| ) |
Computes the dot product of two double vectors.
This function computes the dot product of two double vectors
| vec1 | The first input vector |
| vec2 | The second input vector |
| int gpmp::linalg::dot_product | ( | const std::vector< int16_t > & | vec1, |
| const std::vector< int16_t > & | vec2 | ||
| ) |
Computes the dot product for vectors of signed 16-bit integers.
| vec1 | First input vector |
| vec2 | Second input vector |
| int gpmp::linalg::dot_product | ( | const std::vector< int32_t > & | vec1, |
| const std::vector< int32_t > & | vec2 | ||
| ) |
Computes the dot product for vectors of signed 32-bit integers.
| vec1 | First input vector |
| vec2 | Second input vector |
| int gpmp::linalg::dot_product | ( | const std::vector< int64_t > & | vec1, |
| const std::vector< int64_t > & | vec2 | ||
| ) |
Computes the dot product for vectors of signed 64-bit integers.
| vec1 | First input vector |
| vec2 | Second input vector |
| int gpmp::linalg::dot_product | ( | const std::vector< int8_t > & | vec1, |
| const std::vector< int8_t > & | vec2 | ||
| ) |
Computes the dot product for vectors of signed 8-bit integers.
| vec1 | First input vector |
| vec2 | Second input vector |
Referenced by gpmp::ml::SVC::kernel(), gpmp::optim::QuasiNewton::line_search(), and gpmp::optim::QuasiNewton::update_hessian_inverse().
| int gpmp::linalg::dot_product | ( | const std::vector< uint16_t > & | vec1, |
| const std::vector< uint16_t > & | vec2 | ||
| ) |
Computes the dot product for vectors of unsigned 16-bit integers.
| vec1 | First input vector |
| vec2 | Second input vector |
| int gpmp::linalg::dot_product | ( | const std::vector< uint32_t > & | vec1, |
| const std::vector< uint32_t > & | vec2 | ||
| ) |
Computes the dot product for vectors of unsigned 32-bit integers.
| vec1 | First input vector |
| vec2 | Second input vector |
| int gpmp::linalg::dot_product | ( | const std::vector< uint64_t > & | vec1, |
| const std::vector< uint64_t > & | vec2 | ||
| ) |
Computes the dot product for vectors of unsigned 64-bit integers.
| vec1 | First input vector |
| vec2 | Second input vector |
| int gpmp::linalg::dot_product | ( | const std::vector< uint8_t > & | vec1, |
| const std::vector< uint8_t > & | vec2 | ||
| ) |
Computes the dot product for vectors of unsigned 8-bit integers.
| vec1 | First input vector |
| vec2 | Second input vector |
| T gpmp::linalg::dot_product_i16 | ( | const T * | vec1, |
| const T * | vec2, | ||
| size_t | size | ||
| ) |
Computes the dot product for signed 16-bit integer vectors.
| T | The type of the data (int8_t, uint8_t, etc ) |
| vec1 | Pointer to the first input vector |
| vec2 | Pointer to the second input vector |
| size | Size of the input vectors |
| T gpmp::linalg::dot_product_i32 | ( | const T * | vec1, |
| const T * | vec2, | ||
| size_t | size | ||
| ) |
Computes the dot product for signed 32-bit integer vectors.
| T | The type of the data (int8_t, uint8_t, etc ) |
| vec1 | Pointer to the first input vector |
| vec2 | Pointer to the second input vector |
| size | Size of the input vectors |
| T gpmp::linalg::dot_product_i64 | ( | const T * | vec1, |
| const T * | vec2, | ||
| size_t | size | ||
| ) |
Computes the dot product for signed 64-bit integer vectors.
| T | The type of the data (int8_t, uint8_t, etc ) |
| vec1 | Pointer to the first input vector |
| vec2 | Pointer to the second input vector |
| size | Size of the input vectors |
| T gpmp::linalg::dot_product_i8 | ( | const T * | vec1, |
| const T * | vec2, | ||
| size_t | size | ||
| ) |
Computes the dot product for signed 8-bit integer vectors.
| T | The type of the data (int8_t, uint8_t, etc ) |
| vec1 | Pointer to the first input vector |
| vec2 | Pointer to the second input vector |
| size | Size of the input vectors |
| void gpmp::linalg::scalar_mult | ( | const std::vector< double > & | vec, |
| double | scalar, | ||
| std::vector< double > & | result | ||
| ) |
Performs scalar multiplication for double vectors.
This function multiplies each element of a double vector by a scalar value and stores the result in the provided result vector
| vec | The input vector |
| scalar | The scalar value to multiply each element by |
| result | The vector where the result of the multiplication will be stored |
| void gpmp::linalg::scalar_mult | ( | const std::vector< int16_t > & | vec1, |
| int | scalar, | ||
| std::vector< int16_t > & | result | ||
| ) |
Performs scalar multiplication for vectors of signed 16-bit integers.
| vec1 | Input vector |
| scalar | Scalar value to multiply each element by |
| result | Output vector containing the result of the multiplication |
| void gpmp::linalg::scalar_mult | ( | const std::vector< int32_t > & | vec1, |
| int | scalar, | ||
| std::vector< int32_t > & | result | ||
| ) |
Performs scalar multiplication for vectors of signed 32-bit integers.
| vec1 | Input vector |
| scalar | Scalar value to multiply each element by |
| result | Output vector containing the result of the multiplication |
| void gpmp::linalg::scalar_mult | ( | const std::vector< int64_t > & | vec1, |
| int | scalar, | ||
| std::vector< int64_t > & | result | ||
| ) |
Performs scalar multiplication for vectors of signed 64-bit integers.
| vec1 | Input vector |
| scalar | Scalar value to multiply each element by |
| result | Output vector containing the result of the multiplication |
| void gpmp::linalg::scalar_mult | ( | const std::vector< int8_t > & | vec1, |
| int | scalar, | ||
| std::vector< int8_t > & | result | ||
| ) |
Performs scalar multiplication for vectors of signed 8-bit integers.
| vec1 | Input vector |
| scalar | Scalar value to multiply each element by |
| result | Output vector containing the result of the multiplication |
| void gpmp::linalg::scalar_mult | ( | const std::vector< uint16_t > & | vec1, |
| int | scalar, | ||
| std::vector< uint16_t > & | result | ||
| ) |
Performs scalar multiplication for vectors of unsigned 16-bit integers.
| vec1 | Input vector |
| scalar | Scalar value to multiply each element by |
| result | Output vector containing the result of the multiplication |
| void gpmp::linalg::scalar_mult | ( | const std::vector< uint32_t > & | vec1, |
| int | scalar, | ||
| std::vector< uint32_t > & | result | ||
| ) |
Performs scalar multiplication for vectors of unsigned 32-bit integers.
| vec1 | Input vector |
| scalar | Scalar value to multiply each element by |
| result | Output vector containing the result of the multiplication |
| void gpmp::linalg::scalar_mult | ( | const std::vector< uint64_t > & | vec1, |
| int | scalar, | ||
| std::vector< uint64_t > & | result | ||
| ) |
Performs scalar multiplication for vectors of unsigned 64-bit integers.
| vec1 | Input vector |
| scalar | Scalar value to multiply each element by |
| result | Output vector containing the result of the multiplication |
| void gpmp::linalg::scalar_mult | ( | const std::vector< uint8_t > & | vec1, |
| int | scalar, | ||
| std::vector< uint8_t > & | result | ||
| ) |
Performs scalar multiplication for vectors of unsigned 8-bit integers.
| vec1 | Input vector |
| scalar | Scalar value to multiply each element by |
| result | Output vector containing the result of the multiplication |
| void gpmp::linalg::scalar_mult_i16 | ( | const T * | data, |
| int | scalar, | ||
| T * | result_data, | ||
| size_t | size | ||
| ) |
Performs scalar multiplication for signed 16-bit integers.
| T | The type of the data (int8_t, uint8_t, etc ) |
| data | Pointer to the input data array |
| scalar | Scalar value to multiply each element by |
| result_data | Pointer to the output data array |
| size | Size of the input and output arrays |
| void gpmp::linalg::scalar_mult_i32 | ( | const T * | data, |
| int | scalar, | ||
| T * | result_data, | ||
| size_t | size | ||
| ) |
Performs scalar multiplication for signed 32-bit integers.
| T | The type of the data (int8_t, uint8_t, etc ) |
| data | Pointer to the input data array |
| scalar | Scalar value to multiply each element by |
| result_data | Pointer to the output data array |
| size | Size of the input and output arrays |
| void gpmp::linalg::scalar_mult_i64 | ( | const T * | data, |
| int | scalar, | ||
| T * | result_data, | ||
| size_t | size | ||
| ) |
Performs scalar multiplication for signed 64-bit integers.
| T | The type of the data (int8_t, uint8_t, etc ) |
| data | Pointer to the input data array |
| scalar | Scalar value to multiply each element by |
| result_data | Pointer to the output data array |
| size | Size of the input and output arrays |
| void gpmp::linalg::scalar_mult_i8 | ( | const T * | data, |
| int | scalar, | ||
| T * | result_data, | ||
| size_t | size | ||
| ) |
Performs scalar multiplication for signed 8-bit integers.
| T | The type of the data (int8_t, uint8_t, etc ) |
| data | Pointer to the input data array |
| scalar | Scalar value to multiply each element by |
| result_data | Pointer to the output data array |
| size | Size of the input and output arrays |
| void gpmp::linalg::std_cross_product | ( | const std::vector< double > & | vec1, |
| const std::vector< double > & | vec2, | ||
| std::vector< double > & | result | ||
| ) |
Compute the cross product of two 3D vectors.
This function computes the cross product of two 3D vectors and stores the result in the output vector
| vec1 | The first vector |
| vec2 | The second vector |
| result | The output vector where the result will be stored |
Definition at line 48 of file vector_naive.cpp.
| void gpmp::linalg::std_cross_product | ( | const std::vector< int > & | vec1, |
| const std::vector< int > & | vec2, | ||
| std::vector< int > & | result | ||
| ) |
Compute the cross product of two 3D vectors of integers.
This function computes the cross product of two 3D vectors of integers and stores the result in the output vector
| vec1 | The first vector of integers |
| vec2 | The second vector of integers |
| result | The output vector where the result will be stored |
Definition at line 88 of file vector_naive.cpp.
| T gpmp::linalg::std_dot_product | ( | const std::vector< T > & | vec1, |
| const std::vector< T > & | vec2 | ||
| ) |
Compute the dot product of two vectors.
This function computes the dot product of two vectors
| vec1 | The first vector |
| vec2 | The second vector |
Definition at line 681 of file vector.hpp.
Referenced by std_vector_projection().
| void gpmp::linalg::std_scalar_mult | ( | const std::vector< T > & | vec, |
| int | scalar, | ||
| std::vector< T > & | result | ||
| ) |
Multiply each element of a vector by a scalar.
This function multiplies each element of a vector by a scalar value and stores the result in the output vector
| vec | The input vector |
| scalar | The scalar value to multiply with |
| result | The output vector where the result will be stored |
Definition at line 662 of file vector.hpp.
| void gpmp::linalg::std_vector_add | ( | const std::vector< T > & | vec1, |
| const std::vector< T > & | vec2, | ||
| std::vector< T > & | result | ||
| ) |
Add two vectors element-wise.
This function calculates the element-wise addition of two vectors and stores the result in the output vector
| vec1 | The first vector |
| vec2 | The second vector |
| result | The output vector where the result will be stored |
Definition at line 622 of file vector.hpp.
| double gpmp::linalg::std_vector_norm | ( | const std::vector< double > & | vec | ) |
Compute the Euclidean norm (magnitude) of a vector.
This function computes the Euclidean norm (magnitude) of a vector
| vec | The input vector |
Definition at line 56 of file vector_naive.cpp.
Referenced by std_vector_normalize().
| double gpmp::linalg::std_vector_norm | ( | const std::vector< int > & | vec | ) |
Compute the Euclidean norm (magnitude) of a vector of integers.
This function computes the Euclidean norm (magnitude) of a vector of integers
| vec | The input vector of integers |
Definition at line 97 of file vector_naive.cpp.
| void gpmp::linalg::std_vector_normalize | ( | const std::vector< double > & | vec, |
| std::vector< double > & | result | ||
| ) |
Normalize a vector to have unit length.
This function normalizes a vector to have unit length
| vec | The input vector |
| result | The output vector where the normalized vector will be stored |
Definition at line 65 of file vector_naive.cpp.
References std_vector_norm().
| void gpmp::linalg::std_vector_normalize | ( | const std::vector< int > & | vec, |
| std::vector< double > & | result | ||
| ) |
Normalize a vector of integers to have unit length.
This function normalizes a vector of integers to have unit length
| vec | The input vector of integers |
| result | The output vector where the normalized vector will be stored |
Definition at line 106 of file vector_naive.cpp.
References std_vector_norm().
| void gpmp::linalg::std_vector_projection | ( | const std::vector< double > & | vec, |
| const std::vector< double > & | onto_vec, | ||
| std::vector< double > & | result | ||
| ) |
Compute the projection of one vector onto another.
This function computes the projection of one vector onto another and stores the result in the output vector
| vec | The vector to project |
| onto_vec | The vector onto which to project |
| result | The output vector where the projected vector will be stored |
Definition at line 75 of file vector_naive.cpp.
References std_dot_product().
| void gpmp::linalg::std_vector_projection | ( | const std::vector< int > & | vec, |
| const std::vector< int > & | onto_vec, | ||
| std::vector< double > & | result | ||
| ) |
Compute the projection of one vector of integers onto another.
This function computes the projection of one vector of integers onto another and stores the result in the output vector
| vec | The vector of integers to project |
| onto_vec | The vector of integers onto which to project |
| result | The output vector where the projected vector will be stored |
Definition at line 116 of file vector_naive.cpp.
References std_dot_product().
| void gpmp::linalg::std_vector_sub | ( | const std::vector< T > & | vec1, |
| const std::vector< T > & | vec2, | ||
| std::vector< T > & | result | ||
| ) |
Subtract one vector from another element-wise.
This function calculates the element-wise subtraction of one vector from another and stores the result in the output vector
| vec1 | The vector to subtract from |
| vec2 | The vector to subtract |
| result | The output vector where the result will be stored |
Definition at line 642 of file vector.hpp.
| void gpmp::linalg::vector_add | ( | const std::vector< double > & | vec1, |
| const std::vector< double > & | vec2, | ||
| std::vector< double > & | result | ||
| ) |
Performs vector addition for double vectors.
This function adds corresponding elements of two double vectors and stores the result in the provided result vector
| vec1 | The first input vector |
| vec2 | The second input vector |
| result | The vector where the result of the addition will be stored |
| void gpmp::linalg::vector_add | ( | const std::vector< int16_t > & | vec1, |
| const std::vector< int16_t > & | vec2, | ||
| std::vector< int16_t > & | result | ||
| ) |
Performs vector addition for vectors of signed 16-bit integers.
| vec1 | First input vector |
| vec2 | Second input vector |
| result | Output vector containing the result of the addition |
| void gpmp::linalg::vector_add | ( | const std::vector< int32_t > & | vec1, |
| const std::vector< int32_t > & | vec2, | ||
| std::vector< int32_t > & | result | ||
| ) |
Performs vector addition for vectors of signed 32-bit integers.
| vec1 | First input vector |
| vec2 | Second input vector |
| result | Output vector containing the result of the addition |
| void gpmp::linalg::vector_add | ( | const std::vector< int64_t > & | vec1, |
| const std::vector< int64_t > & | vec2, | ||
| std::vector< int64_t > & | result | ||
| ) |
Performs vector addition for vectors of signed 64-bit integers.
| vec1 | First input vector |
| vec2 | Second input vector |
| result | Output vector containing the result of the addition |
| void gpmp::linalg::vector_add | ( | const std::vector< int8_t > & | vec1, |
| const std::vector< int8_t > & | vec2, | ||
| std::vector< int8_t > & | result | ||
| ) |
Performs vector addition for vectors of signed 8-bit integers.
| vec1 | First input vector |
| vec2 | Second input vector |
| result | Output vector containing the result of the addition |
| void gpmp::linalg::vector_add | ( | const std::vector< uint16_t > & | vec1, |
| const std::vector< uint16_t > & | vec2, | ||
| std::vector< uint16_t > & | result | ||
| ) |
Performs vector addition for vectors of unsigned 16-bit integers.
| vec1 | First input vector |
| vec2 | Second input vector |
| result | Output vector containing the result of the addition |
| void gpmp::linalg::vector_add | ( | const std::vector< uint32_t > & | vec1, |
| const std::vector< uint32_t > & | vec2, | ||
| std::vector< uint32_t > & | result | ||
| ) |
Performs vector addition for vectors of unsigned 32-bit integers.
| vec1 | First input vector |
| vec2 | Second input vector |
| result | Output vector containing the result of the addition |
| void gpmp::linalg::vector_add | ( | const std::vector< uint64_t > & | vec1, |
| const std::vector< uint64_t > & | vec2, | ||
| std::vector< uint64_t > & | result | ||
| ) |
Performs vector addition for vectors of unsigned 64-bit integers.
| vec1 | First input vector |
| vec2 | Second input vector |
| result | Output vector containing the result of the addition |
| void gpmp::linalg::vector_add | ( | const std::vector< uint8_t > & | vec1, |
| const std::vector< uint8_t > & | vec2, | ||
| std::vector< uint8_t > & | result | ||
| ) |
Performs vector addition for vectors of unsigned 8-bit integers.
| vec1 | First input vector |
| vec2 | Second input vector |
| result | Output vector containing the result of the addition |
| void gpmp::linalg::vector_add_i16 | ( | const T * | data1, |
| const T * | data2, | ||
| T * | result_data, | ||
| size_t | size | ||
| ) |
Performs vector addition for signed 16-bit integers.
| T | The type of the data (int8_t, uint8_t, etc ) |
| data1 | Pointer to the first input data array |
| data2 | Pointer to the second input data array |
| result_data | Pointer to the output data array |
| size | Size of the input and output arrays |
| void gpmp::linalg::vector_add_i32 | ( | const T * | data1, |
| const T * | data2, | ||
| T * | result_data, | ||
| size_t | size | ||
| ) |
Performs vector addition for signed 32-bit integers.
| T | The type of the data (int8_t, uint8_t, etc ) |
| data1 | Pointer to the first input data array |
| data2 | Pointer to the second input data array |
| result_data | Pointer to the output data array |
| size | Size of the input and output arrays |
| void gpmp::linalg::vector_add_i64 | ( | const T * | data1, |
| const T * | data2, | ||
| T * | result_data, | ||
| size_t | size | ||
| ) |
Performs vector addition for signed 64-bit integers.
| T | The type of the data (int8_t, uint8_t, etc ) |
| data1 | Pointer to the first input data array |
| data2 | Pointer to the second input data array |
| result_data | Pointer to the output data array |
| size | Size of the input and output arrays |
| void gpmp::linalg::vector_add_i8 | ( | const T * | data1, |
| const T * | data2, | ||
| T * | result_data, | ||
| size_t | size | ||
| ) |
Performs vector addition for signed 8-bit integers.
| T | The type of the data (int8_t, uint8_t, etc ) |
| data1 | Pointer to the first input data array |
| data2 | Pointer to the second input data array |
| result_data | Pointer to the output data array |
| size | Size of the input and output arrays |
| void gpmp::linalg::vector_sub | ( | const std::vector< double > & | vec1, |
| const std::vector< double > & | vec2, | ||
| std::vector< double > & | result | ||
| ) |
Performs vector subtraction for double vectors.
This function subtracts corresponding elements of two double vectors and stores the result in the provided result vector
| vec1 | The first input vector |
| vec2 | The second input vector |
| result | The vector where the result of the subtraction will be stored |
| void gpmp::linalg::vector_sub | ( | const std::vector< int16_t > & | vec1, |
| const std::vector< int16_t > & | vec2, | ||
| std::vector< int16_t > & | result | ||
| ) |
Performs vector subtraction for vectors of signed 16-bit integers.
| vec1 | First input vector |
| vec2 | Second input vector |
| result | Output vector containing the result of the subtraction |
| void gpmp::linalg::vector_sub | ( | const std::vector< int32_t > & | vec1, |
| const std::vector< int32_t > & | vec2, | ||
| std::vector< int32_t > & | result | ||
| ) |
Performs vector subtraction for vectors of signed 32-bit integers.
| vec1 | First input vector |
| vec2 | Second input vector |
| result | Output vector containing the result of the subtraction |
| void gpmp::linalg::vector_sub | ( | const std::vector< int64_t > & | vec1, |
| const std::vector< int64_t > & | vec2, | ||
| std::vector< int64_t > & | result | ||
| ) |
Performs vector subtraction for vectors of signed 64-bit integers.
| vec1 | First input vector |
| vec2 | Second input vector |
| result | Output vector containing the result of the subtraction |
| void gpmp::linalg::vector_sub | ( | const std::vector< int8_t > & | vec1, |
| const std::vector< int8_t > & | vec2, | ||
| std::vector< int8_t > & | result | ||
| ) |
Performs vector subtraction for vectors of signed 8-bit integers.
| vec1 | First input vector |
| vec2 | Second input vector |
| result | Output vector containing the result of the subtraction |
| void gpmp::linalg::vector_sub | ( | const std::vector< uint16_t > & | vec1, |
| const std::vector< uint16_t > & | vec2, | ||
| std::vector< uint16_t > & | result | ||
| ) |
Performs vector subtraction for vectors of unsigned 16-bit integers.
| vec1 | First input vector |
| vec2 | Second input vector |
| result | Output vector containing the result of the subtraction |
| void gpmp::linalg::vector_sub | ( | const std::vector< uint32_t > & | vec1, |
| const std::vector< uint32_t > & | vec2, | ||
| std::vector< uint32_t > & | result | ||
| ) |
Performs vector subtraction for vectors of unsigned 32-bit integers.
| vec1 | First input vector |
| vec2 | Second input vector |
| result | Output vector containing the result of the subtraction |
| void gpmp::linalg::vector_sub | ( | const std::vector< uint64_t > & | vec1, |
| const std::vector< uint64_t > & | vec2, | ||
| std::vector< uint64_t > & | result | ||
| ) |
Performs vector subtraction for vectors of unsigned 64-bit integers.
| vec1 | First input vector |
| vec2 | Second input vector |
| result | Output vector containing the result of the subtraction |
| void gpmp::linalg::vector_sub | ( | const std::vector< uint8_t > & | vec1, |
| const std::vector< uint8_t > & | vec2, | ||
| std::vector< uint8_t > & | result | ||
| ) |
Performs vector subtraction for vectors of unsigned 8-bit integers.
| vec1 | First input vector |
| vec2 | Second input vector |
| result | Output vector containing the result of the subtraction |
| void gpmp::linalg::vector_sub_i16 | ( | const T * | data1, |
| const T * | data2, | ||
| T * | result_data, | ||
| size_t | size | ||
| ) |
Performs vector subtraction for signed 16-bit integers.
| T | The type of the data (int8_t, uint8_t, etc ) |
| data1 | Pointer to the first input data array |
| data2 | Pointer to the second input data array |
| result_data | Pointer to the output data array |
| size | Size of the input and output arrays |
| void gpmp::linalg::vector_sub_i32 | ( | const T * | data1, |
| const T * | data2, | ||
| T * | result_data, | ||
| size_t | size | ||
| ) |
Performs vector subtraction for signed 32-bit integers.
| T | The type of the data (int8_t, uint8_t, etc ) |
| data1 | Pointer to the first input data array |
| data2 | Pointer to the second input data array |
| result_data | Pointer to the output data array |
| size | Size of the input and output arrays |
| void gpmp::linalg::vector_sub_i64 | ( | const T * | data1, |
| const T * | data2, | ||
| T * | result_data, | ||
| size_t | size | ||
| ) |
Performs vector subtraction for signed 64-bit integers.
| T | The type of the data (int8_t, uint8_t, etc ) |
| data1 | Pointer to the first input data array |
| data2 | Pointer to the second input data array |
| result_data | Pointer to the output data array |
| size | Size of the input and output arrays |
| void gpmp::linalg::vector_sub_i8 | ( | const T * | data1, |
| const T * | data2, | ||
| T * | result_data, | ||
| size_t | size | ||
| ) |
Performs vector subtraction for signed 8-bit integers.
| T | The type of the data (int8_t, uint8_t, etc ) |
| data1 | Pointer to the first input data array |
| data2 | Pointer to the second input data array |
| result_data | Pointer to the output data array |
| size | Size of the input and output arrays |