$search
Dense matrix class. More...
#include <Mat_bones.hpp>
Classes | |
class | const_row_iterator |
class | fixed |
class | row_iterator |
Public Types | |
typedef eT * | col_iterator |
typedef const eT * | const_col_iterator |
typedef const eT * | const_iterator |
typedef eT | elem_type |
the type of elements stored in the matrix | |
typedef eT * | iterator |
typedef get_pod_type< eT >::result | pod_type |
if eT is non-complex, pod_type is same as eT. otherwise, pod_type is the underlying type used by std::complex | |
typedef uword | size_type |
typedef eT | value_type |
Public Member Functions | |
arma_inline arma_warn_unused eT | at (const uword in_row, const uword in_col) const |
element accessor; no bounds check | |
arma_inline arma_warn_unused eT & | at (const uword in_row, const uword in_col) |
element accessor; no bounds check | |
arma_inline arma_warn_unused eT | at (const uword i) const |
linear element accessor (treats the matrix as a vector); no bounds check | |
arma_inline arma_warn_unused eT & | at (const uword i) |
linear element accessor (treats the matrix as a vector); no bounds check. | |
const_iterator | begin () const |
iterator | begin () |
const_col_iterator | begin_col (const uword col_num) const |
col_iterator | begin_col (const uword col_num) |
const_row_iterator | begin_row (const uword row_num) const |
row_iterator | begin_row (const uword row_num) |
void | clear () |
resets this matrix to an empty matrix | |
arma_inline const subview_col< eT > | col (const uword col_num) const |
creation of subview (column vector) | |
arma_inline subview_col< eT > | col (const uword col_num) |
creation of subview (column vector) | |
arma_inline arma_warn_unused const eT * | colptr (const uword in_col) const |
returns a pointer to array of eTs for a specified column; no bounds check | |
arma_inline arma_warn_unused eT * | colptr (const uword in_col) |
returns a pointer to array of eTs for a specified column; no bounds check | |
arma_inline const subview< eT > | cols (const uword in_col1, const uword in_col2) const |
creation of subview (submatrix comprised of specified column vectors) | |
arma_inline subview< eT > | cols (const uword in_col1, const uword in_col2) |
creation of subview (submatrix comprised of specified column vectors) | |
template<typename eT2 > | |
void | copy_size (const Mat< eT2 > &m) |
change the matrix (without preserving data) to have the same dimensions as the given matrix | |
arma_inline const diagview< eT > | diag (const sword in_id=0) const |
creation of diagview (diagonal) | |
arma_inline diagview< eT > | diag (const sword in_id=0) |
creation of diagview (diagonal) | |
template<typename T1 > | |
arma_inline const subview_elem1< eT, T1 > | elem (const Base< uword, T1 > &a) const |
template<typename T1 > | |
arma_inline subview_elem1< eT, T1 > | elem (const Base< uword, T1 > &a) |
bool | empty () const |
returns true if the matrix has no elements | |
const_iterator | end () const |
iterator | end () |
const_col_iterator | end_col (const uword col_num) const |
col_iterator | end_col (const uword col_num) |
const_row_iterator | end_row (const uword row_num) const |
row_iterator | end_row (const uword row_num) |
const Mat & | eye (const uword in_rows, const uword in_cols) |
const Mat & | eye () |
arma_hot const Mat & | fill (const eT val) |
fill the matrix with the specified value | |
void | impl_print (std::ostream &user_stream, const std::string &extra_text) const |
void | impl_print (const std::string &extra_text) const |
void | impl_print_trans (std::ostream &user_stream, const std::string &extra_text) const |
DEPRECATED FUNCTION. | |
void | impl_print_trans (const std::string &extra_text) const |
DEPRECATED FUNCTION. | |
void | impl_raw_print (std::ostream &user_stream, const std::string &extra_text) const |
void | impl_raw_print (const std::string &extra_text) const |
void | impl_raw_print_trans (std::ostream &user_stream, const std::string &extra_text) const |
DEPRECATED FUNCTION. | |
void | impl_raw_print_trans (const std::string &extra_text) const |
DEPRECATED FUNCTION. | |
arma_inline arma_warn_unused bool | in_range (const span &row_span, const span &col_span) const |
arma_inline arma_warn_unused bool | in_range (const uword in_row, const span &col_span) const |
arma_inline arma_warn_unused bool | in_range (const span &row_span, const uword in_col) const |
arma_inline arma_warn_unused bool | in_range (const uword in_row, const uword in_col) const |
returns true if the given location is currently in range | |
arma_inline arma_warn_unused bool | in_range (const span &x) const |
returns true if the given start and end indices are currently in range | |
arma_inline arma_warn_unused bool | in_range (const uword i) const |
returns true if the given index is currently in range | |
template<typename T1 , typename T2 > | |
void | init (const Base< typename Mat< eT >::pod_type, T1 > &A, const Base< typename Mat< eT >::pod_type, T2 > &B) |
for constructing a complex matrix out of two non-complex matrices | |
template<typename T1 > | |
void | insert_cols (const uword col_num, const Base< eT, T1 > &X) |
void | insert_cols (const uword col_num, const uword N, const bool set_to_zero=true) |
template<typename T1 > | |
void | insert_rows (const uword row_num, const Base< eT, T1 > &X) |
void | insert_rows (const uword row_num, const uword N, const bool set_to_zero=true) |
arma_inline arma_warn_unused bool | is_colvec () const |
returns true if the object can be interpreted as a column vector | |
arma_inline arma_warn_unused bool | is_empty () const |
returns true if the matrix has no elements | |
arma_warn_unused bool | is_finite () const |
returns true if all of the elements are finite | |
arma_inline arma_warn_unused bool | is_rowvec () const |
returns true if the object can be interpreted as a row vector | |
arma_inline arma_warn_unused bool | is_square () const |
returns true if the object has the same number of non-zero rows and columnns | |
arma_inline arma_warn_unused bool | is_vec () const |
returns true if the object can be interpreted as a column or row vector | |
bool | load (std::istream &is, const file_type type=auto_detect, const bool print_status=true) |
load a matrix from a stream | |
bool | load (const std::string name, const file_type type=auto_detect, const bool print_status=true) |
load a matrix from a file | |
template<typename T1 , typename T2 > | |
Mat (const Base< typename Mat< eT >::pod_type, T1 > &A, const Base< typename Mat< eT >::pod_type, T2 > &B) | |
for constructing a complex matrix out of two non-complex matrices | |
template<typename T1 , typename T2 , typename glue_type > | |
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 eglue_type > | |
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 glue_type > | |
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 op_type > | |
Mat (const mtOp< eT, T1, op_type > &X) | |
EXPERIMENTAL. | |
template<typename T1 , typename eop_type > | |
Mat (const eOp< T1, eop_type > &X) | |
create a matrix from eOp, i.e. run the previously delayed unary operations | |
template<typename T1 , typename op_type > | |
Mat (const Op< T1, op_type > &X) | |
create a matrix from Op, i.e. run the previously delayed unary operations | |
template<typename gen_type > | |
Mat (const Gen< eT, gen_type > &X) | |
template<typename T1 > | |
Mat (const subview_elem1< eT, T1 > &X) | |
Mat (const diagview< eT > &X) | |
construct a matrix from diagview (e.g. construct a matrix from a delayed diag operation) | |
Mat (const subview_cube< eT > &X) | |
construct a matrix from a subview_cube instance | |
Mat (const subview< eT > &X) | |
construct a matrix from subview (e.g. construct a matrix from a delayed submatrix operation) | |
template<typename T1 , typename T2 > | |
Mat (const Base< pod_type, T1 > &A, const Base< pod_type, T2 > &B) | |
template<typename T1 > | |
Mat (const BaseCube< eT, T1 > &X) | |
Mat (const Mat &m) | |
construct a matrix from a given matrix | |
Mat (const eT *aux_mem, const uword aux_n_rows, const uword aux_n_cols) | |
Mat (eT *aux_mem, const uword aux_n_rows, const uword aux_n_cols, const bool copy_aux_mem=true, const bool strict=true) | |
Mat (const std::string &text) | |
create the matrix from a textual description | |
Mat (const char *text) | |
create the matrix from a textual description | |
Mat (const uword in_rows, const uword in_cols) | |
construct the matrix to have user specified dimensions | |
Mat () | |
eT | max (uword &row_of_max_val, uword &col_of_max_val) const |
eT | max (uword &index_of_max_val) const |
arma_warn_unused eT | max () const |
arma_inline arma_warn_unused const eT * | memptr () const |
returns a pointer to array of eTs used by the matrix | |
arma_inline arma_warn_unused eT * | memptr () |
returns a pointer to array of eTs used by the matrix | |
eT | min (uword &row_of_min_val, uword &col_of_min_val) const |
eT | min (uword &index_of_min_val) const |
arma_warn_unused eT | min () const |
const Mat & | ones (const uword in_rows, const uword in_cols) |
const Mat & | ones (const uword in_elem) |
const Mat & | ones () |
template<typename T1 , typename T2 , typename glue_type > | |
const 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 eglue_type > | |
const Mat & | operator%= (const eGlue< T1, T2, eglue_type > &X) |
template<typename T1 , typename T2 , typename glue_type > | |
const 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 op_type > | |
const Mat & | operator%= (const mtOp< eT, T1, op_type > &X) |
EXPERIMENTAL. | |
template<typename T1 , typename eop_type > | |
const Mat & | operator%= (const eOp< T1, eop_type > &X) |
template<typename T1 , typename op_type > | |
const 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 gen_type > | |
const Mat & | operator%= (const Gen< eT, gen_type > &X) |
template<typename T1 > | |
const Mat & | operator%= (const subview_elem1< eT, T1 > &X) |
const Mat & | operator%= (const diagview< eT > &X) |
in-place element-wise matrix mutiplication (using a diagview on the right-hand-side) | |
const 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 & | operator%= (const subview< eT > &X) |
in-place element-wise matrix mutiplication (using a submatrix on the right-hand-side) | |
template<typename T1 > | |
const Mat & | operator%= (const BaseCube< eT, T1 > &X) |
const Mat & | operator%= (const Mat &m) |
in-place element-wise matrix multiplication | |
arma_inline arma_warn_unused eT | operator() (const uword in_row, const uword in_col) const |
element accessor; bounds checking not done when ARMA_NO_DEBUG is defined | |
arma_inline arma_warn_unused eT & | operator() (const uword in_row, const uword in_col) |
element accessor; bounds checking not done when ARMA_NO_DEBUG is defined | |
arma_inline arma_warn_unused eT | operator() (const uword i) const |
linear element accessor (treats the matrix as a vector); bounds checking not done when ARMA_NO_DEBUG is defined | |
arma_inline arma_warn_unused eT & | operator() (const uword i) |
linear element accessor (treats the matrix as a vector); bounds checking not done when ARMA_NO_DEBUG is defined | |
const subview< eT > | operator() (const span &row_span, const span &col_span) const |
subview< eT > | operator() (const span &row_span, const span &col_span) |
const subview_col< eT > | operator() (const span &row_span, const uword col_num) const |
subview_col< eT > | operator() (const span &row_span, const uword col_num) |
const subview_row< eT > | operator() (const uword row_num, const span &col_span) const |
subview_row< eT > | operator() (const uword row_num, const span &col_span) |
template<typename T1 , typename T2 , typename glue_type > | |
const 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 eglue_type > | |
const Mat & | operator*= (const eGlue< T1, T2, eglue_type > &X) |
template<typename T1 , typename T2 , typename glue_type > | |
const 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 op_type > | |
const Mat & | operator*= (const mtOp< eT, T1, op_type > &X) |
EXPERIMENTAL. | |
template<typename T1 , typename eop_type > | |
const Mat & | operator*= (const eOp< T1, eop_type > &X) |
template<typename T1 , typename op_type > | |
const Mat & | operator*= (const Op< T1, op_type > &X) |
in-place matrix multiplication, with the right-hand-side operand having delayed operations | |
template<typename gen_type > | |
const Mat & | operator*= (const Gen< eT, gen_type > &X) |
template<typename T1 > | |
const Mat & | operator*= (const subview_elem1< eT, T1 > &X) |
const Mat & | operator*= (const diagview< eT > &X) |
in-place matrix mutiplication (using a diagview on the right-hand-side) | |
const Mat & | operator*= (const subview_cube< eT > &X) |
in-place matrix mutiplication (using a single-slice subcube on the right-hand-side) | |
const Mat & | operator*= (const subview< eT > &X) |
in-place matrix mutiplication (using a submatrix on the right-hand-side) | |
template<typename T1 > | |
const Mat & | operator*= (const BaseCube< eT, T1 > &X) |
const Mat & | operator*= (const Mat &m) |
in-place matrix multiplication | |
arma_inline const Mat & | operator*= (const eT val) |
In-place multiplication of all elements of the matrix with a scalar. | |
arma_inline void | operator++ (int) |
postfix ++ (must not return the object by reference) | |
arma_inline const Mat & | operator++ () |
prefix ++ | |
template<typename T1 , typename T2 , typename glue_type > | |
const 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 eglue_type > | |
const 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 > | |
const Mat & | operator+= (const Glue< T1, T2, glue_times > &X) |
template<typename T1 , typename T2 , typename glue_type > | |
const 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 op_type > | |
const Mat & | operator+= (const mtOp< eT, T1, op_type > &X) |
EXPERIMENTAL. | |
template<typename T1 , typename eop_type > | |
const Mat & | operator+= (const eOp< T1, eop_type > &X) |
template<typename T1 , typename op_type > | |
const Mat & | operator+= (const Op< T1, op_type > &X) |
in-place matrix addition, with the right-hand-side operand having delayed operations | |
template<typename gen_type > | |
const Mat & | operator+= (const Gen< eT, gen_type > &X) |
template<typename T1 > | |
const Mat & | operator+= (const subview_elem1< eT, T1 > &X) |
const Mat & | operator+= (const diagview< eT > &X) |
in-place matrix addition (using a diagview on the right-hand-side) | |
const Mat & | operator+= (const subview_cube< eT > &X) |
in-place matrix addition (using a single-slice subcube on the right-hand-side) | |
const Mat & | operator+= (const subview< eT > &X) |
in-place matrix addition (using a submatrix on the right-hand-side) | |
template<typename T1 > | |
const Mat & | operator+= (const BaseCube< eT, T1 > &X) |
const Mat & | operator+= (const Mat &m) |
in-place matrix addition | |
arma_inline const Mat & | operator+= (const eT val) |
In-place addition of a scalar to all elements of the matrix. | |
arma_inline void | operator-- (int) |
postfix -- (must not return the object by reference) | |
arma_inline const Mat & | operator-- () |
prefix -- | |
template<typename T1 , typename T2 , typename glue_type > | |
const 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 eglue_type > | |
const 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 > | |
const Mat & | operator-= (const Glue< T1, T2, glue_times > &X) |
template<typename T1 , typename T2 , typename glue_type > | |
const 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 op_type > | |
const Mat & | operator-= (const mtOp< eT, T1, op_type > &X) |
EXPERIMENTAL. | |
template<typename T1 , typename eop_type > | |
const Mat & | operator-= (const eOp< T1, eop_type > &X) |
template<typename T1 , typename op_type > | |
const Mat & | operator-= (const Op< T1, op_type > &X) |
in-place matrix subtraction, with the right-hand-side operand having delayed operations | |
template<typename gen_type > | |
const Mat & | operator-= (const Gen< eT, gen_type > &X) |
template<typename T1 > | |
const Mat & | operator-= (const subview_elem1< eT, T1 > &X) |
const Mat & | operator-= (const diagview< eT > &X) |
in-place matrix subtraction (using a diagview on the right-hand-side) | |
const Mat & | operator-= (const subview_cube< eT > &X) |
in-place matrix subtraction (using a single-slice subcube on the right-hand-side) | |
const Mat & | operator-= (const subview< eT > &X) |
in-place matrix subtraction (using a submatrix on the right-hand-side) | |
template<typename T1 > | |
const Mat & | operator-= (const BaseCube< eT, T1 > &X) |
const Mat & | operator-= (const Mat &m) |
in-place matrix subtraction | |
arma_inline const Mat & | operator-= (const eT val) |
In-place subtraction of a scalar from all elements of the matrix. | |
template<typename T1 , typename T2 , typename glue_type > | |
const 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. | |
template<typename T1 , typename T2 , typename eglue_type > | |
const Mat & | operator/= (const eGlue< T1, T2, eglue_type > &X) |
template<typename T1 , typename T2 , typename glue_type > | |
const 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 op_type > | |
const Mat & | operator/= (const mtOp< eT, T1, op_type > &X) |
EXPERIMENTAL. | |
template<typename T1 , typename eop_type > | |
const Mat & | operator/= (const eOp< T1, eop_type > &X) |
template<typename T1 , typename op_type > | |
const 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 gen_type > | |
const Mat & | operator/= (const Gen< eT, gen_type > &X) |
template<typename T1 > | |
const Mat & | operator/= (const subview_elem1< eT, T1 > &X) |
const Mat & | operator/= (const diagview< eT > &X) |
in-place element-wise matrix division (using a diagview on the right-hand-side) | |
const Mat & | operator/= (const subview_cube< eT > &X) |
in-place element-wise matrix division (using a single-slice subcube on the right-hand-side) | |
const Mat & | operator/= (const subview< eT > &X) |
in-place element-wise matrix division (using a submatrix on the right-hand-side) | |
template<typename T1 > | |
const Mat & | operator/= (const BaseCube< eT, T1 > &X) |
const Mat & | operator/= (const Mat &m) |
in-place element-wise matrix division | |
arma_inline const Mat & | operator/= (const eT val) |
In-place division of all elements of the matrix with a scalar. | |
mat_injector< Mat > | operator<< (const injector_end_of_row &x) |
mat_injector< Mat > | operator<< (const eT val) |
template<typename T1 , typename T2 , typename glue_type > | |
const 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 eglue_type > | |
const 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 glue_type > | |
const 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 op_type > | |
const Mat & | operator= (const mtOp< eT, T1, op_type > &X) |
EXPERIMENTAL. | |
template<typename T1 , typename eop_type > | |
const 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 op_type > | |
const Mat & | operator= (const Op< T1, op_type > &X) |
create a matrix from Op, i.e. run the previously delayed unary operations | |
template<typename gen_type > | |
const Mat & | operator= (const Gen< eT, gen_type > &X) |
template<typename T1 > | |
const Mat & | operator= (const subview_elem1< eT, T1 > &X) |
const Mat & | operator= (const diagview< eT > &X) |
construct a matrix from diagview (e.g. construct a matrix from a delayed diag operation) | |
const Mat & | operator= (const subview_cube< eT > &X) |
construct a matrix from a subview_cube instance | |
const Mat & | operator= (const subview< eT > &X) |
construct a matrix from subview (e.g. construct a matrix from a delayed submatrix operation) | |
template<typename T1 > | |
const Mat & | operator= (const BaseCube< eT, T1 > &X) |
const Mat & | operator= (const Mat &m) |
construct a matrix from a given matrix | |
arma_inline const Mat & | operator= (const eT val) |
const Mat & | operator= (const std::string &text) |
create the matrix from a textual description | |
const Mat & | operator= (const char *text) |
create the matrix from a textual description | |
arma_inline arma_warn_unused eT | operator[] (const uword i) const |
linear element accessor (treats the matrix as a vector); no bounds check | |
arma_inline arma_warn_unused eT & | operator[] (const uword i) |
linear element accessor (treats the matrix as a vector); no bounds check. | |
bool | quiet_load (std::istream &is, const file_type type=auto_detect) |
load a matrix from a stream, without printing any error messages | |
bool | quiet_load (const std::string name, const file_type type=auto_detect) |
load a matrix from a file, without printing any error messages | |
bool | quiet_save (std::ostream &os, const file_type type=arma_binary) const |
save the matrix to a stream, without printing any error messages | |
bool | quiet_save (const std::string name, const file_type type=arma_binary) const |
save the matrix to a file, without printing any error messages | |
const Mat & | randn (const uword in_rows, const uword in_cols) |
const Mat & | randn (const uword in_elem) |
const Mat & | randn () |
const Mat & | randu (const uword in_rows, const uword in_cols) |
const Mat & | randu (const uword in_elem) |
const Mat & | randu () |
void | reset () |
void | reshape (const uword in_rows, const uword in_cols, const uword dim=0) |
change the matrix to have user specified dimensions (data is preserved) | |
void | resize (const uword in_rows, const uword in_cols) |
change the matrix to have user specified dimensions (data is preserved) | |
void | resize (const uword in_elem) |
change the matrix to have user specified dimensions (data is preserved) | |
arma_inline const subview_row< eT > | row (const uword row_num) const |
creation of subview (row vector) | |
arma_inline subview_row< eT > | row (const uword row_num) |
creation of subview (row vector) | |
arma_inline const subview< eT > | rows (const uword in_row1, const uword in_row2) const |
creation of subview (submatrix comprised of specified row vectors) | |
arma_inline subview< eT > | rows (const uword in_row1, const uword in_row2) |
creation of subview (submatrix comprised of specified row vectors) | |
bool | save (std::ostream &os, const file_type type=arma_binary, const bool print_status=true) const |
save the matrix to a stream | |
bool | save (const std::string name, const file_type type=arma_binary, const bool print_status=true) const |
save the matrix to a file | |
template<typename T1 > | |
void | set_imag (const Base< typename Mat< eT >::pod_type, T1 > &X) |
template<typename T1 > | |
void | set_imag (const Base< pod_type, T1 > &X) |
template<typename T1 > | |
void | set_real (const Base< typename Mat< eT >::pod_type, T1 > &X) |
template<typename T1 > | |
void | set_real (const Base< pod_type, T1 > &X) |
void | set_size (const uword in_rows, const uword in_cols) |
change the matrix to have user specified dimensions (data is not preserved) | |
void | set_size (const uword in_elem) |
change the matrix to have user specified dimensions (data is not preserved) | |
void | shed_col (const uword col_num) |
remove specified column | |
void | shed_cols (const uword in_col1, const uword in_col2) |
remove specified columns | |
void | shed_row (const uword row_num) |
remove specified row | |
void | shed_rows (const uword in_row1, const uword in_row2) |
remove specified rows | |
uword | size () const |
returns the number of elements in this matrix | |
const subview< eT > | submat (const span &row_span, const span &col_span) const |
creation of subview (generic submatrix) | |
subview< eT > | submat (const span &row_span, const span &col_span) |
creation of subview (submatrix) | |
arma_inline const subview< eT > | submat (const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2) const |
creation of subview (generic submatrix) | |
arma_inline subview< eT > | submat (const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2) |
creation of subview (submatrix) | |
void | swap_cols (const uword in_col1, const uword in_col2) |
void | swap_rows (const uword in_row1, const uword in_row2) |
const Col< eT > | unsafe_col (const uword col_num) const |
Col< eT > | unsafe_col (const uword col_num) |
const Mat & | zeros (const uword in_rows, const uword in_cols) |
const Mat & | zeros (const uword in_elem) |
const Mat & | zeros () |
~Mat () | |
Public Attributes | |
arma_aligned const eT *const | mem |
pointer to the memory used by the matrix (memory is read-only) | |
const uhword | mem_state |
const uword | n_cols |
number of columns in the matrix (read-only) | |
const uword | n_elem |
number of elements in the matrix (read-only) | |
const uword | n_rows |
number of rows in the matrix (read-only) | |
const uhword | vec_state |
0: matrix layout; 1: column vector layout; 2: row vector layout | |
Protected Member Functions | |
template<typename T1 , typename T2 > | |
void | init (const Base< pod_type, T1 > &A, const Base< pod_type, T2 > &B) |
void | init (const std::string &text) |
internal function to create the matrix from a textual description | |
void | init_cold () |
void | init_warm (uword in_rows, uword 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 (const char junk, const eT *aux_mem, const uword aux_n_rows, const uword aux_n_cols) | |
void | steal_mem (Mat &X) |
Protected Attributes | |
arma_aligned eT | mem_local [arma_config::mat_prealloc] |
Friends | |
class | Cube< eT > |
class | glue_join |
class | op_htrans |
class | op_resize |
class | op_strans |
Dense matrix class.
Definition at line 22 of file Mat_bones.hpp.
typedef eT* Mat< eT >::col_iterator |
Definition at line 375 of file Mat_bones.hpp.
typedef const eT* Mat< eT >::const_col_iterator |
Definition at line 376 of file Mat_bones.hpp.
typedef const eT* Mat< eT >::const_iterator |
Definition at line 373 of file Mat_bones.hpp.
the type of elements stored in the matrix
Reimplemented in Col< eT >, Row< eT >, Col< eT1 >, and Row< eT1 >.
Definition at line 26 of file Mat_bones.hpp.
Definition at line 372 of file Mat_bones.hpp.
typedef get_pod_type<eT>::result Mat< eT >::pod_type |
if eT is non-complex, pod_type is same as eT. otherwise, pod_type is the underlying type used by std::complex
Reimplemented in Col< eT >, Row< eT >, Col< eT1 >, and Row< eT1 >.
Definition at line 27 of file Mat_bones.hpp.
Definition at line 370 of file Mat_bones.hpp.
typedef eT Mat< eT >::value_type |
Definition at line 369 of file Mat_bones.hpp.
Mat< eT >::Mat | ( | const Base< pod_type, T1 > & | A, | |
const Base< pod_type, T2 > & | B | |||
) | [inline, explicit] |
void Mat< eT >::init | ( | const Base< pod_type, T1 > & | A, | |
const Base< pod_type, T2 > & | B | |||
) | [inline, protected] |
void Mat< eT >::set_imag | ( | const Base< pod_type, T1 > & | X | ) | [inline] |
void Mat< eT >::set_real | ( | const Base< pod_type, T1 > & | X | ) | [inline] |
friend class Cube< eT > [friend] |
Definition at line 534 of file Mat_bones.hpp.
friend class glue_join [friend] |
Definition at line 535 of file Mat_bones.hpp.
friend class op_htrans [friend] |
Definition at line 537 of file Mat_bones.hpp.
friend class op_resize [friend] |
Definition at line 538 of file Mat_bones.hpp.
friend class op_strans [friend] |
Definition at line 536 of file Mat_bones.hpp.
pointer to the memory used by the matrix (memory is read-only)
Definition at line 40 of file Mat_bones.hpp.
arma_aligned eT Mat< eT >::mem_local[arma_config::mat_prealloc] [protected] |
Definition at line 43 of file Mat_bones.hpp.
Definition at line 33 of file Mat_bones.hpp.
number of columns in the matrix (read-only)
Reimplemented in Col< eT >::fixed< fixed_n_elem >, Mat< eT >::fixed< fixed_n_rows, fixed_n_cols >, and Row< eT >::fixed< fixed_n_elem >.
Definition at line 30 of file Mat_bones.hpp.
number of elements in the matrix (read-only)
Reimplemented in Col< eT >::fixed< fixed_n_elem >, Mat< eT >::fixed< fixed_n_rows, fixed_n_cols >, and Row< eT >::fixed< fixed_n_elem >.
Definition at line 31 of file Mat_bones.hpp.
number of rows in the matrix (read-only)
Reimplemented in Col< eT >::fixed< fixed_n_elem >, Mat< eT >::fixed< fixed_n_rows, fixed_n_cols >, and Row< eT >::fixed< fixed_n_elem >.
Definition at line 29 of file Mat_bones.hpp.
0: matrix layout; 1: column vector layout; 2: row vector layout
Definition at line 32 of file Mat_bones.hpp.