#include <cpu_operations.h>
|
| static Matrix< T > | Transpose (const Matrix< T > &a) |
| |
| static Vector< T > | Transpose (const Vector< T > &a) |
| |
| static Matrix< T > | Multiply (const Matrix< T > &a, const T &scalar) |
| |
| static Matrix< T > | Multiply (const Matrix< T > &a, const Matrix< T > &b) |
| |
| static Matrix< T > | Add (const Matrix< T > &a, const T &scalar) |
| |
| static Matrix< T > | Add (const Matrix< T > &a, const Matrix< T > &b) |
| |
| static Matrix< T > | Subtract (const Matrix< T > &a, const T &scalar) |
| |
| static Matrix< T > | Subtract (const Matrix< T > &a, const Matrix< T > &b) |
| |
| static Matrix< bool > | LogicalOr (const Matrix< bool > &a, const Matrix< bool > &b) |
| |
| static Matrix< bool > | LogicalNot (const Matrix< bool > &a) |
| |
| static Matrix< bool > | LogicalAnd (const Matrix< bool > &a, const Matrix< bool > &b) |
| |
| static Matrix< T > | Inverse (const Matrix< T > &a) |
| |
| static Vector< T > | Norm (const Matrix< T > &a, const int &p=2, const int &axis=0) |
| |
| static T | Determinant (const Matrix< T > &a) |
| |
| static int | Rank (const Matrix< T > &a) |
| |
| static T | FrobeniusNorm (const Matrix< T > &a) |
| |
| static T | Trace (const Matrix< T > &a) |
| |
| static T | DotProduct (const Vector< T > &a, const Vector< T > &b) |
| |
| static Matrix< T > | OuterProduct (const Vector< T > &a, const Vector< T > &b) |
| |
| static Vector< bool > | LogicalAnd (const Vector< T > &a, const Vector< T > &b) |
| |
| static Vector< bool > | LogicalOr (const Vector< bool > &a, const Vector< bool > &b) |
| |
| static Vector< bool > | LogicalNot (const Vector< bool > &a) |
| |
| static Matrix< T > | Normalize (const Matrix< T > &a, const int &p=2, const int &axis=0) |
| |
| static Matrix< T > | GenKernelMatrix (const Matrix< T > &data_matrix, const KernelType kernel_type=kGaussianKernel, const float constant=1.0) |
| |
| static void | GenDegreeMatrix (const Matrix< T > &kernel_matrix, Matrix< T > °ree_matrix, Matrix< T > °ree_matrix_to_the_minus_half) |
| |
This is a function that adds each element in the matrix to a scalar and returns the resulting matrix.
- Parameters
-
| a | Input Matrix |
| scalar | Input Scalar |
- Returns
- This function returns a matrix that is the resulatant of adding the input matrix and scalar.
- See also
- Add(const Matrix<T> &a, const Matrix<T> &b)
This is a function that adds two matricies and returns the resulting matrix.
- Parameters
-
| a | Input Matrix 1 |
| b | Input Matrix 2 |
- Returns
- This function returns a matrix that is the resulatant of adding two input matricies.
- See also
- Add(const Matrix<T> &a, const T &scalar)
This is a function that calculates the dot product of two vectors.
- Parameters
-
| a | Input Vector 1 |
| b | Input Vector 2 |
- Returns
- This function returns a value of type T which is the dot product of the two vectors.
This is a function that returns the frobenius norm of Matrix a
- Parameters
-
- Returns
- This function returns a value of type T
Generates a degree matrix D from an input kernel matrix It also generates D^(-1/2)
- Parameters
-
| kernel_matrix | Input matrix: a squared kernel matrix |
| degree_matrix | Output degree matrix D |
| degree_matrix_to_the_minus_half | Output matrix D^(-1/2) |
Generates a kernel matrix from an input data_matrix
- Parameters
-
| data_matrix | Input matrix whose rows represent samples and columns represent features |
| kernel_type | Kernel type could be chosen from Gaussian, Linear and Polynomial |
| constant | In Gaussian kernel, this is sigma; In Polynomial kernel, this is constant c In Linear kernel, this is c as well |
- Returns
- An nxn kernel matrix where n is the number of samples in data_matrix
This is a function that returns the inverse of a matrix.
- Parameters
-
- Returns
- This function returns a matrix that is the inverse of the input matrix.
This is a function that calculates the "logical and" of the two input Matrices
- Parameters
-
| a | Input Matrix 1 |
| b | Input Matrix 2 |
- Returns
- This function returns a Matrix of type bool
This is a function that calculates the "logical and" of the two input Vectors
- Parameters
-
| a | Input Vector 1 |
| b | Input Vector 2 |
- Returns
- This function returns a Vector of type bool
This is a funtion that returns the "logical not" of the input Matrix
- Parameters
-
- Returns
- This funtion returns a Matrix of type bool
This is a funtion that returns the "logical not" of the input Vector
- Parameters
-
- Returns
- This funtion returns a Vector of type bool
This is a function that calculates the "logical or" of the two input Matrices
- Parameters
-
| a | Input Matrix 1 |
| b | Input Matrix 2 |
- Returns
- This function returns a Matrix of type bool
This is a function that calculates the "logical or" of the two input Vectors
- Parameters
-
| a | Input Vector 1 |
| b | Input Vector 2 |
- Returns
- This function returns a Vector of type bool
This is a function that calculates the product Matrix of the input Matrix and a scalar
- Parameters
-
| a | Input Matrix |
| scalar | Input scalar |
- Returns
- This function returns a Matrix of type T
This is a funtion that calculates the product Matrix of the two input Matrices
- Parameters
-
| a | Input Matrix 1 |
| b | Input Matrix 2 |
- Returns
- This function returns a Matrix of type T
static Vector <T> Norm( const Matrix <T> &a, const int &p = 2, const int &axis = 0) calculates the norm of the values in an m x n dependent of the input p and axis. The norm is returned in the form of a vector. If the axis is 0, the norm will be calulated column wise and the size of the output vector will be dependent on n. If the axis is 1, the norm will be calculated row-wise and the size of the vector will be dependent on m.
- Parameters
-
| a | const Matrix <T> &a |
| b | int &p |
| c | int &axis |
- Returns
- Vector <T>
statix Matrix <T> Normalize(const Matrix <T> &a, const int &p =2, const int &axis = 0) normalizes a m x n matrix by element.
- Parameters
-
| a | const Matrix<T> &a |
| b | const int &p = 2 |
| c | const int &axis = 0 |
- Returns
- Matrix <T>
- See also
- Norm
This is a function that calculates the "Outer Product of the input Vectors
- Parameters
-
| a | Input Vector 1 |
| b | Input Vector 2 |
- Returns
- This function returns a Matrix of type T
static int Rank(const Matrix <T> &a) is a function that returns the rank of a m x n matrix
- Parameters
-
- Returns
- This function returns an int value of the matrix's rank.
This is a function that returns the sum of the diagonal coefficiants of a Matrix
- Parameters
-
- Returns
- This function returns a value of type T
This is a function that calculates the transpose Matrix of the input Matrix
- Parameters
-
- Returns
- This function returns a Matrix of type T
This is a function that calculates the transpose Vector of the input Vector
- Parameters
-
- Returns
- This function returns a Vector of type T
The documentation for this class was generated from the following file: