13 #ifndef MLPACK_CORE_MATH_MAKE_ALIAS_HPP 14 #define MLPACK_CORE_MATH_MAKE_ALIAS_HPP 23 template<
typename ElemType>
25 const bool strict =
true)
28 return arma::Cube
(input.memptr(), input.n_rows, input.n_cols, 29 input.n_slices,
false, strict);
36 template<
typename ElemType>
38 const bool strict =
true)
41 return arma::Mat
(input.memptr(), input.n_rows, input.n_cols, false, 49 template<
typename ElemType>
51 const bool strict =
true)
54 return arma::Row
(input.memptr(), input.n_elem, false, strict); 61 template<
typename ElemType>
63 const bool strict =
true)
66 return arma::Col
(input.memptr(), input.n_elem, false, strict); 73 template<
typename ElemType>
78 return arma::SpMat
(input); 85 template<
typename ElemType>
90 return arma::SpRow
(input); 97 template<
typename ElemType>
102 return arma::SpCol
(input); 109 template<
typename ElemType>
112 if (mat.mem_state >= 1)
120 template<
typename ElemType>
Linear algebra utility functions, generally performed on matrices or vectors.
void ClearAlias(arma::Mat< ElemType > &mat)
Clear an alias so that no data is overwritten.
arma::Cube< ElemType > MakeAlias(arma::Cube< ElemType > &input, const bool strict=true)
Make an alias of a dense cube.