mlpack  1.0.12
lin_alg.hpp
Go to the documentation of this file.
1 
14 #ifndef __MLPACK_CORE_MATH_LIN_ALG_HPP
15 #define __MLPACK_CORE_MATH_LIN_ALG_HPP
16 
17 #include <mlpack/prereqs.hpp>
18 
22 namespace mlpack {
23 namespace math {
24 
30 void VectorPower(arma::vec& vec, const double power);
31 
39 void Center(const arma::mat& x, arma::mat& xCentered);
40 
46 void WhitenUsingSVD(const arma::mat& x,
47  arma::mat& xWhitened,
48  arma::mat& whiteningMatrix);
49 
54 void WhitenUsingEig(const arma::mat& x,
55  arma::mat& xWhitened,
56  arma::mat& whiteningMatrix);
57 
61 void RandVector(arma::vec& v);
62 
67 void Orthogonalize(const arma::mat& x, arma::mat& W);
68 
73 void Orthogonalize(arma::mat& x);
74 
82 void RemoveRows(const arma::mat& input,
83  const std::vector<size_t>& rowsToRemove,
84  arma::mat& output);
85 
86 }; // namespace math
87 }; // namespace mlpack
88 
89 #endif // __MLPACK_CORE_MATH_LIN_ALG_HPP
void Orthogonalize(const arma::mat &x, arma::mat &W)
Orthogonalize x and return the result in W, using eigendecomposition.
void VectorPower(arma::vec &vec, const double power)
Auxiliary function to raise vector elements to a specific power.
void RemoveRows(const arma::mat &input, const std::vector< size_t > &rowsToRemove, arma::mat &output)
Remove a certain set of rows in a matrix while copying to a second matrix.
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: load.hpp:23
The core includes that mlpack expects; standard C++ includes and Armadillo.
void WhitenUsingEig(const arma::mat &x, arma::mat &xWhitened, arma::mat &whiteningMatrix)
Whitens a matrix using the eigendecomposition of the covariance matrix.
void WhitenUsingSVD(const arma::mat &x, arma::mat &xWhitened, arma::mat &whiteningMatrix)
Whitens a matrix using the singular value decomposition of the covariance matrix. ...
void RandVector(arma::vec &v)
Overwrites a dimension-N vector to a random vector on the unit sphere in R^N.
void Center(const arma::mat &x, arma::mat &xCentered)
Creates a centered matrix, where centering is done by subtracting the sum over the columns (a column ...