Classes | |
class | Mat< eT > |
Dense matrix class. More... | |
class | Mat_aux |
Functions | |
Mat::~Mat () | |
Mat::Mat () | |
Mat::Mat (const u32 in_rows, const u32 in_cols) | |
construct the matrix to have user specified dimensions | |
void | Mat::init (const u32 in_rows, const u32 in_cols) |
internal matrix construction; if the requested size is small enough, memory from the stack is used. otherwise memory is allocated via 'new' | |
Mat::Mat (const char *text) | |
create the matrix from a textual description | |
const Mat & | Mat::operator= (const char *text) |
create the matrix from a textual description | |
Mat::Mat (const std::string &text) | |
create the matrix from a textual description | |
const Mat & | Mat::operator= (const std::string &text) |
create the matrix from a textual description | |
void | Mat::init (const std::string &text) |
internal function to create the matrix from a textual description | |
arma_inline const Mat & | Mat::operator= (const eT val) |
Set the matrix to be equal to the specified scalar. NOTE: the size of the matrix will be 1x1. | |
arma_inline const Mat & | Mat::operator+= (const eT val) |
In-place addition of a scalar to all elements of the matrix. | |
arma_inline const Mat & | Mat::operator-= (const eT val) |
In-place subtraction of a scalar from all elements of the matrix. | |
arma_inline const Mat & | Mat::operator*= (const eT val) |
In-place multiplication of all elements of the matrix with a scalar. | |
arma_inline const Mat & | Mat::operator/= (const eT val) |
In-place division of all elements of the matrix with a scalar. | |
Mat::Mat (const Mat &m) | |
construct a matrix from a given matrix | |
const Mat & | Mat::operator= (const Mat &m) |
construct a matrix from a given matrix | |
void | Mat::init (const Mat &x) |
construct a matrix from a given matrix | |
Mat::Mat (eT *aux_mem, const u32 aux_n_rows, const u32 aux_n_cols, const bool copy_aux_mem=true) | |
construct a matrix from a given auxiliary array of eTs. if copy_aux_mem is true, new memory is allocated and the array is copied. if copy_aux_mem is false, the auxiliary array is used directly (without allocating memory and copying). the default is to copy the array. | |
Mat::Mat (const eT *aux_mem, const u32 aux_n_rows, const u32 aux_n_cols) | |
construct a matrix from a given auxiliary read-only array of eTs. the array is copied. | |
Mat::Mat (const char junk, const eT *aux_mem, const u32 aux_n_rows, const u32 aux_n_cols) | |
DANGEROUS! Construct a temporary matrix, using auxiliary memory. This constructor is NOT intended for usage by user code. Its sole purpose is to be used by the Cube class. | |
const Mat & | Mat::operator+= (const Mat &m) |
in-place matrix addition | |
const Mat & | Mat::operator-= (const Mat &m) |
in-place matrix subtraction | |
const Mat & | Mat::operator*= (const Mat &m) |
in-place matrix multiplication | |
const Mat & | Mat::operator%= (const Mat &m) |
in-place element-wise matrix multiplication | |
const Mat & | Mat::operator/= (const Mat &m) |
in-place element-wise matrix division | |
template<typename T1 , typename T2 > | |
Mat::Mat (const Base< pod_type, T1 > &A, const Base< pod_type, T2 > &B) | |
for constructing a complex matrix out of two non-complex matrices | |
Mat::Mat (const subview< eT > &X) | |
construct a matrix from subview (e.g. construct a matrix from a delayed submatrix operation) | |
const Mat & | Mat::operator= (const subview< eT > &X) |
construct a matrix from subview (e.g. construct a matrix from a delayed submatrix operation) | |
const Mat & | Mat::operator+= (const subview< eT > &X) |
in-place matrix addition (using a submatrix on the right-hand-side) | |
const Mat & | Mat::operator-= (const subview< eT > &X) |
in-place matrix subtraction (using a submatrix on the right-hand-side) | |
const Mat & | Mat::operator*= (const subview< eT > &X) |
in-place matrix mutiplication (using a submatrix on the right-hand-side) | |
const Mat & | Mat::operator%= (const subview< eT > &X) |
in-place element-wise matrix mutiplication (using a submatrix on the right-hand-side) | |
const Mat & | Mat::operator/= (const subview< eT > &X) |
in-place element-wise matrix division (using a submatrix on the right-hand-side) | |
Mat::Mat (const subview_cube< eT > &X) | |
construct a matrix from a subview_cube instance | |
const Mat & | Mat::operator= (const subview_cube< eT > &X) |
construct a matrix from a subview_cube instance | |
const Mat & | Mat::operator+= (const subview_cube< eT > &X) |
in-place matrix addition (using a single-slice subcube on the right-hand-side) | |
const Mat & | Mat::operator-= (const subview_cube< eT > &X) |
in-place matrix subtraction (using a single-slice subcube on the right-hand-side) | |
const Mat & | Mat::operator*= (const subview_cube< eT > &X) |
in-place matrix mutiplication (using a single-slice subcube on the right-hand-side) | |
const Mat & | Mat::operator%= (const subview_cube< eT > &X) |
in-place element-wise matrix mutiplication (using a single-slice subcube on the right-hand-side) | |
const Mat & | Mat::operator/= (const subview_cube< eT > &X) |
in-place element-wise matrix division (using a single-slice subcube on the right-hand-side) | |
Mat::Mat (const diagview< eT > &X) | |
construct a matrix from diagview (e.g. construct a matrix from a delayed diag operation) | |
const Mat & | Mat::operator= (const diagview< eT > &X) |
construct a matrix from diagview (e.g. construct a matrix from a delayed diag operation) | |
const Mat & | Mat::operator+= (const diagview< eT > &X) |
in-place matrix addition (using a diagview on the right-hand-side) | |
const Mat & | Mat::operator-= (const diagview< eT > &X) |
in-place matrix subtraction (using a diagview on the right-hand-side) | |
const Mat & | Mat::operator*= (const diagview< eT > &X) |
in-place matrix mutiplication (using a diagview on the right-hand-side) | |
const Mat & | Mat::operator%= (const diagview< eT > &X) |
in-place element-wise matrix mutiplication (using a diagview on the right-hand-side) | |
const Mat & | Mat::operator/= (const diagview< eT > &X) |
in-place element-wise matrix division (using a diagview on the right-hand-side) | |
arma_inline subview_row< eT > | Mat::row (const u32 row_num) |
creation of subview (row vector) | |
arma_inline const subview_row< eT > | Mat::row (const u32 row_num) const |
creation of subview (row vector) | |
arma_inline subview_col< eT > | Mat::col (const u32 col_num) |
creation of subview (column vector) | |
arma_inline const subview_col< eT > | Mat::col (const u32 col_num) const |
creation of subview (column vector) | |
arma_inline subview< eT > | Mat::rows (const u32 in_row1, const u32 in_row2) |
creation of subview (submatrix comprised of specified row vectors) | |
arma_inline const subview< eT > | Mat::rows (const u32 in_row1, const u32 in_row2) const |
creation of subview (submatrix comprised of specified row vectors) | |
arma_inline subview< eT > | Mat::cols (const u32 in_col1, const u32 in_col2) |
creation of subview (submatrix comprised of specified column vectors) | |
arma_inline const subview< eT > | Mat::cols (const u32 in_col1, const u32 in_col2) const |
creation of subview (submatrix comprised of specified column vectors) | |
arma_inline subview< eT > | Mat::submat (const u32 in_row1, const u32 in_col1, const u32 in_row2, const u32 in_col2) |
creation of subview (submatrix) | |
arma_inline const subview< eT > | Mat::submat (const u32 in_row1, const u32 in_col1, const u32 in_row2, const u32 in_col2) const |
creation of subview (generic submatrix) | |
arma_inline diagview< eT > | Mat::diag (const s32 in_id=0) |
creation of diagview (diagonal) | |
arma_inline const diagview< eT > | Mat::diag (const s32 in_id=0) const |
creation of diagview (diagonal) | |
void | Mat::swap_rows (const u32 in_row1, const u32 in_row2) |
void | Mat::swap_cols (const u32 in_col1, const u32 in_col2) |
template<typename T1 , typename op_type > | |
Mat::Mat (const Op< T1, op_type > &X) | |
create a matrix from Op, i.e. run the previously delayed unary operations | |
template<typename T1 , typename op_type > | |
const Mat & | Mat::operator= (const Op< T1, op_type > &X) |
create a matrix from Op, i.e. run the previously delayed unary operations | |
template<typename T1 , typename op_type > | |
const Mat & | Mat::operator+= (const Op< T1, op_type > &X) |
in-place matrix addition, with the right-hand-side operand having delayed operations | |
template<typename T1 , typename op_type > | |
const Mat & | Mat::operator-= (const Op< T1, op_type > &X) |
in-place matrix subtraction, with the right-hand-side operand having delayed operations | |
template<typename T1 , typename op_type > | |
const Mat & | Mat::operator*= (const Op< T1, op_type > &X) |
in-place matrix multiplication, with the right-hand-side operand having delayed operations | |
template<typename T1 , typename op_type > | |
const Mat & | Mat::operator%= (const Op< T1, op_type > &X) |
in-place matrix element-wise multiplication, with the right-hand-side operand having delayed operations | |
template<typename T1 , typename op_type > | |
const Mat & | Mat::operator/= (const Op< T1, op_type > &X) |
in-place matrix element-wise division, with the right-hand-side operand having delayed operations | |
template<typename T1 , typename eop_type > | |
Mat::Mat (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 Mat & | Mat::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 Mat & | Mat::operator+= (const eOp< T1, eop_type > &X) |
template<typename T1 , typename eop_type > | |
const Mat & | Mat::operator-= (const eOp< T1, eop_type > &X) |
template<typename T1 , typename eop_type > | |
const Mat & | Mat::operator*= (const eOp< T1, eop_type > &X) |
template<typename T1 , typename eop_type > | |
const Mat & | Mat::operator%= (const eOp< T1, eop_type > &X) |
template<typename T1 , typename eop_type > | |
const Mat & | Mat::operator/= (const eOp< T1, eop_type > &X) |
template<typename T1 , typename op_type > | |
Mat::Mat (const mtOp< eT, T1, op_type > &X) | |
EXPERIMENTAL. | |
template<typename T1 , typename op_type > | |
const Mat & | Mat::operator= (const mtOp< eT, T1, op_type > &X) |
EXPERIMENTAL. | |
template<typename T1 , typename op_type > | |
const Mat & | Mat::operator+= (const mtOp< eT, T1, op_type > &X) |
EXPERIMENTAL. | |
template<typename T1 , typename op_type > | |
const Mat & | Mat::operator-= (const mtOp< eT, T1, op_type > &X) |
EXPERIMENTAL. | |
template<typename T1 , typename op_type > | |
const Mat & | Mat::operator*= (const mtOp< eT, T1, op_type > &X) |
EXPERIMENTAL. | |
template<typename T1 , typename op_type > | |
const Mat & | Mat::operator%= (const mtOp< eT, T1, op_type > &X) |
EXPERIMENTAL. | |
template<typename T1 , typename op_type > | |
const Mat & | Mat::operator/= (const mtOp< eT, T1, op_type > &X) |
EXPERIMENTAL. | |
template<typename T1 , typename T2 , typename glue_type > | |
Mat::Mat (const Glue< T1, T2, glue_type > &X) | |
create a matrix from Glue, i.e. run the previously delayed binary operations | |
template<typename T1 , typename T2 , typename glue_type > | |
const Mat & | Mat::operator= (const Glue< T1, T2, glue_type > &X) |
create a matrix from Glue, i.e. run the previously delayed binary operations | |
template<typename T1 , typename T2 , typename glue_type > | |
const Mat & | Mat::operator+= (const Glue< T1, T2, glue_type > &X) |
in-place matrix addition, with the right-hand-side operands having delayed operations | |
template<typename T1 , typename T2 , typename glue_type > | |
const Mat & | Mat::operator-= (const Glue< T1, T2, glue_type > &X) |
in-place matrix subtraction, with the right-hand-side operands having delayed operations | |
template<typename T1 , typename T2 , typename glue_type > | |
const Mat & | Mat::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 glue_type > | |
const Mat & | Mat::operator%= (const Glue< T1, T2, glue_type > &X) |
in-place matrix element-wise multiplication, with the right-hand-side operands having delayed operations | |
template<typename T1 , typename T2 , typename glue_type > | |
const Mat & | Mat::operator/= (const Glue< T1, T2, glue_type > &X) |
in-place matrix element-wise division, with the right-hand-side operands having delayed operations | |
template<typename T1 , typename T2 > | |
const Mat & | Mat::operator+= (const Glue< T1, T2, glue_times > &X) |
template<typename T1 , typename T2 > | |
const Mat & | Mat::operator-= (const Glue< T1, T2, glue_times > &X) |
template<typename T1 , typename T2 , typename eglue_type > | |
Mat::Mat (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 Mat & | Mat::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 Mat & | Mat::operator+= (const eGlue< T1, T2, eglue_type > &X) |
in-place matrix addition, with the right-hand-side operands having delayed operations | |
template<typename T1 , typename T2 , typename eglue_type > | |
const Mat & | Mat::operator-= (const eGlue< T1, T2, eglue_type > &X) |
in-place matrix subtraction, with the right-hand-side operands having delayed operations | |
template<typename T1 , typename T2 , typename eglue_type > | |
const Mat & | Mat::operator*= (const eGlue< T1, T2, eglue_type > &X) |
template<typename T1 , typename T2 , typename eglue_type > | |
const Mat & | Mat::operator%= (const eGlue< T1, T2, eglue_type > &X) |
template<typename T1 , typename T2 , typename eglue_type > | |
const Mat & | Mat::operator/= (const eGlue< T1, T2, eglue_type > &X) |
template<typename T1 , typename T2 , typename glue_type > | |
Mat::Mat (const mtGlue< eT, T1, T2, glue_type > &X) | |
EXPERIMENTAL: create a matrix from mtGlue, i.e. run the previously delayed binary operations. | |
template<typename T1 , typename T2 , typename glue_type > | |
const Mat & | Mat::operator= (const mtGlue< eT, T1, T2, glue_type > &X) |
EXPERIMENTAL: create a matrix from Glue, i.e. run the previously delayed binary operations. | |
template<typename T1 , typename T2 , typename glue_type > | |
const Mat & | Mat::operator+= (const mtGlue< eT, T1, T2, glue_type > &X) |
EXPERIMENTAL: in-place matrix addition, with the right-hand-side operands having delayed operations. | |
template<typename T1 , typename T2 , typename glue_type > | |
const Mat & | Mat::operator-= (const mtGlue< eT, T1, T2, glue_type > &X) |
EXPERIMENTAL: in-place matrix subtraction, with the right-hand-side operands having delayed operations. | |
template<typename T1 , typename T2 , typename glue_type > | |
const Mat & | Mat::operator*= (const mtGlue< eT, T1, T2, glue_type > &X) |
EXPERIMENTAL: in-place matrix multiplications, with the right-hand-side operands having delayed operations. | |
template<typename T1 , typename T2 , typename glue_type > | |
const Mat & | Mat::operator%= (const mtGlue< eT, T1, T2, glue_type > &X) |
EXPERIMENTAL: in-place matrix element-wise multiplication, with the right-hand-side operands having delayed operations. | |
template<typename T1 , typename T2 , typename glue_type > | |
const Mat & | Mat::operator/= (const mtGlue< eT, T1, T2, glue_type > &X) |
EXPERIMENTAL: in-place matrix element-wise division, with the right-hand-side operands having delayed operations. | |
arma_inline eT & | Mat::operator() (const u32 i) |
linear element accessor (treats the matrix as a vector); bounds checking not done when ARMA_NO_DEBUG is defined | |
arma_inline eT | Mat::operator() (const u32 i) const |
linear element accessor (treats the matrix as a vector); bounds checking not done when ARMA_NO_DEBUG is defined | |
arma_inline eT & | Mat::operator[] (const u32 i) |
linear element accessor (treats the matrix as a vector); no bounds check. | |
arma_inline eT | Mat::operator[] (const u32 i) const |
linear element accessor (treats the matrix as a vector); no bounds check | |
arma_inline eT & | Mat::operator() (const u32 in_row, const u32 in_col) |
element accessor; bounds checking not done when ARMA_NO_DEBUG is defined | |
arma_inline eT | Mat::operator() (const u32 in_row, const u32 in_col) const |
element accessor; bounds checking not done when ARMA_NO_DEBUG is defined | |
arma_inline eT & | Mat::at (const u32 in_row, const u32 in_col) |
element accessor; no bounds check | |
arma_inline eT | Mat::at (const u32 in_row, const u32 in_col) const |
element accessor; no bounds check | |
arma_inline const Mat & | Mat::operator++ () |
prefix ++ | |
arma_inline void | Mat::operator++ (int) |
postfix ++ (must not return the object by reference) | |
arma_inline const Mat & | Mat::operator-- () |
prefix -- | |
arma_inline void | Mat::operator-- (int) |
postfix -- (must not return the object by reference) | |
arma_inline bool | Mat::is_vec () const |
returns true if the object can be interpreted as a column or row vector | |
arma_inline bool | Mat::is_square () const |
returns true if the object has the same number of non-zero rows and columnns | |
arma_inline bool | Mat::is_finite () const |
returns true if all of the elements are finite | |
arma_inline eT * | Mat::colptr (const u32 in_col) |
returns a pointer to array of eTs for a specified column; no bounds check | |
arma_inline const eT * | Mat::colptr (const u32 in_col) const |
returns a pointer to array of eTs for a specified column; no bounds check | |
arma_inline eT * | Mat::memptr () |
returns a pointer to array of eTs used by the matrix | |
arma_inline const eT * | Mat::memptr () const |
returns a pointer to array of eTs used by the matrix | |
void | Mat::print (const std::string extra_text="") const |
print contents of the matrix (to the cout stream), optionally preceding with a user specified line of text. the precision and cell width are modified. on return, the stream's flags are restored to their original values. | |
void | Mat::print (std::ostream &user_stream, const std::string extra_text="") const |
print contents of the matrix to a user specified stream, optionally preceding with a user specified line of text. the precision and cell width are modified. on return, the stream's flags are restored to their original values. | |
void | Mat::print_trans (const std::string extra_text="") const |
print contents of the transposed version of the matrix (to the cout stream), optionally preceding with a user specified line of text. the precision and cell width are modified. on return, the stream's flags are restored to their original values. | |
void | Mat::print_trans (std::ostream &user_stream, const std::string extra_text="") const |
print contents of the transposed version of matrix to a user specified stream, optionally preceding with a user specified line of text. the precision and cell width are modified. on return, the stream's flags are restored to their original values. | |
void | Mat::raw_print (const std::string extra_text="") const |
print contents of the matrix (to the cout stream), optionally preceding with a user specified line of text. the stream's flags are used as is and are not modified (i.e. the precision and cell width are not modified). | |
void | Mat::raw_print (std::ostream &user_stream, const std::string extra_text="") const |
print contents of the matrix to a user specified stream, optionally preceding with a user specified line of text. the stream's flags are used as is and are not modified. (i.e. the precision and cell width are not modified). | |
void | Mat::raw_print_trans (const std::string extra_text="") const |
print contents of the transposed version of the matrix (to the cout stream), optionally preceding with a user specified line of text. the stream's flags are used as is and are not modified (i.e. the precision and cell width are not modified). | |
void | Mat::raw_print_trans (std::ostream &user_stream, const std::string extra_text="") const |
print contents of the transposed version of the matrix to a user specified stream, optionally preceding with a user specified line of text. the stream's flags are used as is and are not modified. (i.e. the precision and cell width are not modified). | |
void | Mat::set_size (const u32 in_rows, const u32 in_cols) |
change the matrix to have user specified dimensions (data is not preserved) | |
template<typename eT2 > | |
void | Mat::copy_size (const Mat< eT2 > &m) |
change the matrix (without preserving data) to have the same dimensions as the given matrix | |
arma_hot void | Mat::fill (const eT val) |
fill the matrix with the specified value | |
void | Mat::zeros () |
void | Mat::zeros (const u32 in_rows, const u32 in_cols) |
void | Mat::ones () |
void | Mat::ones (const u32 in_rows, const u32 in_cols) |
void | Mat::reset () |
bool | Mat::save (const std::string name, const file_type type=arma_binary, const bool print_status=true) const |
save the matrix to a file | |
bool | Mat::save (std::ostream &os, const file_type type=arma_binary, const bool print_status=true) const |
save the matrix to a stream | |
bool | Mat::load (const std::string name, const file_type type=auto_detect, const bool print_status=true) |
load a matrix from a file | |
bool | Mat::load (std::istream &is, const file_type type=auto_detect, const bool print_status=true) |
load a matrix from a stream | |
bool | Mat::quiet_save (const std::string name, const file_type type=arma_binary) const |
save the matrix to a file, without printing any error messages | |
bool | Mat::quiet_save (std::ostream &os, const file_type type=arma_binary) const |
save the matrix to a stream, without printing any error messages | |
bool | Mat::quiet_load (const std::string name, const file_type type=auto_detect) |
load a matrix from a file, without printing any error messages | |
bool | Mat::quiet_load (std::istream &is, const file_type type=auto_detect) |
load a matrix from a stream, without printing any error messages | |
Mat::row_iterator::row_iterator (Mat< eT > &in_M, const u32 in_row) | |
eT & | Mat::row_iterator::operator* () |
row_iterator & | Mat::row_iterator::operator++ () |
void | Mat::row_iterator::operator++ (int) |
row_iterator & | Mat::row_iterator::operator-- () |
void | Mat::row_iterator::operator-- (int) |
Mat::const_row_iterator::const_row_iterator (const Mat< eT > &in_M, const u32 in_row) | |
eT | Mat::const_row_iterator::operator* () const |
const_row_iterator & | Mat::const_row_iterator::operator++ () |
void | Mat::const_row_iterator::operator++ (int) |
const_row_iterator & | Mat::const_row_iterator::operator-- () |
void | Mat::const_row_iterator::operator-- (int) |
iterator | Mat::begin () |
const_iterator | Mat::begin () const |
iterator | Mat::end () |
const_iterator | Mat::end () const |
col_iterator | Mat::begin_col (const u32 col_num) |
const_col_iterator | Mat::begin_col (const u32 col_num) const |
col_iterator | Mat::end_col (const u32 col_num) |
const_col_iterator | Mat::end_col (const u32 col_num) const |
row_iterator | Mat::begin_row (const u32 row_num) |
const_row_iterator | Mat::begin_row (const u32 row_num) const |
row_iterator | Mat::end_row (const u32 row_num) |
const_row_iterator | Mat::end_row (const u32 row_num) const |
template<typename eT > | |
static arma_inline void | Mat_aux::prefix_pp (Mat< eT > &x) |
prefix ++ | |
template<typename T > | |
static arma_inline void | Mat_aux::prefix_pp (Mat< std::complex< T > > &x) |
prefix ++ for complex numbers (work around for limitations of the std::complex class) | |
template<typename eT > | |
static arma_inline void | Mat_aux::postfix_pp (Mat< eT > &x) |
postfix ++ | |
template<typename T > | |
static arma_inline void | Mat_aux::postfix_pp (Mat< std::complex< T > > &x) |
postfix ++ for complex numbers (work around for limitations of the std::complex class) | |
template<typename eT > | |
static arma_inline void | Mat_aux::prefix_mm (Mat< eT > &x) |
prefix -- | |
template<typename T > | |
static arma_inline void | Mat_aux::prefix_mm (Mat< std::complex< T > > &x) |
prefix -- for complex numbers (work around for limitations of the std::complex class) | |
template<typename eT > | |
static arma_inline void | Mat_aux::postfix_mm (Mat< eT > &x) |
postfix -- | |
template<typename T > | |
static arma_inline void | Mat_aux::postfix_mm (Mat< std::complex< T > > &x) |
postfix ++ for complex numbers (work around for limitations of the std::complex class) |
Definition at line 23 of file Mat_meat.hpp.
References arma_config::debug, Mat< eT >::mem, Mat< eT >::mem_local, Mat< eT >::n_cols, Mat< eT >::n_elem, Mat< eT >::n_rows, access::rw(), and Mat< eT >::use_aux_mem.
00024 { 00025 arma_extra_debug_sigprint_this(this); 00026 00027 if(use_aux_mem == false) 00028 { 00029 if(n_elem > sizeof(mem_local)/sizeof(eT) ) 00030 { 00031 delete [] mem; 00032 } 00033 } 00034 00035 if(arma_config::debug == true) 00036 { 00037 // try to expose buggy user code that accesses deleted objects 00038 access::rw(n_rows) = 0; 00039 access::rw(n_cols) = 0; 00040 access::rw(n_elem) = 0; 00041 access::rw(mem) = 0; 00042 } 00043 00044 isnt_supported_elem_type<eT>::check(); 00045 }
Definition at line 51 of file Mat_meat.hpp.
construct the matrix to have user specified dimensions
Definition at line 66 of file Mat_meat.hpp.
References Mat< eT >::init().
void Mat< eT >::init | ( | const u32 | in_rows, | |
const u32 | in_cols | |||
) | [inline, protected, inherited] |
internal matrix construction; if the requested size is small enough, memory from the stack is used. otherwise memory is allocated via 'new'
Definition at line 85 of file Mat_meat.hpp.
References arma_check(), Mat< eT >::mem, Mat< eT >::mem_local, Mat< eT >::n_cols, Mat< eT >::n_elem, Mat< eT >::n_rows, access::rw(), and Mat< eT >::use_aux_mem.
Referenced by Mat< eT >::copy_size(), Mat< eT >::init(), Mat< eT >::Mat(), Mat< eT >::operator=(), Mat< eT >::reset(), and Mat< eT >::set_size().
00086 { 00087 arma_extra_debug_sigprint( arma_boost::format("in_n_rows = %d, in_n_cols = %d") % in_n_rows % in_n_cols ); 00088 00089 const u32 new_n_elem = in_n_rows * in_n_cols; 00090 00091 if(n_elem == new_n_elem) 00092 { 00093 access::rw(n_rows) = in_n_rows; 00094 access::rw(n_cols) = in_n_cols; 00095 } 00096 else 00097 { 00098 arma_debug_check 00099 ( 00100 (use_aux_mem == true), 00101 "Mat::init(): can't change the amount of memory as auxiliary memory is in use" 00102 ); 00103 00104 if(n_elem > sizeof(mem_local)/sizeof(eT) ) 00105 { 00106 delete [] mem; 00107 } 00108 00109 if(new_n_elem <= sizeof(mem_local)/sizeof(eT) ) 00110 { 00111 access::rw(mem) = mem_local; 00112 } 00113 else 00114 { 00115 access::rw(mem) = new(std::nothrow) eT[new_n_elem]; 00116 arma_check( (mem == 0), "Mat::init(): out of memory" ); 00117 } 00118 00119 access::rw(n_elem) = new_n_elem; 00120 00121 if(new_n_elem == 0) 00122 { 00123 access::rw(n_rows) = 0; 00124 access::rw(n_cols) = 0; 00125 } 00126 else 00127 { 00128 access::rw(n_rows) = in_n_rows; 00129 access::rw(n_cols) = in_n_cols; 00130 } 00131 00132 } 00133 }
create the matrix from a textual description
Definition at line 139 of file Mat_meat.hpp.
References Mat< eT >::init().
const Mat< eT > & Mat< eT >::operator= | ( | const char * | text | ) | [inline, inherited] |
create the matrix from a textual description
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 158 of file Mat_meat.hpp.
References Mat< eT >::init().
Referenced by Mat< eT >::Mat().
00159 { 00160 arma_extra_debug_sigprint(); 00161 00162 init( std::string(text) ); 00163 return *this; 00164 }
create the matrix from a textual description
Definition at line 171 of file Mat_meat.hpp.
References Mat< eT >::init().
const Mat< eT > & Mat< eT >::operator= | ( | const std::string & | text | ) | [inline, inherited] |
create the matrix from a textual description
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 190 of file Mat_meat.hpp.
References Mat< eT >::init().
00191 { 00192 arma_extra_debug_sigprint(); 00193 00194 init(text); 00195 return *this; 00196 }
void Mat< eT >::init | ( | const std::string & | text | ) | [inline, protected, inherited] |
internal function to create the matrix from a textual description
Definition at line 204 of file Mat_meat.hpp.
References arma_check(), Mat< eT >::at(), Mat< eT >::col(), Mat< eT >::row(), and Mat< eT >::set_size().
00205 { 00206 arma_extra_debug_sigprint(); 00207 00208 // 00209 // work out the size 00210 00211 u32 t_n_rows = 0; 00212 u32 t_n_cols = 0; 00213 00214 bool t_n_cols_found = false; 00215 00216 std::string token; 00217 00218 std::string::size_type line_start = 0; 00219 std::string::size_type line_end = 0; 00220 00221 while( line_start < text.length() ) 00222 { 00223 00224 line_end = text.find(';', line_start); 00225 00226 if(line_end == std::string::npos) 00227 line_end = text.length()-1; 00228 00229 std::string::size_type line_len = line_end - line_start + 1; 00230 std::stringstream line_stream( text.substr(line_start,line_len) ); 00231 00232 00233 u32 line_n_cols = 0; 00234 while(line_stream >> token) 00235 { 00236 ++line_n_cols; 00237 } 00238 00239 00240 if(line_n_cols > 0) 00241 { 00242 if(t_n_cols_found == false) 00243 { 00244 t_n_cols = line_n_cols; 00245 t_n_cols_found = true; 00246 } 00247 else 00248 arma_check( (line_n_cols != t_n_cols), "Mat::init(): inconsistent number of columns in given string"); 00249 00250 ++t_n_rows; 00251 } 00252 line_start = line_end+1; 00253 00254 } 00255 00256 Mat<eT>& x = *this; 00257 x.set_size(t_n_rows, t_n_cols); 00258 00259 line_start = 0; 00260 line_end = 0; 00261 00262 u32 row = 0; 00263 00264 while( line_start < text.length() ) 00265 { 00266 00267 line_end = text.find(';', line_start); 00268 00269 if(line_end == std::string::npos) 00270 line_end = text.length()-1; 00271 00272 std::string::size_type line_len = line_end - line_start + 1; 00273 std::stringstream line_stream( text.substr(line_start,line_len) ); 00274 00275 // u32 col = 0; 00276 // while(line_stream >> token) 00277 // { 00278 // x.at(row,col) = strtod(token.c_str(), 0); 00279 // ++col; 00280 // } 00281 00282 u32 col = 0; 00283 eT val; 00284 while(line_stream >> val) 00285 { 00286 x.at(row,col) = val; 00287 ++col; 00288 } 00289 00290 ++row; 00291 line_start = line_end+1; 00292 } 00293 00294 }
arma_inline const Mat< eT > & Mat< eT >::operator= | ( | const eT | val | ) | [inline, inherited] |
Set the matrix to be equal to the specified scalar. NOTE: the size of the matrix will be 1x1.
Definition at line 303 of file Mat_meat.hpp.
References Mat< eT >::init(), Mat< eT >::mem, and access::rw().
00304 { 00305 arma_extra_debug_sigprint(); 00306 00307 init(1,1); 00308 access::rw(mem[0]) = val; 00309 return *this; 00310 }
arma_inline const Mat< eT > & Mat< eT >::operator+= | ( | const eT | val | ) | [inline, inherited] |
In-place addition of a scalar to all elements of the matrix.
Definition at line 318 of file Mat_meat.hpp.
References Mat< eT >::memptr(), and Mat< eT >::n_elem.
00319 { 00320 arma_extra_debug_sigprint(); 00321 00322 eT* local_ptr = memptr(); 00323 const u32 local_n_elem = n_elem; 00324 00325 u32 i,j; 00326 00327 for(i=0, j=1; j<local_n_elem; i+=2, j+=2) 00328 { 00329 local_ptr[i] += val; 00330 local_ptr[j] += val; 00331 } 00332 00333 if(i < local_n_elem) 00334 { 00335 local_ptr[i] += val; 00336 } 00337 00338 return *this; 00339 }
arma_inline const Mat< eT > & Mat< eT >::operator-= | ( | const eT | val | ) | [inline, inherited] |
In-place subtraction of a scalar from all elements of the matrix.
Definition at line 347 of file Mat_meat.hpp.
References Mat< eT >::memptr(), and Mat< eT >::n_elem.
00348 { 00349 arma_extra_debug_sigprint(); 00350 00351 eT* local_ptr = memptr(); 00352 const u32 local_n_elem = n_elem; 00353 00354 u32 i,j; 00355 00356 for(i=0, j=1; j<local_n_elem; i+=2, j+=2) 00357 { 00358 local_ptr[i] -= val; 00359 local_ptr[j] -= val; 00360 } 00361 00362 if(i < local_n_elem) 00363 { 00364 local_ptr[i] -= val; 00365 } 00366 00367 return *this; 00368 }
arma_inline const Mat< eT > & Mat< eT >::operator*= | ( | const eT | val | ) | [inline, inherited] |
In-place multiplication of all elements of the matrix with a scalar.
Definition at line 376 of file Mat_meat.hpp.
References Mat< eT >::memptr(), and Mat< eT >::n_elem.
00377 { 00378 arma_extra_debug_sigprint(); 00379 00380 eT* local_ptr = memptr(); 00381 const u32 local_n_elem = n_elem; 00382 00383 u32 i,j; 00384 00385 for(i=0, j=1; j<local_n_elem; i+=2, j+=2) 00386 { 00387 local_ptr[i] *= val; 00388 local_ptr[j] *= val; 00389 } 00390 00391 if(i < local_n_elem) 00392 { 00393 local_ptr[i] *= val; 00394 } 00395 00396 return *this; 00397 }
arma_inline const Mat< eT > & Mat< eT >::operator/= | ( | const eT | val | ) | [inline, inherited] |
In-place division of all elements of the matrix with a scalar.
Definition at line 405 of file Mat_meat.hpp.
References Mat< eT >::memptr(), and Mat< eT >::n_elem.
00406 { 00407 arma_extra_debug_sigprint(); 00408 00409 eT* local_ptr = memptr(); 00410 const u32 local_n_elem = n_elem; 00411 00412 u32 i,j; 00413 00414 for(i=0, j=1; j<local_n_elem; i+=2, j+=2) 00415 { 00416 local_ptr[i] /= val; 00417 local_ptr[j] /= val; 00418 } 00419 00420 if(i < local_n_elem) 00421 { 00422 local_ptr[i] /= val; 00423 } 00424 00425 return *this; 00426 }
construct a matrix from a given matrix
Definition at line 433 of file Mat_meat.hpp.
References Mat< eT >::init().
00434 : n_rows(0) 00435 , n_cols(0) 00436 , n_elem(0) 00437 , use_aux_mem(false) 00438 //, mem(0) 00439 , mem(mem) 00440 { 00441 arma_extra_debug_sigprint(arma_boost::format("this = %x in_mat = %x") % this % &in_mat); 00442 00443 init(in_mat); 00444 }
const Mat< eT > & Mat< eT >::operator= | ( | const Mat< eT > & | m | ) | [inline, inherited] |
construct a matrix from a given matrix
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 452 of file Mat_meat.hpp.
References Mat< eT >::init().
00453 { 00454 arma_extra_debug_sigprint(); 00455 00456 init(x); 00457 return *this; 00458 }
construct a matrix from a given matrix
Definition at line 466 of file Mat_meat.hpp.
References syslib::copy_elem(), Mat< eT >::init(), Mat< eT >::mem, Mat< eT >::memptr(), Mat< eT >::n_cols, Mat< eT >::n_elem, and Mat< eT >::n_rows.
Mat< eT >::Mat | ( | eT * | aux_mem, | |
const u32 | aux_n_rows, | |||
const u32 | aux_n_cols, | |||
const bool | copy_aux_mem = true | |||
) | [inline, inherited] |
construct a matrix from a given auxiliary array of eTs. if copy_aux_mem is true, new memory is allocated and the array is copied. if copy_aux_mem is false, the auxiliary array is used directly (without allocating memory and copying). the default is to copy the array.
Definition at line 486 of file Mat_meat.hpp.
References syslib::copy_elem(), Mat< eT >::init(), Mat< eT >::memptr(), and Mat< eT >::n_elem.
00487 : n_rows (copy_aux_mem ? 0 : aux_n_rows ) 00488 , n_cols (copy_aux_mem ? 0 : aux_n_cols ) 00489 , n_elem (copy_aux_mem ? 0 : aux_n_rows*aux_n_cols) 00490 , use_aux_mem(copy_aux_mem ? false : true ) 00491 , mem (copy_aux_mem ? mem : aux_mem ) 00492 { 00493 arma_extra_debug_sigprint_this(this); 00494 00495 if(copy_aux_mem == true) 00496 { 00497 init(aux_n_rows, aux_n_cols); 00498 syslib::copy_elem( memptr(), aux_mem, n_elem ); 00499 } 00500 }
Mat< eT >::Mat | ( | const eT * | aux_mem, | |
const u32 | aux_n_rows, | |||
const u32 | aux_n_cols | |||
) | [inline, inherited] |
construct a matrix from a given auxiliary read-only array of eTs. the array is copied.
Definition at line 508 of file Mat_meat.hpp.
References syslib::copy_elem(), Mat< eT >::init(), Mat< eT >::memptr(), and Mat< eT >::n_elem.
00509 : n_rows(0) 00510 , n_cols(0) 00511 , n_elem(0) 00512 , use_aux_mem(false) 00513 //, mem(0) 00514 , mem(mem) 00515 { 00516 arma_extra_debug_sigprint_this(this); 00517 00518 init(aux_n_rows, aux_n_cols); 00519 syslib::copy_elem( memptr(), aux_mem, n_elem ); 00520 }
Mat< eT >::Mat | ( | const char | junk, | |
const eT * | aux_mem, | |||
const u32 | aux_n_rows, | |||
const u32 | aux_n_cols | |||
) | [inline, protected, inherited] |
DANGEROUS! Construct a temporary matrix, using auxiliary memory. This constructor is NOT intended for usage by user code. Its sole purpose is to be used by the Cube class.
Definition at line 530 of file Mat_meat.hpp.
00531 : n_rows (aux_n_rows ) 00532 , n_cols (aux_n_cols ) 00533 , n_elem (aux_n_rows*aux_n_cols) 00534 , use_aux_mem(true ) 00535 , mem (aux_mem ) 00536 { 00537 arma_extra_debug_sigprint_this(this); 00538 }
const Mat< eT > & Mat< eT >::operator+= | ( | const Mat< eT > & | m | ) | [inline, inherited] |
in-place matrix addition
Definition at line 546 of file Mat_meat.hpp.
References Mat< eT >::memptr(), and Mat< eT >::n_elem.
00547 { 00548 arma_extra_debug_sigprint(); 00549 00550 arma_debug_assert_same_size(*this, m, "matrix addition"); 00551 00552 const u32 local_n_elem = m.n_elem; 00553 00554 eT* out_mem = (*this).memptr(); 00555 const eT* m_mem = m.memptr(); 00556 00557 u32 i,j; 00558 00559 for(i=0, j=1; j<local_n_elem; i+=2, j+=2) 00560 { 00561 out_mem[i] += m_mem[i]; 00562 out_mem[j] += m_mem[j]; 00563 } 00564 00565 if(i < local_n_elem) 00566 { 00567 out_mem[i] += m_mem[i]; 00568 } 00569 00570 return *this; 00571 }
const Mat< eT > & Mat< eT >::operator-= | ( | const Mat< eT > & | m | ) | [inline, inherited] |
in-place matrix subtraction
Definition at line 579 of file Mat_meat.hpp.
References Mat< eT >::memptr(), and Mat< eT >::n_elem.
00580 { 00581 arma_extra_debug_sigprint(); 00582 00583 arma_debug_assert_same_size(*this, m, "matrix subtraction"); 00584 00585 const u32 local_n_elem = m.n_elem; 00586 00587 eT* out_mem = (*this).memptr(); 00588 const eT* m_mem = m.memptr(); 00589 00590 u32 i,j; 00591 00592 for(i=0, j=1; j<local_n_elem; i+=2, j+=2) 00593 { 00594 out_mem[i] -= m_mem[i]; 00595 out_mem[j] -= m_mem[j]; 00596 } 00597 00598 if(i < local_n_elem) 00599 { 00600 out_mem[i] -= m_mem[i]; 00601 } 00602 00603 return *this; 00604 }
const Mat< eT > & Mat< eT >::operator*= | ( | const Mat< eT > & | m | ) | [inline, inherited] |
in-place matrix multiplication
Reimplemented in Row< eT >.
Definition at line 612 of file Mat_meat.hpp.
References glue_times::apply_inplace().
00613 { 00614 arma_extra_debug_sigprint(); 00615 00616 glue_times::apply_inplace(*this, m); 00617 return *this; 00618 }
const Mat< eT > & Mat< eT >::operator%= | ( | const Mat< eT > & | m | ) | [inline, inherited] |
in-place element-wise matrix multiplication
Definition at line 626 of file Mat_meat.hpp.
References Mat< eT >::memptr(), and Mat< eT >::n_elem.
00627 { 00628 arma_extra_debug_sigprint(); 00629 00630 arma_debug_assert_same_size(*this, m, "element-wise matrix multplication"); 00631 00632 const u32 local_n_elem = m.n_elem; 00633 00634 eT* out_mem = (*this).memptr(); 00635 const eT* m_mem = m.memptr(); 00636 00637 u32 i,j; 00638 00639 for(i=0, j=1; j<local_n_elem; i+=2, j+=2) 00640 { 00641 out_mem[i] *= m_mem[i]; 00642 out_mem[j] *= m_mem[j]; 00643 } 00644 00645 if(i < local_n_elem) 00646 { 00647 out_mem[i] *= m_mem[i]; 00648 } 00649 00650 return *this; 00651 }
const Mat< eT > & Mat< eT >::operator/= | ( | const Mat< eT > & | m | ) | [inline, inherited] |
in-place element-wise matrix division
Definition at line 659 of file Mat_meat.hpp.
References Mat< eT >::memptr(), and Mat< eT >::n_elem.
00660 { 00661 arma_extra_debug_sigprint(); 00662 00663 arma_debug_assert_same_size(*this, m, "element-wise matrix division"); 00664 00665 const u32 local_n_elem = m.n_elem; 00666 00667 eT* out_mem = (*this).memptr(); 00668 const eT* m_mem = m.memptr(); 00669 00670 u32 i,j; 00671 00672 for(i=0, j=1; j<local_n_elem; i+=2, j+=2) 00673 { 00674 out_mem[i] /= m_mem[i]; 00675 out_mem[j] /= m_mem[j]; 00676 } 00677 00678 if(i < local_n_elem) 00679 { 00680 out_mem[i] /= m_mem[i]; 00681 } 00682 00683 return *this; 00684 }
Mat< eT >::Mat | ( | const Base< pod_type, T1 > & | A, | |
const Base< pod_type, T2 > & | B | |||
) | [inline, explicit, inherited] |
for constructing a complex matrix out of two non-complex matrices
< compile-time abort if eT isn't std::complex
< compile-time abort if T is std::complex
< compile-time abort if types are not compatible
Definition at line 693 of file Mat_meat.hpp.
References arma_assert_same_size(), Mat< eT >::mem, Mat< eT >::n_cols, and access::rw().
00697 : n_rows(0) 00698 , n_cols(0) 00699 , n_elem(0) 00700 , use_aux_mem(false) 00701 //, mem(0) 00702 , mem(mem) 00703 { 00704 arma_extra_debug_sigprint_this(this); 00705 00706 arma_type_check< is_complex<eT>::value == false >::apply(); //!< compile-time abort if eT isn't std::complex 00707 00708 typedef typename T1::elem_type T; 00709 arma_type_check< is_complex<T>::value == true >::apply(); //!< compile-time abort if T is std::complex 00710 00711 isnt_same_type<std::complex<T>, eT>::check(); //!< compile-time abort if types are not compatible 00712 00713 const unwrap<T1> tmp_A(A.get_ref()); 00714 const unwrap<T2> tmp_B(B.get_ref()); 00715 00716 const Mat<T>& X = tmp_A.M; 00717 const Mat<T>& Y = tmp_B.M; 00718 00719 arma_assert_same_size(X, Y, "Mat()"); 00720 00721 init(X.n_rows, Y.n_cols); 00722 00723 const T* X_mem = X.mem; 00724 const T* Y_mem = Y.mem; 00725 00726 for(u32 i=0; i<n_elem; ++i) 00727 { 00728 access::rw(mem[i]) = std::complex<T>(X_mem[i], Y_mem[i]); 00729 } 00730 }
construct a matrix from subview (e.g. construct a matrix from a delayed submatrix operation)
Definition at line 737 of file Mat_meat.hpp.
References Mat< eT >::operator=().
const Mat< eT > & Mat< eT >::operator= | ( | const subview< eT > & | X | ) | [inline, inherited] |
construct a matrix from subview (e.g. construct a matrix from a delayed submatrix operation)
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 756 of file Mat_meat.hpp.
00757 { 00758 arma_extra_debug_sigprint(); 00759 00760 subview<eT>::extract(*this, X); 00761 return *this; 00762 }
const Mat< eT > & Mat< eT >::operator+= | ( | const subview< eT > & | X | ) | [inline, inherited] |
in-place matrix addition (using a submatrix on the right-hand-side)
Definition at line 769 of file Mat_meat.hpp.
00770 { 00771 arma_extra_debug_sigprint(); 00772 00773 subview<eT>::plus_inplace(*this, X); 00774 return *this; 00775 }
const Mat< eT > & Mat< eT >::operator-= | ( | const subview< eT > & | X | ) | [inline, inherited] |
in-place matrix subtraction (using a submatrix on the right-hand-side)
Definition at line 782 of file Mat_meat.hpp.
00783 { 00784 arma_extra_debug_sigprint(); 00785 00786 subview<eT>::minus_inplace(*this, X); 00787 return *this; 00788 }
const Mat< eT > & Mat< eT >::operator*= | ( | const subview< eT > & | X | ) | [inline, inherited] |
in-place matrix mutiplication (using a submatrix on the right-hand-side)
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 796 of file Mat_meat.hpp.
References glue_times::apply_inplace().
00797 { 00798 arma_extra_debug_sigprint(); 00799 00800 glue_times::apply_inplace(*this, X); 00801 return *this; 00802 }
const Mat< eT > & Mat< eT >::operator%= | ( | const subview< eT > & | X | ) | [inline, inherited] |
in-place element-wise matrix mutiplication (using a submatrix on the right-hand-side)
Definition at line 810 of file Mat_meat.hpp.
00811 { 00812 arma_extra_debug_sigprint(); 00813 00814 subview<eT>::schur_inplace(*this, X); 00815 return *this; 00816 }
const Mat< eT > & Mat< eT >::operator/= | ( | const subview< eT > & | X | ) | [inline, inherited] |
in-place element-wise matrix division (using a submatrix on the right-hand-side)
Definition at line 824 of file Mat_meat.hpp.
00825 { 00826 arma_extra_debug_sigprint(); 00827 00828 subview<eT>::div_inplace(*this, X); 00829 return *this; 00830 }
Mat< eT >::Mat | ( | const subview_cube< eT > & | X | ) | [inline, inherited] |
construct a matrix from a subview_cube instance
Definition at line 837 of file Mat_meat.hpp.
References Mat< eT >::operator=().
const Mat< eT > & Mat< eT >::operator= | ( | const subview_cube< eT > & | X | ) | [inline, inherited] |
construct a matrix from a subview_cube instance
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 856 of file Mat_meat.hpp.
00857 { 00858 arma_extra_debug_sigprint(); 00859 00860 subview_cube<eT>::extract(*this, X); 00861 return *this; 00862 }
const Mat< eT > & Mat< eT >::operator+= | ( | const subview_cube< eT > & | X | ) | [inline, inherited] |
in-place matrix addition (using a single-slice subcube on the right-hand-side)
Definition at line 870 of file Mat_meat.hpp.
00871 { 00872 arma_extra_debug_sigprint(); 00873 00874 subview_cube<eT>::plus_inplace(*this, X); 00875 return *this; 00876 }
const Mat< eT > & Mat< eT >::operator-= | ( | const subview_cube< eT > & | X | ) | [inline, inherited] |
in-place matrix subtraction (using a single-slice subcube on the right-hand-side)
Definition at line 884 of file Mat_meat.hpp.
00885 { 00886 arma_extra_debug_sigprint(); 00887 00888 subview_cube<eT>::minus_inplace(*this, X); 00889 return *this; 00890 }
const Mat< eT > & Mat< eT >::operator*= | ( | const subview_cube< eT > & | X | ) | [inline, inherited] |
in-place matrix mutiplication (using a single-slice subcube on the right-hand-side)
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 898 of file Mat_meat.hpp.
References glue_times::apply_inplace().
00899 { 00900 arma_extra_debug_sigprint(); 00901 00902 const Mat<eT> tmp(X); 00903 glue_times::apply_inplace(*this, tmp); 00904 return *this; 00905 }
const Mat< eT > & Mat< eT >::operator%= | ( | const subview_cube< eT > & | X | ) | [inline, inherited] |
in-place element-wise matrix mutiplication (using a single-slice subcube on the right-hand-side)
Definition at line 913 of file Mat_meat.hpp.
00914 { 00915 arma_extra_debug_sigprint(); 00916 00917 subview_cube<eT>::schur_inplace(*this, X); 00918 return *this; 00919 }
const Mat< eT > & Mat< eT >::operator/= | ( | const subview_cube< eT > & | X | ) | [inline, inherited] |
in-place element-wise matrix division (using a single-slice subcube on the right-hand-side)
Definition at line 927 of file Mat_meat.hpp.
00928 { 00929 arma_extra_debug_sigprint(); 00930 00931 subview_cube<eT>::div_inplace(*this, X); 00932 return *this; 00933 }
construct a matrix from diagview (e.g. construct a matrix from a delayed diag operation)
Definition at line 940 of file Mat_meat.hpp.
References Mat< eT >::operator=().
const Mat< eT > & Mat< eT >::operator= | ( | const diagview< eT > & | X | ) | [inline, inherited] |
construct a matrix from diagview (e.g. construct a matrix from a delayed diag operation)
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 959 of file Mat_meat.hpp.
00960 { 00961 arma_extra_debug_sigprint(); 00962 00963 diagview<eT>::extract(*this, X); 00964 return *this; 00965 }
const Mat< eT > & Mat< eT >::operator+= | ( | const diagview< eT > & | X | ) | [inline, inherited] |
in-place matrix addition (using a diagview on the right-hand-side)
Definition at line 973 of file Mat_meat.hpp.
00974 { 00975 arma_extra_debug_sigprint(); 00976 00977 diagview<eT>::plus_inplace(*this, X); 00978 return *this; 00979 }
const Mat< eT > & Mat< eT >::operator-= | ( | const diagview< eT > & | X | ) | [inline, inherited] |
in-place matrix subtraction (using a diagview on the right-hand-side)
Definition at line 986 of file Mat_meat.hpp.
00987 { 00988 arma_extra_debug_sigprint(); 00989 00990 diagview<eT>::minus_inplace(*this, X); 00991 return *this; 00992 }
const Mat< eT > & Mat< eT >::operator*= | ( | const diagview< eT > & | X | ) | [inline, inherited] |
in-place matrix mutiplication (using a diagview on the right-hand-side)
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 1000 of file Mat_meat.hpp.
References glue_times::apply_inplace().
01001 { 01002 arma_extra_debug_sigprint(); 01003 01004 glue_times::apply_inplace(*this, X); 01005 return *this; 01006 }
const Mat< eT > & Mat< eT >::operator%= | ( | const diagview< eT > & | X | ) | [inline, inherited] |
in-place element-wise matrix mutiplication (using a diagview on the right-hand-side)
Definition at line 1014 of file Mat_meat.hpp.
01015 { 01016 arma_extra_debug_sigprint(); 01017 01018 diagview<eT>::schur_inplace(*this, X); 01019 return *this; 01020 }
const Mat< eT > & Mat< eT >::operator/= | ( | const diagview< eT > & | X | ) | [inline, inherited] |
in-place element-wise matrix division (using a diagview on the right-hand-side)
Definition at line 1028 of file Mat_meat.hpp.
01029 { 01030 arma_extra_debug_sigprint(); 01031 01032 diagview<eT>::div_inplace(*this, X); 01033 return *this; 01034 }
arma_inline subview_row< eT > Mat< eT >::row | ( | const u32 | row_num | ) | [inline, inherited] |
creation of subview (row vector)
Reimplemented in Col< eT >.
Definition at line 1042 of file Mat_meat.hpp.
References Mat< eT >::n_rows.
Referenced by op_shuffle::apply(), op_flipud::apply(), Mat< eT >::init(), diskio::load_arma_ascii(), diskio::load_pgm_binary(), diskio::load_ppm_binary(), diskio::load_raw_ascii(), diskio::load_std_string(), diskio::save_arma_ascii(), diskio::save_pgm_binary(), diskio::save_ppm_binary(), diskio::save_raw_ascii(), diskio::save_std_string(), and Mat< eT >::swap_cols().
01043 { 01044 arma_extra_debug_sigprint(); 01045 01046 arma_debug_check( row_num >= n_rows, "Mat::row(): row out of bounds" ); 01047 01048 return subview_row<eT>(*this, row_num); 01049 }
arma_inline const subview_row< eT > Mat< eT >::row | ( | const u32 | row_num | ) | const [inline, inherited] |
creation of subview (row vector)
Reimplemented in Col< eT >.
Definition at line 1057 of file Mat_meat.hpp.
References Mat< eT >::n_rows.
01058 { 01059 arma_extra_debug_sigprint(); 01060 01061 arma_debug_check( row_num >= n_rows, "Mat::row(): row out of bounds" ); 01062 01063 return subview_row<eT>(*this, row_num); 01064 }
arma_inline subview_col< eT > Mat< eT >::col | ( | const u32 | col_num | ) | [inline, inherited] |
creation of subview (column vector)
Reimplemented in Row< eT >.
Definition at line 1072 of file Mat_meat.hpp.
References Mat< eT >::n_cols.
Referenced by op_shuffle::apply(), op_fliplr::apply(), Mat< eT >::init(), diskio::load_arma_ascii(), diskio::load_pgm_binary(), diskio::load_ppm_binary(), diskio::load_raw_ascii(), diskio::load_std_string(), diskio::save_arma_ascii(), diskio::save_pgm_binary(), diskio::save_ppm_binary(), diskio::save_raw_ascii(), diskio::save_std_string(), and Mat< eT >::swap_rows().
01073 { 01074 arma_extra_debug_sigprint(); 01075 01076 arma_debug_check( col_num >= n_cols, "Mat::col(): out of bounds"); 01077 01078 return subview_col<eT>(*this, col_num); 01079 }
arma_inline const subview_col< eT > Mat< eT >::col | ( | const u32 | col_num | ) | const [inline, inherited] |
creation of subview (column vector)
Reimplemented in Row< eT >.
Definition at line 1087 of file Mat_meat.hpp.
References Mat< eT >::n_cols.
01088 { 01089 arma_extra_debug_sigprint(); 01090 01091 arma_debug_check( col_num >= n_cols, "Mat::col(): out of bounds"); 01092 01093 return subview_col<eT>(*this, col_num); 01094 }
arma_inline subview< eT > Mat< eT >::rows | ( | const u32 | in_row1, | |
const u32 | in_row2 | |||
) | [inline, inherited] |
creation of subview (submatrix comprised of specified row vectors)
Reimplemented in Col< eT >.
Definition at line 1102 of file Mat_meat.hpp.
References Mat< eT >::n_cols, and Mat< eT >::n_rows.
Referenced by op_find::apply().
01103 { 01104 arma_extra_debug_sigprint(); 01105 01106 arma_debug_check 01107 ( 01108 (in_row1 > in_row2) || (in_row2 >= n_rows), 01109 "Mat::rows(): indices out of bounds or incorrectly used" 01110 ); 01111 01112 return subview<eT>(*this, in_row1, 0, in_row2, ((n_cols>0) ? n_cols-1 : 0) ); 01113 }
arma_inline const subview< eT > Mat< eT >::rows | ( | const u32 | in_row1, | |
const u32 | in_row2 | |||
) | const [inline, inherited] |
creation of subview (submatrix comprised of specified row vectors)
Reimplemented in Col< eT >.
Definition at line 1121 of file Mat_meat.hpp.
References Mat< eT >::n_cols, and Mat< eT >::n_rows.
01122 { 01123 arma_extra_debug_sigprint(); 01124 01125 arma_debug_check 01126 ( 01127 (in_row1 > in_row2) || (in_row2 >= n_rows), 01128 "Mat::rows(): indices out of bounds or incorrectly used" 01129 ); 01130 01131 return subview<eT>(*this, in_row1, 0, in_row2, ((n_cols>0) ? n_cols-1 : 0) ); 01132 }
arma_inline subview< eT > Mat< eT >::cols | ( | const u32 | in_col1, | |
const u32 | in_col2 | |||
) | [inline, inherited] |
creation of subview (submatrix comprised of specified column vectors)
Reimplemented in Row< eT >.
Definition at line 1140 of file Mat_meat.hpp.
References Mat< eT >::n_cols, and Mat< eT >::n_rows.
Referenced by op_pinv::direct_pinv(), and op_princomp::direct_princomp().
01141 { 01142 arma_extra_debug_sigprint(); 01143 01144 arma_debug_check 01145 ( 01146 (in_col1 > in_col2) || (in_col2 >= n_cols), 01147 "Mat::cols(): indices out of bounds or incorrectly used" 01148 ); 01149 01150 return subview<eT>(*this, 0, in_col1, ((n_rows>0) ? n_rows-1 : 0), in_col2); 01151 }
arma_inline const subview< eT > Mat< eT >::cols | ( | const u32 | in_col1, | |
const u32 | in_col2 | |||
) | const [inline, inherited] |
creation of subview (submatrix comprised of specified column vectors)
Reimplemented in Row< eT >.
Definition at line 1159 of file Mat_meat.hpp.
References Mat< eT >::n_cols, and Mat< eT >::n_rows.
01160 { 01161 arma_extra_debug_sigprint(); 01162 01163 arma_debug_check 01164 ( 01165 (in_col1 > in_col2) || (in_col2 >= n_cols), 01166 "Mat::cols(): indices out of bounds or incorrectly used" 01167 ); 01168 01169 return subview<eT>(*this, 0, in_col1, ((n_rows>0) ? n_rows-1 : 0), in_col2); 01170 }
arma_inline subview< eT > Mat< eT >::submat | ( | const u32 | in_row1, | |
const u32 | in_col1, | |||
const u32 | in_row2, | |||
const u32 | in_col2 | |||
) | [inline, inherited] |
creation of subview (submatrix)
Definition at line 1178 of file Mat_meat.hpp.
References Mat< eT >::n_cols, and Mat< eT >::n_rows.
Referenced by op_repmat::apply(), glue_join::apply(), and glue_kron::direct_kron().
01179 { 01180 arma_extra_debug_sigprint(); 01181 01182 arma_debug_check 01183 ( 01184 (in_row1 > in_row2) || (in_col1 > in_col2) || (in_row2 >= n_rows) || (in_col2 >= n_cols), 01185 "Mat::submat(): indices out of bounds or incorrectly used" 01186 ); 01187 01188 return subview<eT>(*this, in_row1, in_col1, in_row2, in_col2); 01189 }
arma_inline const subview< eT > Mat< eT >::submat | ( | const u32 | in_row1, | |
const u32 | in_col1, | |||
const u32 | in_row2, | |||
const u32 | in_col2 | |||
) | const [inline, inherited] |
creation of subview (generic submatrix)
Definition at line 1197 of file Mat_meat.hpp.
References Mat< eT >::n_cols, and Mat< eT >::n_rows.
01198 { 01199 arma_extra_debug_sigprint(); 01200 01201 arma_debug_check 01202 ( 01203 (in_row1 > in_row2) || (in_col1 > in_col2) || (in_row2 >= n_rows) || (in_col2 >= n_cols), 01204 "Mat::submat(): indices out of bounds or incorrectly used" 01205 ); 01206 01207 return subview<eT>(*this, in_row1, in_col1, in_row2, in_col2); 01208 }
arma_inline diagview< eT > Mat< eT >::diag | ( | const s32 | in_id = 0 |
) | [inline, inherited] |
creation of diagview (diagonal)
Definition at line 1216 of file Mat_meat.hpp.
References min(), Mat< eT >::n_cols, and Mat< eT >::n_rows.
Referenced by op_diagvec::apply().
01217 { 01218 arma_extra_debug_sigprint(); 01219 01220 const u32 row_offset = (in_id < 0) ? -in_id : 0; 01221 const u32 col_offset = (in_id > 0) ? in_id : 0; 01222 01223 arma_debug_check 01224 ( 01225 (row_offset >= n_rows) || (col_offset >= n_cols), 01226 "Mat::diag(): requested diagonal out of bounds" 01227 ); 01228 01229 const u32 len = (std::min)(n_rows - row_offset, n_cols - col_offset); 01230 01231 return diagview<eT>(*this, row_offset, col_offset, len); 01232 }
arma_inline const diagview< eT > Mat< eT >::diag | ( | const s32 | in_id = 0 |
) | const [inline, inherited] |
creation of diagview (diagonal)
Definition at line 1240 of file Mat_meat.hpp.
References min(), Mat< eT >::n_cols, and Mat< eT >::n_rows.
01241 { 01242 arma_extra_debug_sigprint(); 01243 01244 const u32 row_offset = (in_id < 0) ? -in_id : 0; 01245 const u32 col_offset = (in_id > 0) ? in_id : 0; 01246 01247 arma_debug_check 01248 ( 01249 (row_offset >= n_rows) || (col_offset >= n_cols), 01250 "Mat::diag(): requested diagonal out of bounds" 01251 ); 01252 01253 01254 const u32 len = (std::min)(n_rows - row_offset, n_cols - col_offset); 01255 01256 return diagview<eT>(*this, row_offset, col_offset, len); 01257 }
void Mat< eT >::swap_rows | ( | const u32 | in_row1, | |
const u32 | in_row2 | |||
) | [inline, inherited] |
Definition at line 1264 of file Mat_meat.hpp.
References Mat< eT >::col(), Mat< eT >::mem, Mat< eT >::n_cols, Mat< eT >::n_rows, and access::rw().
Referenced by op_shuffle::apply(), op_flipud::apply(), and auxlib::lu().
01265 { 01266 arma_extra_debug_sigprint(); 01267 01268 arma_debug_check 01269 ( 01270 (in_row1 >= n_rows) || (in_row2 >= n_rows), 01271 "Mat::swap_rows(): out of bounds" 01272 ); 01273 01274 for(u32 col=0; col<n_cols; ++col) 01275 { 01276 const u32 offset = col*n_rows; 01277 const u32 pos1 = in_row1 + offset; 01278 const u32 pos2 = in_row2 + offset; 01279 01280 const eT tmp = mem[pos1]; 01281 access::rw(mem[pos1]) = mem[pos2]; 01282 access::rw(mem[pos2]) = tmp; 01283 } 01284 01285 }
void Mat< eT >::swap_cols | ( | const u32 | in_col1, | |
const u32 | in_col2 | |||
) | [inline, inherited] |
Definition at line 1292 of file Mat_meat.hpp.
References Mat< eT >::colptr(), Mat< eT >::n_cols, Mat< eT >::n_rows, and Mat< eT >::row().
Referenced by op_shuffle::apply(), and op_fliplr::apply().
01293 { 01294 arma_extra_debug_sigprint(); 01295 01296 arma_debug_check 01297 ( 01298 (in_col1 >= n_cols) || (in_col2 >= n_cols), 01299 "Mat::swap_cols(): out of bounds" 01300 ); 01301 01302 eT* ptr1 = colptr(in_col1); 01303 eT* ptr2 = colptr(in_col2); 01304 01305 for(u32 row=0; row<n_rows; ++row) 01306 { 01307 const eT tmp = ptr1[row]; 01308 ptr1[row] = ptr2[row]; 01309 ptr2[row] = tmp; 01310 } 01311 01312 }
Mat< eT >::Mat | ( | const Op< T1, op_type > & | X | ) | [inline, inherited] |
create a matrix from Op, i.e. run the previously delayed unary operations
Definition at line 1320 of file Mat_meat.hpp.
01321 : n_rows(0) 01322 , n_cols(0) 01323 , n_elem(0) 01324 , use_aux_mem(false) 01325 //, mem(0) 01326 , mem(mem) 01327 { 01328 arma_extra_debug_sigprint_this(this); 01329 01330 isnt_same_type<eT, typename T1::elem_type>::check(); 01331 01332 op_type::apply(*this, X); 01333 }
const Mat< eT > & Mat< eT >::operator= | ( | const Op< T1, op_type > & | X | ) | [inline, inherited] |
create a matrix from Op, i.e. run the previously delayed unary operations
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 1342 of file Mat_meat.hpp.
01343 { 01344 arma_extra_debug_sigprint(); 01345 01346 isnt_same_type<eT, typename T1::elem_type>::check(); 01347 01348 op_type::apply(*this, X); 01349 01350 return *this; 01351 }
const Mat< eT > & Mat< eT >::operator+= | ( | const Op< T1, op_type > & | X | ) | [inline, inherited] |
in-place matrix addition, with the right-hand-side operand having delayed operations
Definition at line 1360 of file Mat_meat.hpp.
01361 { 01362 arma_extra_debug_sigprint(); 01363 01364 isnt_same_type<eT, typename T1::elem_type>::check(); 01365 01366 const Mat<eT> m(X); 01367 01368 return (*this).operator+=(m); 01369 }
const Mat< eT > & Mat< eT >::operator-= | ( | const Op< T1, op_type > & | X | ) | [inline, inherited] |
in-place matrix subtraction, with the right-hand-side operand having delayed operations
Definition at line 1378 of file Mat_meat.hpp.
01379 { 01380 arma_extra_debug_sigprint(); 01381 01382 isnt_same_type<eT, typename T1::elem_type>::check(); 01383 01384 const Mat<eT> m(X); 01385 01386 return (*this).operator-=(m); 01387 }
const Mat< eT > & Mat< eT >::operator*= | ( | const Op< T1, op_type > & | X | ) | [inline, inherited] |
in-place matrix multiplication, with the right-hand-side operand having delayed operations
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 1396 of file Mat_meat.hpp.
References glue_times::apply_inplace().
01397 { 01398 arma_extra_debug_sigprint(); 01399 01400 isnt_same_type<eT, typename T1::elem_type>::check(); 01401 01402 glue_times::apply_inplace(*this, X); 01403 01404 return *this; 01405 }
const Mat< eT > & Mat< eT >::operator%= | ( | const Op< T1, op_type > & | X | ) | [inline, inherited] |
in-place matrix element-wise multiplication, with the right-hand-side operand having delayed operations
Definition at line 1414 of file Mat_meat.hpp.
01415 { 01416 arma_extra_debug_sigprint(); 01417 01418 isnt_same_type<eT, typename T1::elem_type>::check(); 01419 01420 const Mat<eT> m(X); 01421 01422 return (*this).operator%=(m); 01423 }
const Mat< eT > & Mat< eT >::operator/= | ( | const Op< T1, op_type > & | X | ) | [inline, inherited] |
in-place matrix element-wise division, with the right-hand-side operand having delayed operations
Definition at line 1432 of file Mat_meat.hpp.
01433 { 01434 arma_extra_debug_sigprint(); 01435 01436 isnt_same_type<eT, typename T1::elem_type>::check(); 01437 01438 const Mat<eT> m(X); 01439 01440 return (*this).operator/=(m); 01441 }
Mat< eT >::Mat | ( | const eOp< T1, eop_type > & | X | ) | [inline, inherited] |
create a matrix from eOp, i.e. run the previously delayed unary operations
Definition at line 1449 of file Mat_meat.hpp.
01450 : n_rows(0) 01451 , n_cols(0) 01452 , n_elem(0) 01453 , use_aux_mem(false) 01454 //, mem(0) 01455 , mem(mem) 01456 { 01457 arma_extra_debug_sigprint_this(this); 01458 01459 isnt_same_type<eT, typename T1::elem_type>::check(); 01460 01461 eop_type::apply(*this, X); 01462 }
const Mat< eT > & Mat< eT >::operator= | ( | const eOp< T1, eop_type > & | X | ) | [inline, inherited] |
create a matrix from eOp, i.e. run the previously delayed unary operations
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 1471 of file Mat_meat.hpp.
01472 { 01473 arma_extra_debug_sigprint(); 01474 01475 isnt_same_type<eT, typename T1::elem_type>::check(); 01476 01477 eop_type::apply(*this, X); 01478 01479 return *this; 01480 }
const Mat< eT > & Mat< eT >::operator+= | ( | const eOp< T1, eop_type > & | X | ) | [inline, inherited] |
Definition at line 1488 of file Mat_meat.hpp.
01489 { 01490 arma_extra_debug_sigprint(); 01491 01492 isnt_same_type<eT, typename T1::elem_type>::check(); 01493 01494 eop_type::apply_inplace_plus(*this, X); 01495 01496 return *this; 01497 }
const Mat< eT > & Mat< eT >::operator-= | ( | const eOp< T1, eop_type > & | X | ) | [inline, inherited] |
Definition at line 1505 of file Mat_meat.hpp.
01506 { 01507 arma_extra_debug_sigprint(); 01508 01509 isnt_same_type<eT, typename T1::elem_type>::check(); 01510 01511 eop_type::apply_inplace_minus(*this, X); 01512 01513 return *this; 01514 }
const Mat< eT > & Mat< eT >::operator*= | ( | const eOp< T1, eop_type > & | X | ) | [inline, inherited] |
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 1522 of file Mat_meat.hpp.
References glue_times::apply_inplace().
01523 { 01524 arma_extra_debug_sigprint(); 01525 01526 isnt_same_type<eT, typename T1::elem_type>::check(); 01527 01528 glue_times::apply_inplace(*this, X); 01529 01530 return *this; 01531 }
const Mat< eT > & Mat< eT >::operator%= | ( | const eOp< T1, eop_type > & | X | ) | [inline, inherited] |
Definition at line 1539 of file Mat_meat.hpp.
01540 { 01541 arma_extra_debug_sigprint(); 01542 01543 isnt_same_type<eT, typename T1::elem_type>::check(); 01544 01545 eop_type::apply_inplace_schur(*this, X); 01546 01547 return *this; 01548 }
const Mat< eT > & Mat< eT >::operator/= | ( | const eOp< T1, eop_type > & | X | ) | [inline, inherited] |
Definition at line 1556 of file Mat_meat.hpp.
01557 { 01558 arma_extra_debug_sigprint(); 01559 01560 isnt_same_type<eT, typename T1::elem_type>::check(); 01561 01562 eop_type::apply_inplace_div(*this, X); 01563 01564 return *this; 01565 }
Mat< eT >::Mat | ( | const mtOp< eT, T1, op_type > & | X | ) | [inline, inherited] |
EXPERIMENTAL.
Definition at line 1573 of file Mat_meat.hpp.
const Mat< eT > & Mat< eT >::operator= | ( | const mtOp< eT, T1, op_type > & | X | ) | [inline, inherited] |
EXPERIMENTAL.
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 1593 of file Mat_meat.hpp.
const Mat< eT > & Mat< eT >::operator+= | ( | const mtOp< eT, T1, op_type > & | X | ) | [inline, inherited] |
EXPERIMENTAL.
Definition at line 1609 of file Mat_meat.hpp.
01610 { 01611 arma_extra_debug_sigprint(); 01612 01613 const Mat<eT> m(X); 01614 01615 return (*this).operator+=(m); 01616 }
const Mat< eT > & Mat< eT >::operator-= | ( | const mtOp< eT, T1, op_type > & | X | ) | [inline, inherited] |
EXPERIMENTAL.
Definition at line 1625 of file Mat_meat.hpp.
01626 { 01627 arma_extra_debug_sigprint(); 01628 01629 const Mat<eT> m(X); 01630 01631 return (*this).operator-=(m); 01632 }
const Mat< eT > & Mat< eT >::operator*= | ( | const mtOp< eT, T1, op_type > & | X | ) | [inline, inherited] |
EXPERIMENTAL.
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 1641 of file Mat_meat.hpp.
01642 { 01643 arma_extra_debug_sigprint(); 01644 01645 const Mat<eT> m(X); 01646 01647 return (*this).operator*=(m); 01648 }
const Mat< eT > & Mat< eT >::operator%= | ( | const mtOp< eT, T1, op_type > & | X | ) | [inline, inherited] |
EXPERIMENTAL.
Definition at line 1657 of file Mat_meat.hpp.
01658 { 01659 arma_extra_debug_sigprint(); 01660 01661 const Mat<eT> m(X); 01662 01663 return (*this).operator%=(m); 01664 }
const Mat< eT > & Mat< eT >::operator/= | ( | const mtOp< eT, T1, op_type > & | X | ) | [inline, inherited] |
EXPERIMENTAL.
Definition at line 1673 of file Mat_meat.hpp.
01674 { 01675 arma_extra_debug_sigprint(); 01676 01677 const Mat<eT> m(X); 01678 01679 return (*this).operator/=(m); 01680 }
Mat< eT >::Mat | ( | const Glue< T1, T2, glue_type > & | X | ) | [inline, inherited] |
create a matrix from Glue, i.e. run the previously delayed binary operations
Definition at line 1688 of file Mat_meat.hpp.
01689 : n_rows(0) 01690 , n_cols(0) 01691 , n_elem(0) 01692 , use_aux_mem(false) 01693 //, mem(0) 01694 , mem(mem) 01695 { 01696 arma_extra_debug_sigprint_this(this); 01697 01698 isnt_same_type<eT, typename T1::elem_type>::check(); 01699 isnt_same_type<eT, typename T2::elem_type>::check(); 01700 01701 glue_type::apply(*this, X); 01702 }
const Mat< eT > & Mat< eT >::operator= | ( | const Glue< T1, T2, glue_type > & | X | ) | [inline, inherited] |
create a matrix from Glue, i.e. run the previously delayed binary operations
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 1711 of file Mat_meat.hpp.
01712 { 01713 arma_extra_debug_sigprint(); 01714 01715 isnt_same_type<eT, typename T1::elem_type>::check(); 01716 isnt_same_type<eT, typename T2::elem_type>::check(); 01717 01718 glue_type::apply(*this, X); 01719 01720 return *this; 01721 }
const Mat< eT > & Mat< eT >::operator+= | ( | const Glue< T1, T2, glue_type > & | X | ) | [inline, inherited] |
in-place matrix addition, with the right-hand-side operands having delayed operations
Definition at line 1730 of file Mat_meat.hpp.
01731 { 01732 arma_extra_debug_sigprint(); 01733 01734 isnt_same_type<eT, typename T1::elem_type>::check(); 01735 isnt_same_type<eT, typename T2::elem_type>::check(); 01736 01737 const Mat<eT> m(X); 01738 01739 return (*this).operator+=(m); 01740 }
const Mat< eT > & Mat< eT >::operator-= | ( | const Glue< T1, T2, glue_type > & | X | ) | [inline, inherited] |
in-place matrix subtraction, with the right-hand-side operands having delayed operations
Definition at line 1749 of file Mat_meat.hpp.
01750 { 01751 arma_extra_debug_sigprint(); 01752 01753 isnt_same_type<eT, typename T1::elem_type>::check(); 01754 isnt_same_type<eT, typename T2::elem_type>::check(); 01755 01756 const Mat<eT> m(X); 01757 01758 return (*this).operator-=(m); 01759 }
const Mat< eT > & Mat< 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 in Col< eT >, and Row< eT >.
Definition at line 1768 of file Mat_meat.hpp.
References glue_times::apply_inplace().
01769 { 01770 arma_extra_debug_sigprint(); 01771 01772 isnt_same_type<eT, typename T1::elem_type>::check(); 01773 isnt_same_type<eT, typename T2::elem_type>::check(); 01774 01775 glue_times::apply_inplace(*this, X); 01776 01777 return *this; 01778 }
const Mat< eT > & Mat< eT >::operator%= | ( | const Glue< T1, T2, glue_type > & | X | ) | [inline, inherited] |
in-place matrix element-wise multiplication, with the right-hand-side operands having delayed operations
Definition at line 1787 of file Mat_meat.hpp.
01788 { 01789 arma_extra_debug_sigprint(); 01790 01791 isnt_same_type<eT, typename T1::elem_type>::check(); 01792 isnt_same_type<eT, typename T2::elem_type>::check(); 01793 01794 const Mat<eT> m(X); 01795 01796 return (*this).operator%=(m); 01797 }
const Mat< eT > & Mat< eT >::operator/= | ( | const Glue< T1, T2, glue_type > & | X | ) | [inline, inherited] |
in-place matrix element-wise division, with the right-hand-side operands having delayed operations
Definition at line 1806 of file Mat_meat.hpp.
01807 { 01808 arma_extra_debug_sigprint(); 01809 01810 isnt_same_type<eT, typename T1::elem_type>::check(); 01811 isnt_same_type<eT, typename T2::elem_type>::check(); 01812 01813 const Mat<eT> m(X); 01814 01815 return (*this).operator/=(m); 01816 }
const Mat< eT > & Mat< eT >::operator+= | ( | const Glue< T1, T2, glue_times > & | X | ) | [inline, inherited] |
Definition at line 1824 of file Mat_meat.hpp.
References glue_times::apply_inplace_plus().
01825 { 01826 arma_extra_debug_sigprint(); 01827 01828 glue_times::apply_inplace_plus(*this, X, s32(+1)); 01829 01830 return *this; 01831 }
const Mat< eT > & Mat< eT >::operator-= | ( | const Glue< T1, T2, glue_times > & | X | ) | [inline, inherited] |
Definition at line 1839 of file Mat_meat.hpp.
References glue_times::apply_inplace_plus().
01840 { 01841 arma_extra_debug_sigprint(); 01842 01843 glue_times::apply_inplace_plus(*this, X, s32(-1)); 01844 01845 return *this; 01846 }
Mat< eT >::Mat | ( | const eGlue< T1, T2, eglue_type > & | X | ) | [inline, inherited] |
create a matrix from eGlue, i.e. run the previously delayed binary operations
Definition at line 1854 of file Mat_meat.hpp.
01855 : n_rows(0) 01856 , n_cols(0) 01857 , n_elem(0) 01858 , use_aux_mem(false) 01859 //, mem(0) 01860 , mem(mem) 01861 { 01862 arma_extra_debug_sigprint_this(this); 01863 01864 isnt_same_type<eT, typename T1::elem_type>::check(); 01865 isnt_same_type<eT, typename T2::elem_type>::check(); 01866 01867 eglue_type::apply(*this, X); 01868 }
const Mat< eT > & Mat< 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 in Col< eT >, and Row< eT >.
Definition at line 1877 of file Mat_meat.hpp.
01878 { 01879 arma_extra_debug_sigprint(); 01880 01881 isnt_same_type<eT, typename T1::elem_type>::check(); 01882 isnt_same_type<eT, typename T2::elem_type>::check(); 01883 01884 eglue_type::apply(*this, X); 01885 01886 return *this; 01887 }
const Mat< eT > & Mat< eT >::operator+= | ( | const eGlue< T1, T2, eglue_type > & | X | ) | [inline, inherited] |
in-place matrix addition, with the right-hand-side operands having delayed operations
Definition at line 1896 of file Mat_meat.hpp.
01897 { 01898 arma_extra_debug_sigprint(); 01899 01900 isnt_same_type<eT, typename T1::elem_type>::check(); 01901 isnt_same_type<eT, typename T2::elem_type>::check(); 01902 01903 eglue_type::apply_inplace_plus(*this, X); 01904 01905 return *this; 01906 }
const Mat< eT > & Mat< eT >::operator-= | ( | const eGlue< T1, T2, eglue_type > & | X | ) | [inline, inherited] |
in-place matrix subtraction, with the right-hand-side operands having delayed operations
Definition at line 1915 of file Mat_meat.hpp.
01916 { 01917 arma_extra_debug_sigprint(); 01918 01919 isnt_same_type<eT, typename T1::elem_type>::check(); 01920 isnt_same_type<eT, typename T2::elem_type>::check(); 01921 01922 eglue_type::apply_inplace_minus(*this, X); 01923 01924 return *this; 01925 }
const Mat< eT > & Mat< eT >::operator*= | ( | const eGlue< T1, T2, eglue_type > & | X | ) | [inline, inherited] |
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 1933 of file Mat_meat.hpp.
References glue_times::apply_inplace().
01934 { 01935 arma_extra_debug_sigprint(); 01936 01937 isnt_same_type<eT, typename T1::elem_type>::check(); 01938 isnt_same_type<eT, typename T2::elem_type>::check(); 01939 01940 glue_times::apply_inplace(*this, X); 01941 return *this; 01942 }
const Mat< eT > & Mat< eT >::operator%= | ( | const eGlue< T1, T2, eglue_type > & | X | ) | [inline, inherited] |
Definition at line 1950 of file Mat_meat.hpp.
01951 { 01952 arma_extra_debug_sigprint(); 01953 01954 isnt_same_type<eT, typename T1::elem_type>::check(); 01955 isnt_same_type<eT, typename T2::elem_type>::check(); 01956 01957 eglue_type::apply_inplace_schur(*this, X); 01958 return *this; 01959 }
const Mat< eT > & Mat< eT >::operator/= | ( | const eGlue< T1, T2, eglue_type > & | X | ) | [inline, inherited] |
Definition at line 1967 of file Mat_meat.hpp.
01968 { 01969 arma_extra_debug_sigprint(); 01970 01971 isnt_same_type<eT, typename T1::elem_type>::check(); 01972 isnt_same_type<eT, typename T2::elem_type>::check(); 01973 01974 eglue_type::apply_inplace_div(*this, X); 01975 return *this; 01976 }
Mat< eT >::Mat | ( | const mtGlue< eT, T1, T2, glue_type > & | X | ) | [inline, inherited] |
EXPERIMENTAL: create a matrix from mtGlue, i.e. run the previously delayed binary operations.
Definition at line 1984 of file Mat_meat.hpp.
const Mat< eT > & Mat< eT >::operator= | ( | const mtGlue< eT, T1, T2, glue_type > & | X | ) | [inline, inherited] |
EXPERIMENTAL: create a matrix from Glue, i.e. run the previously delayed binary operations.
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 2004 of file Mat_meat.hpp.
const Mat< eT > & Mat< eT >::operator+= | ( | const mtGlue< eT, T1, T2, glue_type > & | X | ) | [inline, inherited] |
EXPERIMENTAL: in-place matrix addition, with the right-hand-side operands having delayed operations.
Definition at line 2020 of file Mat_meat.hpp.
02021 { 02022 arma_extra_debug_sigprint(); 02023 02024 const Mat<eT> m(X); 02025 02026 return (*this).operator+=(m); 02027 }
const Mat< eT > & Mat< eT >::operator-= | ( | const mtGlue< eT, T1, T2, glue_type > & | X | ) | [inline, inherited] |
EXPERIMENTAL: in-place matrix subtraction, with the right-hand-side operands having delayed operations.
Definition at line 2036 of file Mat_meat.hpp.
02037 { 02038 arma_extra_debug_sigprint(); 02039 02040 const Mat<eT> m(X); 02041 02042 return (*this).operator-=(m); 02043 }
const Mat< eT > & Mat< eT >::operator*= | ( | const mtGlue< eT, T1, T2, glue_type > & | X | ) | [inline, inherited] |
EXPERIMENTAL: in-place matrix multiplications, with the right-hand-side operands having delayed operations.
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 2052 of file Mat_meat.hpp.
References glue_times::apply_inplace().
02053 { 02054 arma_extra_debug_sigprint(); 02055 02056 const Mat<eT> m(X); 02057 02058 glue_times::apply_inplace(*this, m); 02059 02060 return *this; 02061 }
const Mat< eT > & Mat< eT >::operator%= | ( | const mtGlue< eT, T1, T2, glue_type > & | X | ) | [inline, inherited] |
EXPERIMENTAL: in-place matrix element-wise multiplication, with the right-hand-side operands having delayed operations.
Definition at line 2070 of file Mat_meat.hpp.
02071 { 02072 arma_extra_debug_sigprint(); 02073 02074 const Mat<eT> m(X); 02075 02076 return (*this).operator%=(m); 02077 }
const Mat< eT > & Mat< eT >::operator/= | ( | const mtGlue< eT, T1, T2, glue_type > & | X | ) | [inline, inherited] |
EXPERIMENTAL: in-place matrix element-wise division, with the right-hand-side operands having delayed operations.
Definition at line 2086 of file Mat_meat.hpp.
02087 { 02088 arma_extra_debug_sigprint(); 02089 02090 const Mat<eT> m(X); 02091 02092 return (*this).operator/=(m); 02093 }
linear element accessor (treats the matrix as a vector); bounds checking not done when ARMA_NO_DEBUG is defined
Definition at line 2101 of file Mat_meat.hpp.
References Mat< eT >::mem, Mat< eT >::n_elem, and access::rw().
02102 { 02103 arma_debug_check( (i >= n_elem), "Mat::operator(): out of bounds"); 02104 return access::rw(mem[i]); 02105 }
arma_inline eT Mat< eT >::operator() | ( | const u32 | i | ) | const [inline, inherited] |
linear element accessor (treats the matrix as a vector); bounds checking not done when ARMA_NO_DEBUG is defined
Definition at line 2113 of file Mat_meat.hpp.
References Mat< eT >::mem, and Mat< eT >::n_elem.
linear element accessor (treats the matrix as a vector); no bounds check.
Definition at line 2124 of file Mat_meat.hpp.
References Mat< eT >::mem, and access::rw().
02125 { 02126 return access::rw(mem[i]); 02127 }
arma_inline eT Mat< eT >::operator[] | ( | const u32 | i | ) | const [inline, inherited] |
linear element accessor (treats the matrix as a vector); no bounds check
Definition at line 2135 of file Mat_meat.hpp.
References Mat< eT >::mem.
02136 { 02137 return mem[i]; 02138 }
arma_inline eT & Mat< eT >::operator() | ( | const u32 | in_row, | |
const u32 | in_col | |||
) | [inline, inherited] |
element accessor; bounds checking not done when ARMA_NO_DEBUG is defined
Definition at line 2146 of file Mat_meat.hpp.
References Mat< eT >::mem, Mat< eT >::n_cols, Mat< eT >::n_rows, and access::rw().
02147 { 02148 arma_debug_check( ((in_row >= n_rows) || (in_col >= n_cols)), "Mat::operator(): out of bounds"); 02149 return access::rw(mem[in_row + in_col*n_rows]); 02150 }
arma_inline eT Mat< eT >::operator() | ( | const u32 | in_row, | |
const u32 | in_col | |||
) | const [inline, inherited] |
element accessor; bounds checking not done when ARMA_NO_DEBUG is defined
Definition at line 2158 of file Mat_meat.hpp.
References Mat< eT >::mem, Mat< eT >::n_cols, and Mat< eT >::n_rows.
arma_inline eT & Mat< eT >::at | ( | const u32 | in_row, | |
const u32 | in_col | |||
) | [inline, inherited] |
element accessor; no bounds check
Definition at line 2170 of file Mat_meat.hpp.
References Mat< eT >::mem, Mat< eT >::n_rows, and access::rw().
Referenced by accu(), op_var::apply(), op_trans::apply(), op_sum::apply(), op_stddev::apply(), op_sort::apply(), op_reshape::apply(), op_prod::apply(), op_min::apply(), op_median::apply(), op_mean::apply(), op_max::apply(), op_diagmat::apply(), glue_toeplitz::apply(), glue_times_diag::apply(), gemv_arma< do_trans_A, use_alpha, use_beta >::apply(), gemm_mixed_simple< do_trans_A, do_trans_B, use_alpha, use_beta >::apply(), gemm_mixed_cache< do_trans_A, do_trans_B, use_alpha, use_beta >::apply(), gemm_emul_simple< do_trans_A, do_trans_B, use_alpha, use_beta >::apply(), gemm_emul_cache< do_trans_A, do_trans_B, use_alpha, use_beta >::apply(), op_inv::apply_diag(), glue_times::apply_inplace(), eop_core< eop_type >::apply_inplace_div(), eop_core< eop_type >::apply_inplace_minus(), eop_core< eop_type >::apply_inplace_plus(), eop_core< eop_type >::apply_inplace_schur(), op_trans::apply_noalias(), eop_core< eop_type >::apply_proxy(), eop_core< eop_type >::apply_unwrap(), diagmat_proxy_check< Col< eT > >::at(), diagmat_proxy_check< Row< eT > >::at(), diagmat_proxy_check< Mat< eT > >::at(), diagmat_proxy_check< T1 >::at(), auxlib::det(), op_dotext::direct_rowvec_diagmat_colvec(), op_dotext::direct_rowvec_invdiagmat_colvec(), op_dotext::direct_rowvec_mat_colvec(), op_dotext::direct_rowvec_transmat_colvec(), diagview< eT >::div_inplace(), eig_gen(), subview< eT >::extract(), diagview< eT >::extract(), diagview< eT >::fill(), Mat< eT >::init(), auxlib::inv_inplace(), auxlib::inv_noalias(), diskio::load_arma_ascii(), diskio::load_pgm_binary(), diskio::load_ppm_binary(), diskio::load_raw_ascii(), auxlib::log_det(), auxlib::lu(), diagview< eT >::minus_inplace(), diagview< eT >::ones(), operator*(), diagview< eT >::operator=(), diagmat_proxy_check< Col< eT > >::operator[](), diagmat_proxy_check< Row< eT > >::operator[](), diagmat_proxy_check< Mat< eT > >::operator[](), diagmat_proxy_check< T1 >::operator[](), diagview< eT >::plus_inplace(), arma_ostream::print(), prod(), auxlib::qr(), diskio::save_arma_ascii(), diskio::save_pgm_binary(), diskio::save_ppm_binary(), diskio::save_raw_ascii(), diagview< eT >::schur_inplace(), trace(), and diagview< eT >::zeros().
02171 { 02172 return access::rw( mem[in_row + in_col*n_rows] ); 02173 }
arma_inline eT Mat< eT >::at | ( | const u32 | in_row, | |
const u32 | in_col | |||
) | const [inline, inherited] |
element accessor; no bounds check
Definition at line 2181 of file Mat_meat.hpp.
References Mat< eT >::mem, and Mat< eT >::n_rows.
prefix ++
Definition at line 2192 of file Mat_meat.hpp.
References Mat_aux::prefix_pp().
02193 { 02194 Mat_aux::prefix_pp(*this); 02195 return *this; 02196 }
arma_inline void Mat< eT >::operator++ | ( | int | ) | [inline, inherited] |
postfix ++ (must not return the object by reference)
Definition at line 2204 of file Mat_meat.hpp.
References Mat_aux::postfix_pp().
02205 { 02206 Mat_aux::postfix_pp(*this); 02207 }
prefix --
Definition at line 2215 of file Mat_meat.hpp.
References Mat_aux::prefix_mm().
02216 { 02217 Mat_aux::prefix_mm(*this); 02218 return *this; 02219 }
arma_inline void Mat< eT >::operator-- | ( | int | ) | [inline, inherited] |
postfix -- (must not return the object by reference)
Definition at line 2227 of file Mat_meat.hpp.
References Mat_aux::postfix_mm().
02228 { 02229 Mat_aux::postfix_mm(*this); 02230 }
arma_inline bool Mat< eT >::is_vec | ( | ) | const [inline, inherited] |
returns true if the object can be interpreted as a column or row vector
Definition at line 2238 of file Mat_meat.hpp.
References Mat< eT >::n_cols, and Mat< eT >::n_rows.
Referenced by op_shuffle::apply(), op_diagmat::apply(), glue_toeplitz::apply(), glue_conv::apply(), as_scalar_redirect< 3 >::apply(), as_scalar_diag(), op_cor::direct_cor(), glue_cor::direct_cor(), op_cov::direct_cov(), glue_cov::direct_cov(), and running_stat_vec_aux::update_stats().
arma_inline bool Mat< eT >::is_square | ( | ) | const [inline, inherited] |
returns true if the object has the same number of non-zero rows and columnns
Definition at line 2249 of file Mat_meat.hpp.
References Mat< eT >::n_cols, Mat< eT >::n_elem, and Mat< eT >::n_rows.
Referenced by op_inv::apply(), op_diagmat::apply(), op_chol::apply(), and as_scalar_redirect< 3 >::apply().
arma_inline bool Mat< eT >::is_finite | ( | ) | const [inline, inherited] |
returns true if all of the elements are finite
Definition at line 2260 of file Mat_meat.hpp.
References arma_isfinite(), Mat< eT >::mem, and Mat< eT >::n_elem.
Referenced by op_sort::apply().
02261 { 02262 for(u32 i=0; i<n_elem; ++i) 02263 { 02264 if(arma_isfinite(mem[i]) == false) 02265 { 02266 return false; 02267 } 02268 } 02269 02270 return true; 02271 }
returns a pointer to array of eTs for a specified column; no bounds check
Definition at line 2279 of file Mat_meat.hpp.
References Mat< eT >::mem, Mat< eT >::n_rows, and access::rw().
Referenced by op_var::apply(), op_trans::apply(), op_sum::apply(), op_stddev::apply(), op_sort::apply(), op_prod::apply(), op_min::apply(), op_median::apply(), op_mean::apply(), op_max::apply(), glue_toeplitz::apply(), glue_times_diag::apply(), gemv_arma< do_trans_A, use_alpha, use_beta >::apply(), gemm_mixed_simple< do_trans_A, do_trans_B, use_alpha, use_beta >::apply(), gemm_mixed_cache< do_trans_A, do_trans_B, use_alpha, use_beta >::apply(), gemm_emul_simple< do_trans_A, do_trans_B, use_alpha, use_beta >::apply(), gemm_emul_cache< do_trans_A, do_trans_B, use_alpha, use_beta >::apply(), glue_times::apply_inplace(), Mat< eT >::begin_col(), auxlib::chol(), auxlib::det(), op_dotext::direct_rowvec_mat_colvec(), op_dotext::direct_rowvec_transmat_colvec(), subview< eT >::div_inplace(), subview_cube< eT >::div_inplace(), Mat< eT >::end_col(), subview< eT >::extract(), subview_cube< eT >::extract(), auxlib::inv_inplace(), auxlib::inv_noalias(), subview< eT >::minus_inplace(), subview_cube< eT >::minus_inplace(), subview< eT >::plus_inplace(), subview_cube< eT >::plus_inplace(), subview< eT >::schur_inplace(), subview_cube< eT >::schur_inplace(), auxlib::solve_od(), auxlib::solve_ud(), Mat< eT >::swap_cols(), and trace().
02280 { 02281 return & access::rw(mem[in_col*n_rows]); 02282 }
arma_inline const eT * Mat< eT >::colptr | ( | const u32 | in_col | ) | const [inline, inherited] |
returns a pointer to array of eTs for a specified column; no bounds check
Definition at line 2290 of file Mat_meat.hpp.
References Mat< eT >::mem, and Mat< eT >::n_rows.
arma_inline eT * Mat< eT >::memptr | ( | ) | [inline, inherited] |
returns a pointer to array of eTs used by the matrix
Definition at line 2301 of file Mat_meat.hpp.
References Mat< eT >::mem.
Referenced by op_trans2::apply(), op_sort::apply(), op_reshape::apply(), op_rel_noteq::apply(), op_rel_eq::apply(), op_rel_gteq_post::apply(), op_rel_gteq_pre::apply(), op_rel_lteq_post::apply(), op_rel_lteq_pre::apply(), op_rel_gt_post::apply(), op_rel_gt_pre::apply(), op_rel_lt_post::apply(), op_rel_lt_pre::apply(), op_abs::apply(), op_imag::apply(), op_real::apply(), op_diagmat::apply(), glue_toeplitz::apply(), glue_times::apply(), glue_rel_noteq::apply(), glue_rel_eq::apply(), glue_rel_gteq::apply(), glue_rel_lteq::apply(), glue_rel_gt::apply(), glue_rel_lt::apply(), glue_cross::apply(), glue_conv::apply(), gemm< do_trans_A, do_trans_B, use_alpha, use_beta >::apply_blas_type(), eop_core< eop_type >::apply_inplace_div(), eglue_core< eglue_type >::apply_inplace_div(), eop_core< eop_type >::apply_inplace_minus(), eglue_core< eglue_type >::apply_inplace_minus(), glue_times::apply_inplace_plus(), eop_core< eop_type >::apply_inplace_plus(), eglue_core< eglue_type >::apply_inplace_plus(), eop_core< eop_type >::apply_inplace_schur(), eglue_core< eglue_type >::apply_inplace_schur(), op_trans::apply_noalias(), eop_core< eop_type >::apply_proxy(), eglue_core< eglue_type >::apply_proxy(), op_norm_dot::apply_unwrap(), eop_core< eop_type >::apply_unwrap(), eglue_core< eglue_type >::apply_unwrap(), Mat< eT >::begin(), Row< eT >::begin_row(), Col< eT >::begin_row(), subview_cube< eT >::check_overlap(), auxlib::chol(), auxlib::det(), glue_cor::direct_cor(), glue_cov::direct_cov(), diagview< eT >::div_inplace(), auxlib::eig_gen(), auxlib::eig_sym(), Mat< eT >::end(), Row< eT >::end_row(), Col< eT >::end_row(), eps(), subview< eT >::extract(), diagview< eT >::extract(), Mat< eT >::fill(), conv_to< Col< out_eT > >::from(), conv_to< Row< out_eT > >::from(), conv_to< Mat< out_eT > >::from(), op_find::helper(), Mat< eT >::init(), auxlib::inv_inplace(), auxlib::inv_noalias(), linspace(), diskio::load_arma_binary(), auxlib::log_det(), auxlib::lu(), Mat< eT >::Mat(), diagview< eT >::minus_inplace(), Mat< eT >::operator%=(), Mat< eT >::operator*=(), Mat< eT >::operator+=(), Mat< eT >::operator-=(), Mat< eT >::operator/=(), diagview< eT >::plus_inplace(), Mat_aux::postfix_mm(), Mat_aux::postfix_pp(), Mat_aux::prefix_mm(), Mat_aux::prefix_pp(), arma_ostream::print(), prod(), auxlib::qr(), rank(), diagview< eT >::schur_inplace(), auxlib::solve(), auxlib::solve_od(), auxlib::solve_ud(), sort_index(), auxlib::svd(), and running_stat_vec_aux::update_stats().
02302 { 02303 return const_cast<eT*>(mem); 02304 }
arma_inline const eT * Mat< eT >::memptr | ( | ) | const [inline, inherited] |
returns a pointer to array of eTs used by the matrix
Definition at line 2312 of file Mat_meat.hpp.
References Mat< eT >::mem.
02313 { 02314 return mem; 02315 }
void Mat< eT >::print | ( | const std::string | extra_text = "" |
) | const [inline, inherited] |
print contents of the matrix (to the cout stream), optionally preceding with a user specified line of text. the precision and cell width are modified. on return, the stream's flags are restored to their original values.
Definition at line 2326 of file Mat_meat.hpp.
Referenced by Mat< eT >::print(), Mat< eT >::print_trans(), and Mat< eT >::raw_print().
02327 { 02328 arma_extra_debug_sigprint(); 02329 02330 if(extra_text.length() != 0) 02331 { 02332 const std::streamsize orig_width = cout.width(); 02333 02334 cout << extra_text << '\n'; 02335 02336 cout.width(orig_width); 02337 } 02338 02339 arma_ostream::print(cout, *this, true); 02340 }
void Mat< eT >::print | ( | std::ostream & | user_stream, | |
const std::string | extra_text = "" | |||
) | const [inline, inherited] |
print contents of the matrix to a user specified stream, optionally preceding with a user specified line of text. the precision and cell width are modified. on return, the stream's flags are restored to their original values.
Definition at line 2351 of file Mat_meat.hpp.
References Mat< eT >::print().
02352 { 02353 arma_extra_debug_sigprint(); 02354 02355 if(extra_text.length() != 0) 02356 { 02357 const std::streamsize orig_width = user_stream.width(); 02358 02359 user_stream << extra_text << '\n'; 02360 02361 user_stream.width(orig_width); 02362 } 02363 02364 arma_ostream::print(user_stream, *this, true); 02365 }
void Mat< eT >::print_trans | ( | const std::string | extra_text = "" |
) | const [inline, inherited] |
print contents of the transposed version of the matrix (to the cout stream), optionally preceding with a user specified line of text. the precision and cell width are modified. on return, the stream's flags are restored to their original values.
Definition at line 2376 of file Mat_meat.hpp.
References op_trans::apply_noalias(), and Mat< eT >::print().
02377 { 02378 arma_extra_debug_sigprint(); 02379 02380 Mat<eT> tmp; 02381 op_trans::apply_noalias(tmp, *this); 02382 02383 tmp.print(extra_text); 02384 }
void Mat< eT >::print_trans | ( | std::ostream & | user_stream, | |
const std::string | extra_text = "" | |||
) | const [inline, inherited] |
print contents of the transposed version of matrix to a user specified stream, optionally preceding with a user specified line of text. the precision and cell width are modified. on return, the stream's flags are restored to their original values.
Definition at line 2395 of file Mat_meat.hpp.
References op_trans::apply_noalias(), and Mat< eT >::print().
02396 { 02397 arma_extra_debug_sigprint(); 02398 02399 Mat<eT> tmp; 02400 op_trans::apply_noalias(tmp, *this); 02401 02402 tmp.print(user_stream, extra_text); 02403 }
void Mat< eT >::raw_print | ( | const std::string | extra_text = "" |
) | const [inline, inherited] |
print contents of the matrix (to the cout stream), optionally preceding with a user specified line of text. the stream's flags are used as is and are not modified (i.e. the precision and cell width are not modified).
Definition at line 2414 of file Mat_meat.hpp.
References Mat< eT >::print().
Referenced by Mat< eT >::raw_print_trans().
02415 { 02416 arma_extra_debug_sigprint(); 02417 02418 if(extra_text.length() != 0) 02419 { 02420 const std::streamsize orig_width = cout.width(); 02421 02422 cout << extra_text << '\n'; 02423 02424 cout.width(orig_width); 02425 } 02426 02427 arma_ostream::print(cout, *this, false); 02428 }
void Mat< eT >::raw_print | ( | std::ostream & | user_stream, | |
const std::string | extra_text = "" | |||
) | const [inline, inherited] |
print contents of the matrix to a user specified stream, optionally preceding with a user specified line of text. the stream's flags are used as is and are not modified. (i.e. the precision and cell width are not modified).
Definition at line 2439 of file Mat_meat.hpp.
References Mat< eT >::print().
02440 { 02441 arma_extra_debug_sigprint(); 02442 02443 if(extra_text.length() != 0) 02444 { 02445 const std::streamsize orig_width = user_stream.width(); 02446 02447 user_stream << extra_text << '\n'; 02448 02449 user_stream.width(orig_width); 02450 } 02451 02452 arma_ostream::print(user_stream, *this, false); 02453 }
void Mat< eT >::raw_print_trans | ( | const std::string | extra_text = "" |
) | const [inline, inherited] |
print contents of the transposed version of the matrix (to the cout stream), optionally preceding with a user specified line of text. the stream's flags are used as is and are not modified (i.e. the precision and cell width are not modified).
Definition at line 2464 of file Mat_meat.hpp.
References op_trans::apply_noalias(), and Mat< eT >::raw_print().
02465 { 02466 arma_extra_debug_sigprint(); 02467 02468 Mat<eT> tmp; 02469 op_trans::apply_noalias(tmp, *this); 02470 02471 tmp.raw_print(extra_text); 02472 }
void Mat< eT >::raw_print_trans | ( | std::ostream & | user_stream, | |
const std::string | extra_text = "" | |||
) | const [inline, inherited] |
print contents of the transposed version of the matrix to a user specified stream, optionally preceding with a user specified line of text. the stream's flags are used as is and are not modified. (i.e. the precision and cell width are not modified).
Definition at line 2483 of file Mat_meat.hpp.
References op_trans::apply_noalias(), and Mat< eT >::raw_print().
02484 { 02485 arma_extra_debug_sigprint(); 02486 02487 Mat<eT> tmp; 02488 op_trans::apply_noalias(tmp, *this); 02489 02490 tmp.raw_print(user_stream, extra_text); 02491 }
void Mat< eT >::set_size | ( | const u32 | in_rows, | |
const u32 | in_cols | |||
) | [inline, inherited] |
change the matrix to have user specified dimensions (data is not preserved)
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 2499 of file Mat_meat.hpp.
References Mat< eT >::init().
Referenced by op_sum::apply(), op_reshape::apply(), op_repmat::apply(), op_rel_noteq::apply(), op_rel_eq::apply(), op_rel_gteq_post::apply(), op_rel_gteq_pre::apply(), op_rel_lteq_post::apply(), op_rel_lteq_pre::apply(), op_rel_gt_post::apply(), op_rel_gt_pre::apply(), op_rel_lt_post::apply(), op_rel_lt_pre::apply(), op_prod::apply(), op_abs::apply(), op_imag::apply(), op_real::apply(), op_min::apply(), op_median::apply(), op_mean::apply(), op_max::apply(), op_inv::apply(), op_diagmat::apply(), glue_toeplitz::apply(), glue_times_diag::apply(), glue_times::apply(), glue_rel_noteq::apply(), glue_rel_eq::apply(), glue_rel_gteq::apply(), glue_rel_lteq::apply(), glue_rel_gt::apply(), glue_rel_lt::apply(), glue_join::apply(), glue_cross::apply(), glue_conv::apply(), op_inv::apply_diag(), op_trans::apply_noalias(), eop_core< eop_type >::apply_proxy(), eglue_core< eglue_type >::apply_proxy(), eop_core< eop_type >::apply_unwrap(), eglue_core< eglue_type >::apply_unwrap(), op_cor::direct_cor(), glue_cor::direct_cor(), glue_cov::direct_cov(), glue_kron::direct_kron(), op_pinv::direct_pinv(), eig_gen(), auxlib::eig_gen(), subview< eT >::extract(), subview_cube< eT >::extract(), diagview< eT >::extract(), op_find::helper(), Mat< eT >::init(), auxlib::inv_noalias(), diskio::load_arma_ascii(), diskio::load_arma_binary(), diskio::load_pgm_binary(), diskio::load_ppm_binary(), diskio::load_raw_ascii(), auxlib::lu(), Mat< eT >::ones(), auxlib::qr(), auxlib::solve_od(), auxlib::solve_ud(), auxlib::svd(), and Mat< eT >::zeros().
02500 { 02501 arma_extra_debug_sigprint(); 02502 02503 init(in_n_rows, in_n_cols); 02504 }
void Mat< eT >::copy_size | ( | const Mat< eT2 > & | m | ) | [inline, inherited] |
change the matrix (without preserving data) to have the same dimensions as the given matrix
Definition at line 2513 of file Mat_meat.hpp.
References Mat< eT >::init(), Mat< eT >::n_cols, and Mat< eT >::n_rows.
Referenced by op_sort::apply(), op_shuffle::apply(), op_fliplr::apply(), op_flipud::apply(), and op_princomp::direct_princomp().
arma_hot void Mat< eT >::fill | ( | const eT | val | ) | [inline, inherited] |
fill the matrix with the specified value
Definition at line 2527 of file Mat_meat.hpp.
References Mat< eT >::memptr(), and Mat< eT >::n_elem.
Referenced by Mat< eT >::ones(), and Mat< eT >::zeros().
02528 { 02529 arma_extra_debug_sigprint(); 02530 02531 eT* local_ptr = memptr(); 02532 const u32 local_n_elem = n_elem; 02533 02534 u32 i,j; 02535 02536 for(i=0, j=1; j<local_n_elem; i+=2, j+=2) 02537 { 02538 local_ptr[i] = val; 02539 local_ptr[j] = val; 02540 } 02541 02542 if(i < local_n_elem) 02543 { 02544 local_ptr[i] = val; 02545 } 02546 }
void Mat< eT >::zeros | ( | ) | [inline, inherited] |
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 2553 of file Mat_meat.hpp.
References Mat< eT >::fill().
Referenced by op_diagmat::apply(), glue_times_diag::apply(), op_pinv::direct_pinv(), op_princomp::direct_princomp(), operator*(), auxlib::solve_ud(), running_stat_vec_aux::update_stats(), and running_stat_vec< eT >::var().
02554 { 02555 arma_extra_debug_sigprint(); 02556 02557 fill(eT(0)); 02558 }
void Mat< eT >::zeros | ( | const u32 | in_rows, | |
const u32 | in_cols | |||
) | [inline, inherited] |
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 2565 of file Mat_meat.hpp.
References Mat< eT >::fill(), and Mat< eT >::set_size().
02566 { 02567 arma_extra_debug_sigprint( arma_boost::format("in_rows = %d, in_cols = %d") % in_rows % in_cols ); 02568 02569 set_size(in_rows, in_cols); 02570 fill(eT(0)); 02571 }
void Mat< eT >::ones | ( | ) | [inline, inherited] |
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 2578 of file Mat_meat.hpp.
References Mat< eT >::fill().
02579 { 02580 arma_extra_debug_sigprint(); 02581 02582 fill(eT(1)); 02583 }
void Mat< eT >::ones | ( | const u32 | in_rows, | |
const u32 | in_cols | |||
) | [inline, inherited] |
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 2590 of file Mat_meat.hpp.
References Mat< eT >::fill(), and Mat< eT >::set_size().
02591 { 02592 arma_extra_debug_sigprint( arma_boost::format("in_rows = %d, in_cols = %d") % in_rows % in_cols ); 02593 02594 set_size(in_rows, in_cols); 02595 fill(eT(1)); 02596 }
void Mat< eT >::reset | ( | ) | [inline, inherited] |
Definition at line 2603 of file Mat_meat.hpp.
References Mat< eT >::init().
Referenced by op_find::apply(), op_chol::apply(), glue_solve::apply(), glue_join::apply(), op_princomp::direct_princomp(), op_princomp_cov::direct_princomp_cov(), qr(), and running_stat_vec< eT >::reset().
02604 { 02605 arma_extra_debug_sigprint(); 02606 02607 init(0,0); 02608 }
bool Mat< eT >::save | ( | const std::string | name, | |
const file_type | type = arma_binary , |
|||
const bool | print_status = true | |||
) | const [inline, inherited] |
save the matrix to a file
Definition at line 2616 of file Mat_meat.hpp.
References arma_ascii, arma_binary, arma_warn(), pgm_binary, raw_ascii, diskio::save_arma_ascii(), diskio::save_arma_binary(), diskio::save_pgm_binary(), and diskio::save_raw_ascii().
02617 { 02618 arma_extra_debug_sigprint(); 02619 02620 bool save_okay; 02621 02622 switch(type) 02623 { 02624 case raw_ascii: 02625 save_okay = diskio::save_raw_ascii(*this, name); 02626 break; 02627 02628 case arma_ascii: 02629 save_okay = diskio::save_arma_ascii(*this, name); 02630 break; 02631 02632 case arma_binary: 02633 save_okay = diskio::save_arma_binary(*this, name); 02634 break; 02635 02636 case pgm_binary: 02637 save_okay = diskio::save_pgm_binary(*this, name); 02638 break; 02639 02640 default: 02641 arma_warn(print_status, "Mat::save(): unsupported file type"); 02642 save_okay = false; 02643 } 02644 02645 arma_warn( (print_status && (save_okay == false)), "Mat::save(): couldn't write to ", name); 02646 02647 return save_okay; 02648 }
bool Mat< eT >::save | ( | std::ostream & | os, | |
const file_type | type = arma_binary , |
|||
const bool | print_status = true | |||
) | const [inline, inherited] |
save the matrix to a stream
Definition at line 2656 of file Mat_meat.hpp.
References arma_ascii, arma_binary, arma_warn(), pgm_binary, raw_ascii, diskio::save_arma_ascii(), diskio::save_arma_binary(), diskio::save_pgm_binary(), and diskio::save_raw_ascii().
02657 { 02658 arma_extra_debug_sigprint(); 02659 02660 bool save_okay; 02661 02662 switch(type) 02663 { 02664 case raw_ascii: 02665 save_okay = diskio::save_raw_ascii(*this, os); 02666 break; 02667 02668 case arma_ascii: 02669 save_okay = diskio::save_arma_ascii(*this, os); 02670 break; 02671 02672 case arma_binary: 02673 save_okay = diskio::save_arma_binary(*this, os); 02674 break; 02675 02676 case pgm_binary: 02677 save_okay = diskio::save_pgm_binary(*this, os); 02678 break; 02679 02680 default: 02681 arma_warn(print_status, "Mat::save(): unsupported file type"); 02682 save_okay = false; 02683 } 02684 02685 arma_warn( (print_status && (save_okay == false)), "Mat::save(): couldn't write to the given stream"); 02686 02687 return save_okay; 02688 }
bool Mat< eT >::load | ( | const std::string | name, | |
const file_type | type = auto_detect , |
|||
const bool | print_status = true | |||
) | [inline, inherited] |
load a matrix from a file
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 2696 of file Mat_meat.hpp.
References arma_ascii, arma_binary, arma_print(), arma_warn(), auto_detect, diskio::load_arma_ascii(), diskio::load_arma_binary(), diskio::load_auto_detect(), diskio::load_pgm_binary(), diskio::load_raw_ascii(), pgm_binary, and raw_ascii.
02697 { 02698 arma_extra_debug_sigprint(); 02699 02700 bool load_okay; 02701 std::string err_msg; 02702 02703 switch(type) 02704 { 02705 case auto_detect: 02706 load_okay = diskio::load_auto_detect(*this, name, err_msg); 02707 break; 02708 02709 case raw_ascii: 02710 load_okay = diskio::load_raw_ascii(*this, name, err_msg); 02711 break; 02712 02713 case arma_ascii: 02714 load_okay = diskio::load_arma_ascii(*this, name, err_msg); 02715 break; 02716 02717 case arma_binary: 02718 load_okay = diskio::load_arma_binary(*this, name, err_msg); 02719 break; 02720 02721 case pgm_binary: 02722 load_okay = diskio::load_pgm_binary(*this, name, err_msg); 02723 break; 02724 02725 default: 02726 arma_warn(print_status, "Mat::load(): unsupported file type"); 02727 load_okay = false; 02728 } 02729 02730 if( (print_status == true) && (load_okay == false) ) 02731 { 02732 if(err_msg.length() > 0) 02733 { 02734 arma_print("Mat::load(): ", err_msg, name); 02735 } 02736 else 02737 { 02738 arma_print("Mat::load(): couldn't read ", name); 02739 } 02740 } 02741 02742 if(load_okay == false) 02743 { 02744 (*this).reset(); 02745 } 02746 02747 return load_okay; 02748 }
bool Mat< eT >::load | ( | std::istream & | is, | |
const file_type | type = auto_detect , |
|||
const bool | print_status = true | |||
) | [inline, inherited] |
load a matrix from a stream
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 2756 of file Mat_meat.hpp.
References arma_ascii, arma_binary, arma_print(), arma_warn(), auto_detect, diskio::load_arma_ascii(), diskio::load_arma_binary(), diskio::load_auto_detect(), diskio::load_pgm_binary(), diskio::load_raw_ascii(), pgm_binary, and raw_ascii.
02757 { 02758 arma_extra_debug_sigprint(); 02759 02760 bool load_okay; 02761 std::string err_msg; 02762 02763 switch(type) 02764 { 02765 case auto_detect: 02766 load_okay = diskio::load_auto_detect(*this, is, err_msg); 02767 break; 02768 02769 case raw_ascii: 02770 load_okay = diskio::load_raw_ascii(*this, is, err_msg); 02771 break; 02772 02773 case arma_ascii: 02774 load_okay = diskio::load_arma_ascii(*this, is, err_msg); 02775 break; 02776 02777 case arma_binary: 02778 load_okay = diskio::load_arma_binary(*this, is, err_msg); 02779 break; 02780 02781 case pgm_binary: 02782 load_okay = diskio::load_pgm_binary(*this, is, err_msg); 02783 break; 02784 02785 default: 02786 arma_warn(print_status, "Mat::load(): unsupported file type"); 02787 load_okay = false; 02788 } 02789 02790 02791 if( (print_status == true) && (load_okay == false) ) 02792 { 02793 if(err_msg.length() > 0) 02794 { 02795 arma_print("Mat::load(): ", err_msg, "the given stream"); 02796 } 02797 else 02798 { 02799 arma_print("Mat::load(): couldn't load from the given stream"); 02800 } 02801 } 02802 02803 if(load_okay == false) 02804 { 02805 (*this).reset(); 02806 } 02807 02808 return load_okay; 02809 }
bool Mat< eT >::quiet_save | ( | const std::string | name, | |
const file_type | type = arma_binary | |||
) | const [inline, inherited] |
save the matrix to a file, without printing any error messages
Definition at line 2817 of file Mat_meat.hpp.
bool Mat< eT >::quiet_save | ( | std::ostream & | os, | |
const file_type | type = arma_binary | |||
) | const [inline, inherited] |
save the matrix to a stream, without printing any error messages
Definition at line 2830 of file Mat_meat.hpp.
bool Mat< eT >::quiet_load | ( | const std::string | name, | |
const file_type | type = auto_detect | |||
) | [inline, inherited] |
load a matrix from a file, without printing any error messages
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 2843 of file Mat_meat.hpp.
bool Mat< eT >::quiet_load | ( | std::istream & | is, | |
const file_type | type = auto_detect | |||
) | [inline, inherited] |
load a matrix from a stream, without printing any error messages
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 2856 of file Mat_meat.hpp.
Mat< eT >::row_iterator::row_iterator | ( | Mat< eT > & | in_M, | |
const u32 | in_row | |||
) | [inline, inherited] |
Definition at line 2867 of file Mat_meat.hpp.
eT & Mat< eT >::row_iterator::operator* | ( | ) | [inline, inherited] |
Definition at line 2880 of file Mat_meat.hpp.
References Mat< eT >::row_iterator::col, Mat< eT >::row_iterator::M, and Mat< eT >::row_iterator::row.
Mat< eT >::row_iterator & Mat< eT >::row_iterator::operator++ | ( | ) | [inline, inherited] |
Definition at line 2890 of file Mat_meat.hpp.
References Mat< eT >::row_iterator::col, Mat< eT >::row_iterator::M, and Mat< eT >::row_iterator::row.
Referenced by Mat< eT >::row_iterator::operator++().
void Mat< eT >::row_iterator::operator++ | ( | int | ) | [inline, inherited] |
Definition at line 2908 of file Mat_meat.hpp.
References Mat< eT >::row_iterator::operator++().
02909 { 02910 operator++(); 02911 }
Mat< eT >::row_iterator & Mat< eT >::row_iterator::operator-- | ( | ) | [inline, inherited] |
Definition at line 2918 of file Mat_meat.hpp.
References Mat< eT >::row_iterator::col, Mat< eT >::row_iterator::M, and Mat< eT >::row_iterator::row.
Referenced by Mat< eT >::row_iterator::operator--().
void Mat< eT >::row_iterator::operator-- | ( | int | ) | [inline, inherited] |
Definition at line 2941 of file Mat_meat.hpp.
References Mat< eT >::row_iterator::operator--().
02942 { 02943 operator--(); 02944 }
Mat< eT >::const_row_iterator::const_row_iterator | ( | const Mat< eT > & | in_M, | |
const u32 | in_row | |||
) | [inline, inherited] |
Definition at line 2970 of file Mat_meat.hpp.
eT Mat< eT >::const_row_iterator::operator* | ( | ) | const [inline, inherited] |
Definition at line 2995 of file Mat_meat.hpp.
References Mat< eT >::const_row_iterator::col, Mat< eT >::const_row_iterator::M, and Mat< eT >::const_row_iterator::row.
Mat< eT >::const_row_iterator & Mat< eT >::const_row_iterator::operator++ | ( | ) | [inline, inherited] |
Definition at line 3005 of file Mat_meat.hpp.
References Mat< eT >::const_row_iterator::col, Mat< eT >::const_row_iterator::M, and Mat< eT >::const_row_iterator::row.
Referenced by Mat< eT >::const_row_iterator::operator++().
void Mat< eT >::const_row_iterator::operator++ | ( | int | ) | [inline, inherited] |
Definition at line 3023 of file Mat_meat.hpp.
References Mat< eT >::const_row_iterator::operator++().
03024 { 03025 operator++(); 03026 }
Mat< eT >::const_row_iterator & Mat< eT >::const_row_iterator::operator-- | ( | ) | [inline, inherited] |
Definition at line 3033 of file Mat_meat.hpp.
References Mat< eT >::const_row_iterator::col, Mat< eT >::const_row_iterator::M, and Mat< eT >::const_row_iterator::row.
Referenced by Mat< eT >::const_row_iterator::operator--().
void Mat< eT >::const_row_iterator::operator-- | ( | int | ) | [inline, inherited] |
Definition at line 3056 of file Mat_meat.hpp.
References Mat< eT >::const_row_iterator::operator--().
03057 { 03058 operator--(); 03059 }
Definition at line 3086 of file Mat_meat.hpp.
References Mat< eT >::memptr().
03087 { 03088 arma_extra_debug_sigprint(); 03089 03090 return memptr(); 03091 }
Definition at line 3098 of file Mat_meat.hpp.
References Mat< eT >::memptr().
03099 { 03100 arma_extra_debug_sigprint(); 03101 03102 return memptr(); 03103 }
Definition at line 3110 of file Mat_meat.hpp.
References Mat< eT >::memptr(), and Mat< eT >::n_elem.
Definition at line 3122 of file Mat_meat.hpp.
References Mat< eT >::memptr(), and Mat< eT >::n_elem.
Mat< eT >::col_iterator Mat< eT >::begin_col | ( | const u32 | col_num | ) | [inline, inherited] |
Definition at line 3134 of file Mat_meat.hpp.
References Mat< eT >::colptr(), and Mat< eT >::n_cols.
Mat< eT >::const_col_iterator Mat< eT >::begin_col | ( | const u32 | col_num | ) | const [inline, inherited] |
Definition at line 3148 of file Mat_meat.hpp.
References Mat< eT >::colptr(), and Mat< eT >::n_cols.
Mat< eT >::col_iterator Mat< eT >::end_col | ( | const u32 | col_num | ) | [inline, inherited] |
Definition at line 3162 of file Mat_meat.hpp.
References Mat< eT >::colptr(), Mat< eT >::n_cols, and Mat< eT >::n_rows.
Mat< eT >::const_col_iterator Mat< eT >::end_col | ( | const u32 | col_num | ) | const [inline, inherited] |
Definition at line 3176 of file Mat_meat.hpp.
References Mat< eT >::colptr(), Mat< eT >::n_cols, and Mat< eT >::n_rows.
Mat< eT >::row_iterator Mat< eT >::begin_row | ( | const u32 | row_num | ) | [inline, inherited] |
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 3190 of file Mat_meat.hpp.
References Mat< eT >::n_rows.
03191 { 03192 arma_extra_debug_sigprint(); 03193 03194 arma_debug_check( (row_num >= n_rows), "Mat::begin_row(): index out of bounds" ); 03195 03196 return typename Mat<eT>::row_iterator(*this, row_num); 03197 }
Mat< eT >::const_row_iterator Mat< eT >::begin_row | ( | const u32 | row_num | ) | const [inline, inherited] |
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 3204 of file Mat_meat.hpp.
References Mat< eT >::n_rows.
03205 { 03206 arma_extra_debug_sigprint(); 03207 03208 arma_debug_check( (row_num >= n_rows), "Mat::begin_row(): index out of bounds" ); 03209 03210 return typename Mat<eT>::const_row_iterator(*this, row_num); 03211 }
Mat< eT >::row_iterator Mat< eT >::end_row | ( | const u32 | row_num | ) | [inline, inherited] |
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 3218 of file Mat_meat.hpp.
References Mat< eT >::n_rows.
03219 { 03220 arma_extra_debug_sigprint(); 03221 03222 arma_debug_check( (row_num >= n_rows), "Mat::end_row(): index out of bounds" ); 03223 03224 return typename Mat<eT>::row_iterator(*this, row_num + 1); 03225 }
Mat< eT >::const_row_iterator Mat< eT >::end_row | ( | const u32 | row_num | ) | const [inline, inherited] |
Reimplemented in Col< eT >, and Row< eT >.
Definition at line 3232 of file Mat_meat.hpp.
References Mat< eT >::n_rows.
03233 { 03234 arma_extra_debug_sigprint(); 03235 03236 arma_debug_check( (row_num >= n_rows), "Mat::end_row(): index out of bounds" ); 03237 03238 return typename Mat<eT>::const_row_iterator(*this, row_num + 1); 03239 }
arma_inline void Mat_aux::prefix_pp | ( | Mat< eT > & | x | ) | [inline, static, inherited] |
prefix ++
Definition at line 3247 of file Mat_meat.hpp.
References Mat< eT >::memptr(), and Mat< eT >::n_elem.
Referenced by Mat< eT >::operator++().
arma_inline void Mat_aux::prefix_pp | ( | Mat< std::complex< T > > & | x | ) | [inline, static, inherited] |
prefix ++ for complex numbers (work around for limitations of the std::complex class)
Definition at line 3272 of file Mat_meat.hpp.
arma_inline void Mat_aux::postfix_pp | ( | Mat< eT > & | x | ) | [inline, static, inherited] |
postfix ++
Definition at line 3283 of file Mat_meat.hpp.
References Mat< eT >::memptr(), and Mat< eT >::n_elem.
Referenced by Mat< eT >::operator++().
arma_inline void Mat_aux::postfix_pp | ( | Mat< std::complex< T > > & | x | ) | [inline, static, inherited] |
postfix ++ for complex numbers (work around for limitations of the std::complex class)
Definition at line 3308 of file Mat_meat.hpp.
arma_inline void Mat_aux::prefix_mm | ( | Mat< eT > & | x | ) | [inline, static, inherited] |
prefix --
Definition at line 3319 of file Mat_meat.hpp.
References Mat< eT >::memptr(), and Mat< eT >::n_elem.
Referenced by Mat< eT >::operator--().
arma_inline void Mat_aux::prefix_mm | ( | Mat< std::complex< T > > & | x | ) | [inline, static, inherited] |
prefix -- for complex numbers (work around for limitations of the std::complex class)
Definition at line 3344 of file Mat_meat.hpp.
arma_inline void Mat_aux::postfix_mm | ( | Mat< eT > & | x | ) | [inline, static, inherited] |
postfix --
Definition at line 3355 of file Mat_meat.hpp.
References Mat< eT >::memptr(), and Mat< eT >::n_elem.
Referenced by Mat< eT >::operator--().
arma_inline void Mat_aux::postfix_mm | ( | Mat< std::complex< T > > & | x | ) | [inline, static, inherited] |
postfix ++ for complex numbers (work around for limitations of the std::complex class)
Definition at line 3380 of file Mat_meat.hpp.