![]() |
PLSSVM - Parallel Least Squares Support Vector Machine
2.0.0
A Least Squares Support Vector Machine implementation using different backends.
|
Defines (arithmetic) functions on std::vector and scalars.
More...
Go to the source code of this file.
Classes | |
| struct | plssvm::operators::transposed< T > |
| Wrapper struct for overloading the dot product operator. More... | |
Namespaces | |
| plssvm | |
| The main namespace containing all public API functions. | |
| plssvm::operators | |
| Namespace containing operator overloads for std::vector and other mathematical functions on vectors. | |
Macros | |
| #define | PLSSVM_GENERATE_ARITHMETIC_OPERATION(Op) |
Generate arithmetic element-wise operations using Op for std::vector (and scalars). More... | |
Functions | |
| template<typename T > | |
| plssvm::operators::transposed (const std::vector< T > &) -> transposed< T > | |
| Deduction guide for the plssvm::operators::transposed struct needed for C++17. | |
| template<typename T > | |
| T | plssvm::operators::operator* (const transposed< T > &lhs, const std::vector< T > &rhs) |
Calculate the dot product ( \(x^T \cdot y\)) between both std::vector. More... | |
| template<typename T > | |
| T | plssvm::operators::dot (const std::vector< T > &lhs, const std::vector< T > &rhs) |
Calculate the dot product ( \(x^T \cdot y\)) between both std::vector. More... | |
| template<typename T > | |
| T | plssvm::operators::sum (const std::vector< T > &vec) |
Accumulate all elements in the std::vector vec. More... | |
| template<typename T > | |
| T | plssvm::operators::squared_euclidean_dist (const std::vector< T > &lhs, const std::vector< T > &rhs) |
| Calculates the squared Euclidean distance of both vectors: \(d^2(x, y) = (x_1 - y_1)^2 + (x_2 - y_2)^2 + \dots + (x_n - y_n)^2\). More... | |
| template<typename T > | |
| constexpr T | plssvm::operators::sign (const T x) |
| Returns +1 if x is positive and -1 if x is negative or 0. More... | |
Defines (arithmetic) functions on std::vector and scalars.
| #define PLSSVM_GENERATE_ARITHMETIC_OPERATION | ( | Op | ) |
Generate arithmetic element-wise operations using Op for std::vector (and scalars).
If available, OpenMP SIMD (#pragma omp simd) is used to speedup the computations.
Given the variables
the following operations for Op are generated (e.g., Op is +):
| [in] | Op | the operator to generate |