Classes | |
class | Col< eT > |
Class for column vectors (matrices with only column). More... | |
Functions | |
Col::Col () | |
construct an empty column vector | |
Col::Col (const u32 n_elem) | |
construct a column vector with the specified number of n_elem | |
Col::Col (const char *text) | |
construct a column vector from specified text | |
const Col & | Col::operator= (const char *text) |
construct a column vector from specified text | |
Col::Col (const Col &X) | |
construct a column vector from a given column vector | |
const Col & | Col::operator= (const Col &X) |
construct a column vector from a given column vector | |
Col::Col (const Mat< eT > &X) | |
construct a column vector from a given matrix; the matrix must have exactly one column | |
const Col & | Col::operator= (const Mat< eT > &X) |
construct a column vector from a given matrix; the matrix must have exactly one column | |
const Col & | Col::operator*= (const Mat< eT > &X) |
in-place matrix multiplication | |
Col::Col (const eT *aux_mem, const u32 aux_length) | |
construct a column vector from a given auxillary array of eTs | |
template<typename T1 , typename T2 > | |
Col::Col (const Base< typename Col< eT >::pod_type, T1 > &A, const Base< typename Col< eT >::pod_type, T2 > &B) | |
Col::Col (const subview< eT > &X) | |
construct a column vector from given a submatrix; the submatrix must have exactly one column | |
const Col & | Col::operator= (const subview< eT > &X) |
construct a column vector from given a submatrix; the submatrix must have exactly one column | |
const Col & | Col::operator*= (const subview< eT > &X) |
in-place matrix mutiplication (using a submatrix on the right-hand-side) | |
Col::Col (const diagview< eT > &X) | |
construct a column vector from given a diagview | |
const Col & | Col::operator= (const diagview< eT > &X) |
construct a column vector from given a diagview | |
const Col & | Col::operator*= (const diagview< eT > &X) |
template<typename T1 , typename op_type > | |
Col::Col (const Op< T1, op_type > &X) | |
construct a column vector from Op, i.e. run the previously delayed operations; the result of the operations must have exactly one column | |
template<typename T1 , typename op_type > | |
const Col & | Col::operator= (const Op< T1, op_type > &X) |
construct a column vector from Op, i.e. run the previously delayed operations; the result of the operations must have exactly one column | |
template<typename T1 , typename op_type > | |
const Col & | Col::operator*= (const Op< T1, op_type > &X) |
in-place matrix multiplication, with the right-hand-side operand having delayed operations | |
template<typename T1 , typename T2 , typename glue_type > | |
Col::Col (const Glue< T1, T2, glue_type > &X) | |
construct a column vector from Glue, i.e. run the previously delayed operations; the result of the operations must have exactly one column | |
template<typename T1 , typename T2 , typename glue_type > | |
const Col & | Col::operator= (const Glue< T1, T2, glue_type > &X) |
construct a column vector from Glue, i.e. run the previously delayed operations; the result of the operations must have exactly one column | |
template<typename T1 , typename T2 , typename glue_type > | |
const Col & | Col::operator*= (const Glue< T1, T2, glue_type > &X) |
in-place matrix multiplications, with the right-hand-side operands having delayed operations | |
void | Col::set_size (const u32 n_elem) |
change the number of n_rows | |
void | Col::set_size (const u32 n_rows, const u32 n_cols) |
change the number of n_rows (this function re-implements mat::set_size() in order to check the number of columns) | |
void | Col::zeros () |
void | Col::zeros (const u32 n_elem) |
void | Col::zeros (const u32 n_rows, const u32 n_cols) |
void | Col::load (const std::string name, const file_type type=auto_detect) |
load a matrix from a file |
construct an empty column vector
Definition at line 23 of file Col_meat.hpp.
00024 : Mat<eT>() 00025 { 00026 arma_extra_debug_sigprint(); 00027 }
construct a column vector with the specified number of n_elem
Definition at line 34 of file Col_meat.hpp.
00035 : Mat<eT>(in_n_elem,1) 00036 { 00037 arma_extra_debug_sigprint(); 00038 }
construct a column vector from specified text
Definition at line 45 of file Col_meat.hpp.
References access::rw().
00046 : Mat<eT>(text) 00047 { 00048 arma_extra_debug_sigprint(); 00049 00050 std::swap( access::rw(Mat<eT>::n_rows), access::rw(Mat<eT>::n_cols) ); 00051 arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" ); 00052 }
const Col< eT > & Col< eT >::operator= | ( | const char * | text | ) | [inline, inherited] |
construct a column vector from specified text
Reimplemented from Mat< eT >.
Definition at line 60 of file Col_meat.hpp.
References access::rw().
Referenced by Col< eT >::operator=().
00061 { 00062 arma_extra_debug_sigprint(); 00063 00064 Mat<eT>::operator=(text); 00065 std::swap( access::rw(Mat<eT>::n_rows), access::rw(Mat<eT>::n_cols) ); 00066 arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" ); 00067 00068 return *this; 00069 }
construct a column vector from a given column vector
Definition at line 76 of file Col_meat.hpp.
00077 : Mat<eT>(X) 00078 { 00079 arma_extra_debug_sigprint(); 00080 }
const Col< eT > & Col< eT >::operator= | ( | const Col< eT > & | X | ) | [inline, inherited] |
construct a column vector from a given column vector
Definition at line 88 of file Col_meat.hpp.
References Col< eT >::operator=().
00089 { 00090 arma_extra_debug_sigprint(); 00091 00092 Mat<eT>::operator=(X); 00093 return *this; 00094 }
construct a column vector from a given matrix; the matrix must have exactly one column
Definition at line 101 of file Col_meat.hpp.
00102 : Mat<eT>(X) 00103 { 00104 arma_extra_debug_sigprint(); 00105 00106 arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" ); 00107 }
const Col< eT > & Col< eT >::operator= | ( | const Mat< eT > & | X | ) | [inline, inherited] |
construct a column vector from a given matrix; the matrix must have exactly one column
Reimplemented from Mat< eT >.
Definition at line 115 of file Col_meat.hpp.
References Col< eT >::operator=().
00116 { 00117 arma_extra_debug_sigprint(); 00118 00119 Mat<eT>::operator=(X); 00120 arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" ); 00121 00122 return *this; 00123 }
const Col< eT > & Col< eT >::operator*= | ( | const Mat< eT > & | m | ) | [inline, inherited] |
in-place matrix multiplication
Reimplemented from Mat< eT >.
Definition at line 130 of file Col_meat.hpp.
Referenced by Col< eT >::operator*=().
00131 { 00132 arma_extra_debug_sigprint(); 00133 00134 Mat<eT>::operator*=(X); 00135 arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" ); 00136 00137 return *this; 00138 }
Col< eT >::Col | ( | const eT * | aux_mem, | |
const u32 | aux_length | |||
) | [inline, inherited] |
construct a column vector from a given auxillary array of eTs
Definition at line 145 of file Col_meat.hpp.
References arma_check(), syslib::copy_elem(), and Col< eT >::set_size().
00146 { 00147 arma_extra_debug_sigprint(); 00148 00149 set_size(aux_length, 1); 00150 00151 arma_check( (Mat<eT>::n_elem != aux_length), "Col::Col(): don't know how to handle the given array" ); 00152 00153 syslib::copy_elem( Mat<eT>::memptr(), aux_mem, Mat<eT>::n_elem ); 00154 }
Col< eT >::Col | ( | const Base< typename Col< eT >::pod_type, T1 > & | A, | |
const Base< typename Col< eT >::pod_type, T2 > & | B | |||
) | [inline, inherited] |
Definition at line 162 of file Col_meat.hpp.
00166 : Mat<eT>(A,B) 00167 { 00168 arma_extra_debug_sigprint(); 00169 00170 arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" ); 00171 }
construct a column vector from given a submatrix; the submatrix must have exactly one column
Definition at line 178 of file Col_meat.hpp.
00179 : Mat<eT>(X) 00180 { 00181 arma_extra_debug_sigprint(); 00182 00183 arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" ); 00184 }
const Col< eT > & Col< eT >::operator= | ( | const subview< eT > & | X | ) | [inline, inherited] |
construct a column vector from given a submatrix; the submatrix must have exactly one column
Reimplemented from Mat< eT >.
Definition at line 192 of file Col_meat.hpp.
References Col< eT >::operator=().
00193 { 00194 arma_extra_debug_sigprint(); 00195 00196 Mat<eT>::operator=(X); 00197 arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" ); 00198 00199 return *this; 00200 }
const Col< eT > & Col< eT >::operator*= | ( | const subview< eT > & | X | ) | [inline, inherited] |
in-place matrix mutiplication (using a submatrix on the right-hand-side)
Reimplemented from Mat< eT >.
Definition at line 207 of file Col_meat.hpp.
References Col< eT >::operator*=().
00208 { 00209 arma_extra_debug_sigprint(); 00210 00211 Mat<eT>::operator*=(X); 00212 arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" ); 00213 00214 return *this; 00215 }
construct a column vector from given a diagview
Definition at line 222 of file Col_meat.hpp.
00223 : Mat<eT>(X) 00224 { 00225 arma_extra_debug_sigprint(); 00226 00227 arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" ); 00228 }
const Col< eT > & Col< eT >::operator= | ( | const diagview< eT > & | X | ) | [inline, inherited] |
construct a column vector from given a diagview
Reimplemented from Mat< eT >.
Definition at line 236 of file Col_meat.hpp.
References Col< eT >::operator=().
00237 { 00238 arma_extra_debug_sigprint(); 00239 00240 Mat<eT>::operator=(X); 00241 arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" ); 00242 return *this; 00243 }
const Col< eT > & Col< eT >::operator*= | ( | const diagview< eT > & | X | ) | [inline, inherited] |
Definition at line 250 of file Col_meat.hpp.
References Col< eT >::operator*=().
00251 { 00252 arma_extra_debug_sigprint(); 00253 00254 Mat<eT>::operator*=(X); 00255 arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" ); 00256 return *this; 00257 }
Col< eT >::Col | ( | const Op< T1, op_type > & | X | ) | [inline, inherited] |
construct a column vector from Op, i.e. run the previously delayed operations; the result of the operations must have exactly one column
Definition at line 265 of file Col_meat.hpp.
00266 : Mat<eT>(X) 00267 { 00268 arma_extra_debug_sigprint(); 00269 00270 arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" ); 00271 }
const Col< eT > & Col< eT >::operator= | ( | const Op< T1, op_type > & | X | ) | [inline, inherited] |
construct a column vector from Op, i.e. run the previously delayed operations; the result of the operations must have exactly one column
Reimplemented from Mat< eT >.
Definition at line 280 of file Col_meat.hpp.
References Col< eT >::operator=().
00281 { 00282 arma_extra_debug_sigprint(); 00283 00284 Mat<eT>::operator=(X); 00285 arma_debug_check( (Mat<eT>::n_cols > 1), "Col::operator=(): given matrix can't be interpreted as a column vector" ); 00286 return *this; 00287 }
const Col< eT > & Col< eT >::operator*= | ( | const Op< T1, op_type > & | X | ) | [inline, inherited] |
in-place matrix multiplication, with the right-hand-side operand having delayed operations
Reimplemented from Mat< eT >.
Definition at line 295 of file Col_meat.hpp.
References Col< eT >::operator*=().
00296 { 00297 arma_extra_debug_sigprint(); 00298 00299 Mat<eT>::operator*=(X); 00300 arma_debug_check( (Mat<eT>::n_cols > 1), "Col::operator=(): incompatible dimensions" ); 00301 return *this; 00302 }
Col< eT >::Col | ( | const Glue< T1, T2, glue_type > & | X | ) | [inline, inherited] |
construct a column vector from Glue, i.e. run the previously delayed operations; the result of the operations must have exactly one column
Definition at line 310 of file Col_meat.hpp.
00311 : Mat<eT>(X) 00312 { 00313 arma_extra_debug_sigprint(); 00314 00315 arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" ); 00316 }
const Col< eT > & Col< eT >::operator= | ( | const Glue< T1, T2, glue_type > & | X | ) | [inline, inherited] |
construct a column vector from Glue, i.e. run the previously delayed operations; the result of the operations must have exactly one column
Reimplemented from Mat< eT >.
Definition at line 325 of file Col_meat.hpp.
References Col< eT >::operator=().
00326 { 00327 arma_extra_debug_sigprint(); 00328 00329 Mat<eT>::operator=(X); 00330 arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" ); 00331 00332 return *this; 00333 }
const Col< eT > & Col< eT >::operator*= | ( | const Glue< T1, T2, glue_type > & | X | ) | [inline, inherited] |
in-place matrix multiplications, with the right-hand-side operands having delayed operations
Reimplemented from Mat< eT >.
Definition at line 341 of file Col_meat.hpp.
References Col< eT >::operator*=().
00342 { 00343 arma_extra_debug_sigprint(); 00344 00345 Mat<eT>::operator*=(X); 00346 arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" ); 00347 00348 return *this; 00349 }
change the number of n_rows
Definition at line 357 of file Col_meat.hpp.
Referenced by op_randn::apply(), op_rand::apply(), op_ones_full::apply(), Col< eT >::Col(), auxlib::eig_sym(), Col< eT >::set_size(), and auxlib::svd().
00358 { 00359 arma_extra_debug_sigprint(); 00360 00361 Mat<eT>::set_size(in_n_elem,1); 00362 }
void Col< eT >::set_size | ( | const u32 | n_rows, | |
const u32 | n_cols | |||
) | [inline, inherited] |
change the number of n_rows (this function re-implements mat::set_size() in order to check the number of columns)
Reimplemented from Mat< eT >.
Definition at line 370 of file Col_meat.hpp.
References min(), and Col< eT >::set_size().
00371 { 00372 arma_extra_debug_sigprint(); 00373 00374 Mat<eT>::set_size( in_n_rows, (std::min)( u32(1), in_n_cols ) ); 00375 arma_debug_check( (in_n_cols > 1), "Col::set_size(): incompatible dimensions" ); 00376 }
void Col< eT >::zeros | ( | ) | [inline, inherited] |
Reimplemented from Mat< eT >.
Definition at line 383 of file Col_meat.hpp.
Referenced by op_zeros::apply(), and Col< eT >::zeros().
00384 { 00385 arma_extra_debug_sigprint(); 00386 00387 Mat<eT>::zeros(); 00388 }
Definition at line 395 of file Col_meat.hpp.
References Col< eT >::zeros().
00396 { 00397 arma_extra_debug_sigprint(); 00398 00399 Mat<eT>::zeros(in_n_elem,1); 00400 }
void Col< eT >::zeros | ( | const u32 | n_rows, | |
const u32 | n_cols | |||
) | [inline, inherited] |
Reimplemented from Mat< eT >.
Definition at line 407 of file Col_meat.hpp.
References min(), and Col< eT >::zeros().
00408 { 00409 arma_extra_debug_sigprint(); 00410 00411 Mat<eT>::zeros( in_n_rows, (std::min)( u32(1), in_n_cols ) ); 00412 arma_debug_check( (in_n_cols > 1), "Col::zeros(): incompatible dimensions" ); 00413 }
void Col< eT >::load | ( | const std::string | name, | |
const file_type | type = auto_detect | |||
) | [inline, inherited] |
load a matrix from a file
Reimplemented from Mat< eT >.
Definition at line 420 of file Col_meat.hpp.
00421 { 00422 arma_extra_debug_sigprint(); 00423 00424 Mat<eT>::load(name,type); 00425 arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" ); 00426 }