Col

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 u32 in_rows, const u32 in_cols)
 Col::Col (const char *text)
 construct a column vector from specified text
const ColCol::operator= (const char *text)
 construct a column vector from specified text
 Col::Col (const std::string &text)
 construct a column vector from specified text
const ColCol::operator= (const std::string &text)
 construct a column vector from specified text
 Col::Col (const Col &X)
 construct a column vector from a given column vector
const ColCol::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 ColCol::operator= (const Mat< eT > &X)
 construct a column vector from a given matrix; the matrix must have exactly one column
const ColCol::operator*= (const Mat< eT > &X)
 Col::Col (eT *aux_mem, const u32 aux_n_rows, const u32 aux_n_cols, const bool copy_aux_mem=true)
 construct a column vector from a given auxiliary array of eTs
 Col::Col (const eT *aux_mem, const u32 aux_n_rows, const u32 aux_n_cols)
 construct a column vector from a given auxiliary array of eTs
 Col::Col (eT *aux_mem, const u32 aux_length, const bool copy_aux_mem=true)
 construct a column vector from a given auxiliary array of eTs
 Col::Col (const eT *aux_mem, const u32 aux_length)
 construct a column vector from a given auxiliary array of eTs
template<typename T1 , typename T2 >
 Col::Col (const Base< pod_type, T1 > &A, const Base< 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 ColCol::operator= (const subview< eT > &X)
 construct a column vector from given a submatrix; the submatrix must have exactly one column
const ColCol::operator*= (const subview< eT > &X)
 in-place matrix mutiplication (using a submatrix on the right-hand-side)
 Col::Col (const subview_cube< eT > &X)
 construct a column vector from given a subcube; the subcube must have exactly one column
const ColCol::operator= (const subview_cube< eT > &X)
 construct a column vector from given a subcube; the subcube must have exactly one column
const ColCol::operator*= (const subview_cube< eT > &X)
 in-place matrix mutiplication (using a single-slice subcube on the right-hand-side)
 Col::Col (const diagview< eT > &X)
 construct a column vector from given a diagview
const ColCol::operator= (const diagview< eT > &X)
 construct a column vector from given a diagview
const ColCol::operator*= (const diagview< eT > &X)
 in-place matrix mutiplication (using a diagview on the right-hand-side)
arma_inline eT & Col::row (const u32 row_num)
 creation of subview (row vector)
arma_inline eT Col::row (const u32 row_num) const
 creation of subview (row vector)
arma_inline subview_col< eT > Col::rows (const u32 in_row1, const u32 in_row2)
 creation of subview (submatrix comprised of specified row vectors)
arma_inline const subview_col< eT > Col::rows (const u32 in_row1, const u32 in_row2) const
 creation of subview (submatrix comprised of specified row vectors)
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 ColCol::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 ColCol::operator*= (const Op< T1, op_type > &X)
 in-place matrix multiplication, with the right-hand-side operand having delayed operations
template<typename T1 , typename eop_type >
 Col::Col (const eOp< T1, eop_type > &X)
template<typename T1 , typename eop_type >
const ColCol::operator= (const eOp< T1, eop_type > &X)
 create a matrix from eOp, i.e. run the previously delayed unary operations
template<typename T1 , typename eop_type >
const ColCol::operator*= (const eOp< T1, eop_type > &X)
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 ColCol::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 ColCol::operator*= (const Glue< T1, T2, glue_type > &X)
 in-place matrix multiplications, with the right-hand-side operands having delayed operations
template<typename T1 , typename T2 , typename eglue_type >
 Col::Col (const eGlue< T1, T2, eglue_type > &X)
template<typename T1 , typename T2 , typename eglue_type >
const ColCol::operator= (const eGlue< T1, T2, eglue_type > &X)
 create a matrix from eGlue, i.e. run the previously delayed binary operations
template<typename T1 , typename T2 , typename eglue_type >
const ColCol::operator*= (const eGlue< T1, T2, eglue_type > &X)
void Col::set_size (const u32 n_elem)
 change the number of 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)
template<typename eT2 >
void Col::copy_size (const Mat< eT2 > &m)
 change the number of n_rows (this function re-implements mat::copy_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::ones ()
void Col::ones (const u32 n_elem)
void Col::ones (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
void Col::load (std::istream &is, const file_type type=auto_detect)
 load a matrix from a stream
row_iterator Col::begin_row (const u32 row_num)
const_row_iterator Col::begin_row (const u32 row_num) const
row_iterator Col::end_row (const u32 row_num)
const_row_iterator Col::end_row (const u32 row_num) const

Function Documentation

template<typename eT >
Col< eT >::Col (  )  [inline, inherited]

construct an empty column vector

Definition at line 24 of file Col_meat.hpp.

00025   : Mat<eT>()
00026   {
00027   arma_extra_debug_sigprint();
00028   }

template<typename eT >
Col< eT >::Col ( const u32  n_elem  )  [inline, explicit, inherited]

construct a column vector with the specified number of n_elem

Definition at line 35 of file Col_meat.hpp.

00036   : Mat<eT>(in_n_elem, 1)
00037   {
00038   arma_extra_debug_sigprint();
00039   }

template<typename eT >
Col< eT >::Col ( const u32  in_rows,
const u32  in_cols 
) [inline, inherited]

Definition at line 45 of file Col_meat.hpp.

00046   : Mat<eT>(in_n_rows, in_n_cols)
00047   {
00048   arma_extra_debug_sigprint();
00049   
00050   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00051   }

template<typename eT >
Col< eT >::Col ( const char *  text  )  [inline, inherited]

construct a column vector from specified text

Definition at line 58 of file Col_meat.hpp.

References access::rw().

00059   : Mat<eT>(text)
00060   {
00061   arma_extra_debug_sigprint();
00062   
00063   std::swap( access::rw(Mat<eT>::n_rows), access::rw(Mat<eT>::n_cols) );
00064   
00065   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00066   }

template<typename eT >
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 74 of file Col_meat.hpp.

References access::rw().

Referenced by Col< eT >::operator=().

00075   {
00076   arma_extra_debug_sigprint();
00077   
00078   Mat<eT>::operator=(text);
00079   
00080   std::swap( access::rw(Mat<eT>::n_rows), access::rw(Mat<eT>::n_cols) );
00081   
00082   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00083   
00084   return *this;
00085   }

template<typename eT >
Col< eT >::Col ( const std::string &  text  )  [inline, inherited]

construct a column vector from specified text

Definition at line 92 of file Col_meat.hpp.

References access::rw().

00093   : Mat<eT>(text)
00094   {
00095   arma_extra_debug_sigprint();
00096   
00097   std::swap( access::rw(Mat<eT>::n_rows), access::rw(Mat<eT>::n_cols) );
00098   
00099   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00100   }

template<typename eT >
const Col< eT > & Col< eT >::operator= ( const std::string &  text  )  [inline, inherited]

construct a column vector from specified text

Reimplemented from Mat< eT >.

Definition at line 108 of file Col_meat.hpp.

References Col< eT >::operator=(), and access::rw().

00109   {
00110   arma_extra_debug_sigprint();
00111   
00112   Mat<eT>::operator=(text);
00113   
00114   std::swap( access::rw(Mat<eT>::n_rows), access::rw(Mat<eT>::n_cols) );
00115   
00116   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00117   
00118   return *this;
00119   }

template<typename eT >
Col< eT >::Col ( const Col< eT > &  X  )  [inline, inherited]

construct a column vector from a given column vector

Definition at line 126 of file Col_meat.hpp.

00127   : Mat<eT>(X)
00128   {
00129   arma_extra_debug_sigprint();
00130   }

template<typename eT >
const Col< eT > & Col< eT >::operator= ( const Col< eT > &  X  )  [inline, inherited]

construct a column vector from a given column vector

Reimplemented from Mat< eT >.

Definition at line 138 of file Col_meat.hpp.

References Col< eT >::operator=().

00139   {
00140   arma_extra_debug_sigprint();
00141   
00142   Mat<eT>::operator=(X);
00143   
00144   return *this;
00145   }

template<typename eT>
Col< eT >::Col ( const Mat< eT > &  X  )  [inline, inherited]

construct a column vector from a given matrix; the matrix must have exactly one column

Definition at line 152 of file Col_meat.hpp.

00153   : Mat<eT>(X)
00154   {
00155   arma_extra_debug_sigprint();
00156   
00157   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00158   }

template<typename eT>
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

Definition at line 166 of file Col_meat.hpp.

References Col< eT >::operator=().

00167   {
00168   arma_extra_debug_sigprint();
00169   
00170   Mat<eT>::operator=(X);
00171   
00172   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00173   
00174   return *this;
00175   }

template<typename eT>
const Col< eT > & Col< eT >::operator*= ( const Mat< eT > &  X  )  [inline, inherited]

Definition at line 182 of file Col_meat.hpp.

Referenced by Col< eT >::operator*=().

00183   {
00184   arma_extra_debug_sigprint();
00185   
00186   Mat<eT>::operator*=(X);
00187   
00188   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00189   
00190   return *this;
00191   }

template<typename eT>
Col< eT >::Col ( eT *  aux_mem,
const u32  aux_n_rows,
const u32  aux_n_cols,
const bool  copy_aux_mem = true 
) [inline, inherited]

construct a column vector from a given auxiliary array of eTs

Definition at line 198 of file Col_meat.hpp.

00199   : Mat<eT>(aux_mem, aux_n_rows, aux_n_cols, copy_aux_mem)
00200   {
00201   arma_extra_debug_sigprint();
00202   
00203   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00204   }

template<typename eT>
Col< eT >::Col ( const eT *  aux_mem,
const u32  aux_n_rows,
const u32  aux_n_cols 
) [inline, inherited]

construct a column vector from a given auxiliary array of eTs

Definition at line 211 of file Col_meat.hpp.

00212   : Mat<eT>(aux_mem, aux_n_rows, aux_n_cols)
00213   {
00214   arma_extra_debug_sigprint();
00215   
00216   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00217   }

template<typename eT>
Col< eT >::Col ( eT *  aux_mem,
const u32  aux_length,
const bool  copy_aux_mem = true 
) [inline, inherited]

construct a column vector from a given auxiliary array of eTs

Definition at line 224 of file Col_meat.hpp.

00225   : Mat<eT>(aux_mem, aux_length, 1, copy_aux_mem)
00226   {
00227   arma_extra_debug_sigprint();
00228   
00229 //   set_size(aux_length, 1);
00230 // 
00231 //   arma_check( (Mat<eT>::n_elem != aux_length), "Col::Col(): don't know how to handle the given array" );
00232 // 
00233 //   syslib::copy_elem( Mat<eT>::memptr(), aux_mem, Mat<eT>::n_elem );
00234   }

template<typename eT>
Col< eT >::Col ( const eT *  aux_mem,
const u32  aux_length 
) [inline, inherited]

construct a column vector from a given auxiliary array of eTs

Definition at line 241 of file Col_meat.hpp.

00242   : Mat<eT>(aux_mem, aux_length, 1)
00243   {
00244   arma_extra_debug_sigprint();
00245   
00246 //   set_size(aux_length, 1);
00247 // 
00248 //   arma_check( (Mat<eT>::n_elem != aux_length), "Col::Col(): don't know how to handle the given array" );
00249 // 
00250 //   syslib::copy_elem( Mat<eT>::memptr(), aux_mem, Mat<eT>::n_elem );
00251   }

template<typename eT >
template<typename T1 , typename T2 >
Col< eT >::Col ( const Base< pod_type, T1 > &  A,
const Base< pod_type, T2 > &  B 
) [inline, explicit, inherited]

Definition at line 259 of file Col_meat.hpp.

00263   : Mat<eT>(A,B)
00264   {
00265   arma_extra_debug_sigprint();
00266   
00267   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00268   }

template<typename eT>
Col< eT >::Col ( const subview< eT > &  X  )  [inline, inherited]

construct a column vector from given a submatrix; the submatrix must have exactly one column

Definition at line 275 of file Col_meat.hpp.

00276   : Mat<eT>(X)
00277   {
00278   arma_extra_debug_sigprint();
00279   
00280   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00281   }

template<typename eT>
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 289 of file Col_meat.hpp.

References Col< eT >::operator=().

00290   {
00291   arma_extra_debug_sigprint();
00292   
00293   Mat<eT>::operator=(X);
00294   
00295   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00296   
00297   return *this;
00298   }

template<typename eT>
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 305 of file Col_meat.hpp.

References Col< eT >::operator*=().

00306   {
00307   arma_extra_debug_sigprint();
00308   
00309   Mat<eT>::operator*=(X);
00310   
00311   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00312   
00313   return *this;
00314   }

template<typename eT>
Col< eT >::Col ( const subview_cube< eT > &  X  )  [inline, inherited]

construct a column vector from given a subcube; the subcube must have exactly one column

Definition at line 321 of file Col_meat.hpp.

00322   : Mat<eT>(X)
00323   {
00324   arma_extra_debug_sigprint();
00325   
00326   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00327   }

template<typename eT>
const Col< eT > & Col< eT >::operator= ( const subview_cube< eT > &  X  )  [inline, inherited]

construct a column vector from given a subcube; the subcube must have exactly one column

Reimplemented from Mat< eT >.

Definition at line 335 of file Col_meat.hpp.

References Col< eT >::operator=().

00336   {
00337   arma_extra_debug_sigprint();
00338   
00339   Mat<eT>::operator=(X);
00340   
00341   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00342   
00343   return *this;
00344   }

template<typename eT>
const Col< eT > & Col< eT >::operator*= ( const subview_cube< eT > &  X  )  [inline, inherited]

in-place matrix mutiplication (using a single-slice subcube on the right-hand-side)

Reimplemented from Mat< eT >.

Definition at line 351 of file Col_meat.hpp.

References Col< eT >::operator*=().

00352   {
00353   arma_extra_debug_sigprint();
00354   
00355   Mat<eT>::operator*=(X);
00356   
00357   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00358   
00359   return *this;
00360   }

template<typename eT>
Col< eT >::Col ( const diagview< eT > &  X  )  [inline, inherited]

construct a column vector from given a diagview

Definition at line 367 of file Col_meat.hpp.

00368   : Mat<eT>(X)
00369   {
00370   arma_extra_debug_sigprint();
00371   
00372   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00373   }

template<typename eT>
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 381 of file Col_meat.hpp.

References Col< eT >::operator=().

00382   {
00383   arma_extra_debug_sigprint();
00384   
00385   Mat<eT>::operator=(X);
00386   
00387   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00388   
00389   return *this;
00390   }

template<typename eT>
const Col< eT > & Col< eT >::operator*= ( const diagview< eT > &  X  )  [inline, inherited]

in-place matrix mutiplication (using a diagview on the right-hand-side)

Reimplemented from Mat< eT >.

Definition at line 397 of file Col_meat.hpp.

References Col< eT >::operator*=().

00398   {
00399   arma_extra_debug_sigprint();
00400   
00401   Mat<eT>::operator*=(X);
00402   
00403   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00404   
00405   return *this;
00406   }

template<typename eT >
arma_inline eT & Col< eT >::row ( const u32  row_num  )  [inline, inherited]

creation of subview (row vector)

Reimplemented from Mat< eT >.

Definition at line 413 of file Col_meat.hpp.

References access::rw().

00414   {
00415   arma_debug_check( (row_num >= Mat<eT>::n_rows), "Col::row(): out of bounds" );
00416   
00417   return access::rw(Mat<eT>::mem[row_num]);
00418   }

template<typename eT >
arma_inline eT Col< eT >::row ( const u32  row_num  )  const [inline, inherited]

creation of subview (row vector)

Reimplemented from Mat< eT >.

Definition at line 425 of file Col_meat.hpp.

00427   {
00428   arma_debug_check( (row_num >= Mat<eT>::n_rows), "Col::row(): out of bounds" );
00429   
00430   return Mat<eT>::mem[row_num];
00431   }

template<typename eT >
arma_inline subview_col< eT > Col< eT >::rows ( const u32  in_row1,
const u32  in_row2 
) [inline, inherited]

creation of subview (submatrix comprised of specified row vectors)

Reimplemented from Mat< eT >.

Definition at line 438 of file Col_meat.hpp.

Referenced by op_pinv::direct_pinv(), and op_princomp::direct_princomp().

00439   {
00440   arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= Mat<eT>::n_rows) ), "Col::rows(): indices out of bounds or incorrectly used");
00441   
00442   return subview_col<eT>(*this, 0, in_row1, in_row2);
00443   }

template<typename eT >
arma_inline const subview_col< eT > Col< eT >::rows ( const u32  in_row1,
const u32  in_row2 
) const [inline, inherited]

creation of subview (submatrix comprised of specified row vectors)

Reimplemented from Mat< eT >.

Definition at line 450 of file Col_meat.hpp.

00452   {
00453   arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= Mat<eT>::n_rows) ), "Col::rows(): indices out of bounds or incorrectly used");
00454   
00455   return subview_col<eT>(*this, 0, in_row1, in_row2);
00456   }

template<typename eT >
template<typename T1 , typename op_type >
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 464 of file Col_meat.hpp.

00465   : Mat<eT>(X)
00466   {
00467   arma_extra_debug_sigprint();
00468   
00469   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00470   }

template<typename eT >
template<typename T1 , typename op_type >
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 479 of file Col_meat.hpp.

References Col< eT >::operator=().

00480   {
00481   arma_extra_debug_sigprint();
00482   
00483   Mat<eT>::operator=(X);
00484   arma_debug_check( (Mat<eT>::n_cols > 1), "Col::operator=(): given matrix can't be interpreted as a column vector" );
00485   return *this;
00486   }

template<typename eT >
template<typename T1 , typename op_type >
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 494 of file Col_meat.hpp.

References Col< eT >::operator*=().

00495   {
00496   arma_extra_debug_sigprint();
00497   
00498   Mat<eT>::operator*=(X);
00499   
00500   arma_debug_check( (Mat<eT>::n_cols > 1), "Col::operator=(): incompatible dimensions" );
00501   
00502   return *this;
00503   }

template<typename eT >
template<typename T1 , typename eop_type >
Col< eT >::Col ( const eOp< T1, eop_type > &  X  )  [inline, inherited]

Definition at line 510 of file Col_meat.hpp.

00511   : Mat<eT>(X)
00512   {
00513   arma_extra_debug_sigprint();
00514   
00515   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00516   }

template<typename eT >
template<typename T1 , typename eop_type >
const Col< eT > & Col< eT >::operator= ( const eOp< T1, eop_type > &  X  )  [inline, inherited]

create a matrix from eOp, i.e. run the previously delayed unary operations

Reimplemented from Mat< eT >.

Definition at line 524 of file Col_meat.hpp.

References Col< eT >::operator=().

00525   {
00526   arma_extra_debug_sigprint();
00527   
00528   Mat<eT>::operator=(X);
00529   arma_debug_check( (Mat<eT>::n_cols > 1), "Col::operator=(): given matrix can't be interpreted as a column vector" );
00530   return *this;
00531   }

template<typename eT >
template<typename T1 , typename eop_type >
const Col< eT > & Col< eT >::operator*= ( const eOp< T1, eop_type > &  X  )  [inline, inherited]

Reimplemented from Mat< eT >.

Definition at line 539 of file Col_meat.hpp.

References Col< eT >::operator*=().

00540   {
00541   arma_extra_debug_sigprint();
00542   
00543   Mat<eT>::operator*=(X);
00544   
00545   arma_debug_check( (Mat<eT>::n_cols > 1), "Col::operator=(): incompatible dimensions" );
00546   
00547   return *this;
00548   }

template<typename eT >
template<typename T1 , typename T2 , typename glue_type >
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 556 of file Col_meat.hpp.

00557   : Mat<eT>(X)
00558   {
00559   arma_extra_debug_sigprint();
00560   
00561   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00562   }

template<typename eT >
template<typename T1 , typename T2 , typename glue_type >
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 571 of file Col_meat.hpp.

References Col< eT >::operator=().

00572   {
00573   arma_extra_debug_sigprint();
00574   
00575   Mat<eT>::operator=(X);
00576   
00577   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00578   
00579   return *this;
00580   }

template<typename eT >
template<typename T1 , typename T2 , typename glue_type >
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 588 of file Col_meat.hpp.

References Col< eT >::operator*=().

00589   {
00590   arma_extra_debug_sigprint();
00591   
00592   Mat<eT>::operator*=(X);
00593   
00594   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00595   
00596   return *this;
00597   }

template<typename eT >
template<typename T1 , typename T2 , typename eglue_type >
Col< eT >::Col ( const eGlue< T1, T2, eglue_type > &  X  )  [inline, inherited]

Definition at line 604 of file Col_meat.hpp.

00605   : Mat<eT>(X)
00606   {
00607   arma_extra_debug_sigprint();
00608   
00609   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00610   }

template<typename eT >
template<typename T1 , typename T2 , typename eglue_type >
const Col< eT > & Col< eT >::operator= ( const eGlue< T1, T2, eglue_type > &  X  )  [inline, inherited]

create a matrix from eGlue, i.e. run the previously delayed binary operations

Reimplemented from Mat< eT >.

Definition at line 618 of file Col_meat.hpp.

References Col< eT >::operator=().

00619   {
00620   arma_extra_debug_sigprint();
00621   
00622   Mat<eT>::operator=(X);
00623   
00624   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00625   
00626   return *this;
00627   }

template<typename eT >
template<typename T1 , typename T2 , typename eglue_type >
const Col< eT > & Col< eT >::operator*= ( const eGlue< T1, T2, eglue_type > &  X  )  [inline, inherited]

Reimplemented from Mat< eT >.

Definition at line 635 of file Col_meat.hpp.

References Col< eT >::operator*=().

00636   {
00637   arma_extra_debug_sigprint();
00638   
00639   Mat<eT>::operator*=(X);
00640   
00641   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00642   
00643   return *this;
00644   }

template<typename eT >
void Col< eT >::set_size ( const u32  n_elem  )  [inline, inherited]

change the number of rows

Definition at line 652 of file Col_meat.hpp.

Referenced by Col< eT >::copy_size(), op_princomp::direct_princomp(), auxlib::eig_sym(), Col< eT >::set_size(), svd(), and auxlib::svd().

00653   {
00654   arma_extra_debug_sigprint();
00655   
00656   Mat<eT>::set_size(in_n_elem,1);
00657   }

template<typename eT >
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 665 of file Col_meat.hpp.

References min(), and Col< eT >::set_size().

00666   {
00667   arma_extra_debug_sigprint();
00668 
00669   // min() is used in case in_n_cols is zero
00670   Mat<eT>::set_size( in_n_rows, (std::min)( u32(1), in_n_cols ) );
00671   
00672   arma_debug_check( (in_n_cols > 1), "Col::set_size(): incompatible dimensions" );
00673   }

template<typename eT >
template<typename eT2 >
void Col< eT >::copy_size ( const Mat< eT2 > &  m  )  [inline, inherited]

change the number of n_rows (this function re-implements mat::copy_size() in order to check the number of columns)

Definition at line 682 of file Col_meat.hpp.

References min(), Mat< eT >::n_cols, Mat< eT >::n_rows, and Col< eT >::set_size().

00683   {
00684   arma_extra_debug_sigprint();
00685   
00686   // min() is used in case x.n_cols is zero
00687   Mat<eT>::set_size( x.n_rows, (std::min)( u32(1), x.n_cols ) );
00688   
00689   arma_debug_check( (x.n_cols > 1), "Col::copy_size(): incompatible dimensions" );
00690   }

template<typename eT >
void Col< eT >::zeros (  )  [inline, inherited]

Reimplemented from Mat< eT >.

Definition at line 697 of file Col_meat.hpp.

Referenced by op_princomp::direct_princomp(), and Col< eT >::zeros().

00698   {
00699   arma_extra_debug_sigprint();
00700   
00701   Mat<eT>::zeros();
00702   }

template<typename eT >
void Col< eT >::zeros ( const u32  n_elem  )  [inline, inherited]

Definition at line 709 of file Col_meat.hpp.

References Col< eT >::zeros().

00710   {
00711   arma_extra_debug_sigprint();
00712   
00713   Mat<eT>::zeros(in_n_elem, 1);
00714   }

template<typename eT >
void Col< eT >::zeros ( const u32  n_rows,
const u32  n_cols 
) [inline, inherited]

Reimplemented from Mat< eT >.

Definition at line 721 of file Col_meat.hpp.

References min(), and Col< eT >::zeros().

00722   {
00723   arma_extra_debug_sigprint();
00724   
00725   // min() is used in case in_n_cols is zero
00726   Mat<eT>::zeros( in_n_rows, (std::min)( u32(1), in_n_cols ) );
00727   
00728   arma_debug_check( (in_n_cols > 1), "Col::zeros(): incompatible dimensions" );
00729   }

template<typename eT >
void Col< eT >::ones (  )  [inline, inherited]

Reimplemented from Mat< eT >.

Definition at line 736 of file Col_meat.hpp.

Referenced by Col< eT >::ones().

00737   {
00738   arma_extra_debug_sigprint();
00739   
00740   Mat<eT>::ones();
00741   }

template<typename eT >
void Col< eT >::ones ( const u32  n_elem  )  [inline, inherited]

Definition at line 748 of file Col_meat.hpp.

References Col< eT >::ones().

00749   {
00750   arma_extra_debug_sigprint();
00751   
00752   Mat<eT>::ones(in_n_elem, 1);
00753   }

template<typename eT >
void Col< eT >::ones ( const u32  n_rows,
const u32  n_cols 
) [inline, inherited]

Reimplemented from Mat< eT >.

Definition at line 760 of file Col_meat.hpp.

References min(), and Col< eT >::ones().

00761   {
00762   arma_extra_debug_sigprint();
00763   
00764   // min() is used in case in_n_cols is zero
00765   Mat<eT>::ones( in_n_rows, (std::min)( u32(1), in_n_cols ) );
00766   
00767   arma_debug_check( (in_n_cols > 1), "Col::ones(): incompatible dimensions" );
00768   }

template<typename eT >
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 775 of file Col_meat.hpp.

Referenced by Col< eT >::load().

00776   {
00777   arma_extra_debug_sigprint();
00778   
00779   Mat<eT>::load(name,type);
00780   
00781   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00782   }

template<typename eT >
void Col< eT >::load ( std::istream &  is,
const file_type  type = auto_detect 
) [inline, inherited]

load a matrix from a stream

Reimplemented from Mat< eT >.

Definition at line 789 of file Col_meat.hpp.

References Col< eT >::load().

00790   {
00791   arma_extra_debug_sigprint();
00792   
00793   Mat<eT>::load(is, type);
00794   
00795   arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
00796   }

template<typename eT >
Col< eT >::row_iterator Col< eT >::begin_row ( const u32  row_num  )  [inline, inherited]

Reimplemented from Mat< eT >.

Definition at line 803 of file Col_meat.hpp.

References Mat< eT >::memptr().

00804   {
00805   arma_extra_debug_sigprint();
00806   
00807   arma_debug_check( (row_num >= Mat<eT>::n_rows), "begin_row(): index out of bounds");
00808   
00809   return Mat<eT>::memptr() + row_num;
00810   }

template<typename eT >
Col< eT >::const_row_iterator Col< eT >::begin_row ( const u32  row_num  )  const [inline, inherited]

Reimplemented from Mat< eT >.

Definition at line 817 of file Col_meat.hpp.

References Mat< eT >::memptr().

00818   {
00819   arma_extra_debug_sigprint();
00820   
00821   arma_debug_check( (row_num >= Mat<eT>::n_rows), "begin_row(): index out of bounds");
00822   
00823   return Mat<eT>::memptr() + row_num;
00824   }

template<typename eT >
Col< eT >::row_iterator Col< eT >::end_row ( const u32  row_num  )  [inline, inherited]

Reimplemented from Mat< eT >.

Definition at line 831 of file Col_meat.hpp.

References Mat< eT >::memptr().

00832   {
00833   arma_extra_debug_sigprint();
00834   
00835   arma_debug_check( (row_num >= Mat<eT>::n_rows), "end_row(): index out of bounds");
00836   
00837   return Mat<eT>::memptr() + row_num + 1;
00838   }

template<typename eT >
Col< eT >::const_row_iterator Col< eT >::end_row ( const u32  row_num  )  const [inline, inherited]

Reimplemented from Mat< eT >.

Definition at line 845 of file Col_meat.hpp.

References Mat< eT >::memptr().

00846   {
00847   arma_extra_debug_sigprint();
00848   
00849   arma_debug_check( (row_num >= Mat<eT>::n_rows), "end_row(): index out of bounds");
00850   
00851   return Mat<eT>::memptr() + row_num + 1;
00852   }