MLPACK  1.0.10
lin_alg.hpp
Go to the documentation of this file.
1 
22 #ifndef __MLPACK_CORE_MATH_LIN_ALG_HPP
23 #define __MLPACK_CORE_MATH_LIN_ALG_HPP
24 
25 #include <mlpack/prereqs.hpp>
26 
30 namespace mlpack {
31 namespace math {
32 
38 void VectorPower(arma::vec& vec, const double power);
39 
47 void Center(const arma::mat& x, arma::mat& xCentered);
48 
54 void WhitenUsingSVD(const arma::mat& x,
55  arma::mat& xWhitened,
56  arma::mat& whiteningMatrix);
57 
62 void WhitenUsingEig(const arma::mat& x,
63  arma::mat& xWhitened,
64  arma::mat& whiteningMatrix);
65 
69 void RandVector(arma::vec& v);
70 
75 void Orthogonalize(const arma::mat& x, arma::mat& W);
76 
81 void Orthogonalize(arma::mat& x);
82 
90 void RemoveRows(const arma::mat& input,
91  const std::vector<size_t>& rowsToRemove,
92  arma::mat& output);
93 
94 }; // namespace math
95 }; // namespace mlpack
96 
97 #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.
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 ...