itpp::Mat< Num_T > Class Template Reference
Base Module » Array, Vector and Matrix Classes

Matrix Class (Templated) More...

`#include <itpp/base/mat.h>`

## Public Types

typedef Num_T | value_type
| The type of the matrix values.

## Public Member Functions

| Mat (const Factory &f=DEFAULT_FACTORY)
| Default constructor. An element factory `f` can be specified.
| Mat (int rows, int cols, const Factory &f=DEFAULT_FACTORY)
| Create a matrix of size (rows, cols). An element factory `f` can be specified.
| Mat (const Mat< Num_T > &m)
| Copy constructor.
| Mat (const Mat< Num_T > &m, const Factory &f)
| Constructor, similar to the copy constructor, but also takes an element factory `f` as argument.
| Mat (const Vec< Num_T > &v, const Factory &f=DEFAULT_FACTORY)
| Construct a matrix from a column vector `v`. An element factory `f` can be specified.
| Mat (const std::string &str, const Factory &f=DEFAULT_FACTORY)
| Set matrix equal to values in string `str`. An element factory `f` can be specified.
| Mat (const char *str, const Factory &f=DEFAULT_FACTORY)
| Set matrix equal to values in string `str`. An element factory `f` can be specified.
| Mat (const Num_T *c_array, int rows, int cols, bool row_major=true, const Factory &f=DEFAULT_FACTORY)
| Constructor taking a C-array as input. An element factory `f` can be specified.
| ~Mat ()
| Destructor.
int | cols () const
| The number of columns.
int | rows () const
| The number of rows.
int | size () const
| The number of elements.
void | set_size (int rows, int cols, bool copy=false)
| Set size of matrix. If copy = true then keep the data before resizing.
void | zeros ()
| Set matrix equal to the all zero matrix.
void | clear ()
| Set matrix equal to the all zero matrix.
void | ones ()
| Set matrix equal to the all one matrix.
void | set (const std::string &str)
| Set matrix equal to values in the string `str`.
void | set (const char *str)
| Set matrix equal to values in the string `str`.
const Num_T & | operator() (int r, int c) const
| Get element (r,c) from matrix.
Num_T & | operator() (int r, int c)
| Get element (r,c) from matrix.
const Num_T & | operator() (int i) const
| Get element `i` using linear addressing (by rows)
Num_T & | operator() (int i)
| Get element `i` using linear addressing (by rows)
const Num_T & | get (int r, int c) const
| Get element (r,c) from matrix.
const Num_T & | get (int i) const
| Get element `i` using linear addressing (by rows)
void | set (int r, int c, Num_T t)
| Set element (r,c) of matrix.
Mat< Num_T > | operator() (int r1, int r2, int c1, int c2) const
| Sub-matrix from row `r1` to row `r2` and columns `c1` to `c2`.
Mat< Num_T > | get (int r1, int r2, int c1, int c2) const
| Sub-matrix from row `r1` to row `r2` and columns `c1` to `c2`.
Vec< Num_T > | get_row (int r) const
| Get row `r`.
Mat< Num_T > | get_rows (int r1, int r2) const
| Get rows `r1` through `r2`.
Mat< Num_T > | get_rows (const Vec< int > &indexlist) const
| Get the rows specified by `indexlist`.
Vec< Num_T > | get_col (int c) const
| Get column `c`.
Mat< Num_T > | get_cols (int c1, int c2) const
| Get columns `c1` through `c2`.
Mat< Num_T > | get_cols (const Vec< int > &indexlist) const
| Get the columns specified by `indexlist`.
void | set_row (int r, const Vec< Num_T > &v)
| Set row `r` to vector `v`.
void | set_col (int c, const Vec< Num_T > &v)
| Set column `c` to vector `v`.
void | set_rows (int r, const Mat< Num_T > &m)
| Set rows to matrix `m`, staring from row `r`.
void | set_cols (int c, const Mat< Num_T > &m)
| Set columns to matrix `m`, starting from column `c`.
void | copy_row (int to, int from)
| Copy row `from` onto row `to`.
void | copy_col (int to, int from)
| Copy column `from` onto column `to`.
void | swap_rows (int r1, int r2)
| Swap the rows `r1` and `r2`.
void | swap_cols (int c1, int c2)
| Swap the columns `c1` and `c2`.
void | set_submatrix (int r1, int r2, int c1, int c2, const Mat< Num_T > &m)
| This function is deprecated. Please use set_submatrix(int r, int c, const Mat<> &m) instead.
void | set_submatrix (int r, int c, const Mat< Num_T > &m)
| Set submatrix defined by upper-left element (r,c) and the size of matrix m to m.
void | set_submatrix (int r1, int r2, int c1, int c2, Num_T t)
| Set all elements of submatrix defined by rows r1,r2 and columns c1,c2 to value t.
void | del_row (int r)
| Delete row number `r`.
void | del_rows (int r1, int r2)
| Delete rows from `r1` to `r2`.
void | del_col (int c)
| Delete column number `c`.
void | del_cols (int c1, int c2)
| Delete columns from `c1` to `c2`.
void | ins_row (int r, const Vec< Num_T > &v)
| Insert vector `v` at row number `r`. The matrix can be empty.
void | ins_col (int c, const Vec< Num_T > &v)
| Insert vector `v` at column number `c`. The matrix can be empty.
void | append_row (const Vec< Num_T > &v)
| Append vector `v` to the bottom of the matrix. The matrix can be empty.
void | append_col (const Vec< Num_T > &v)
| Append vector `v` to the right side of the matrix. The matrix can be empty.
Mat< Num_T > | transpose () const
| Matrix transpose.
Mat< Num_T > | T () const
| Matrix transpose.
Mat< Num_T > | hermitian_transpose () const
| Hermitian matrix transpose (conjugate transpose)
Mat< Num_T > | H () const
| Hermitian matrix transpose (conjugate transpose)
Mat< Num_T > & | operator= (Num_T t)
| Set all elements of the matrix equal to `t`.
Mat< Num_T > & | operator= (const Mat< Num_T > &m)
| Set matrix equal to `m`.
Mat< Num_T > & | operator= (const Vec< Num_T > &v)
| Set matrix equal to the vector `v`, assuming column vector.
Mat< Num_T > & | operator= (const std::string &str)
| Set matrix equal to values in the string `str`.
Mat< Num_T > & | operator= (const char *str)
| Set matrix equal to values in the string `str`.
Mat< Num_T > & | operator+= (const Mat< Num_T > &m)
| Addition of matrices.
Mat< Num_T > & | operator+= (Num_T t)
| Addition of scalar to matrix.
Mat< Num_T > & | operator-= (const Mat< Num_T > &m)
| Subtraction of matrix.
Mat< Num_T > & | operator-= (Num_T t)
| Subtraction of scalar from matrix.
Mat< Num_T > & | operator*= (const Mat< Num_T > &m)
| Matrix multiplication.
Mat< Num_T > & | operator*= (Num_T t)
| Multiplication by a scalar.
Mat< Num_T > & | operator/= (Num_T t)
| Division by a scalar.
Mat< Num_T > & | operator/= (const Mat< Num_T > &m)
| Element-wise division with the current matrix.
bool | operator== (const Mat< Num_T > &m) const
| Compare two matrices. False if wrong sizes or different values.
bool | operator!= (const Mat< Num_T > &m) const
| Compare two matrices. True if different.
Num_T & | _elem (int r, int c)
| Get element (r,c) from matrix without boundary check (not recommended to use)
const Num_T & | _elem (int r, int c) const
| Get element (r,c) from matrix without boundary check (not recommended to use)
Num_T & | _elem (int i)
| Get element `i` using linear addressing (by rows) without boundary check (not recommended to use)
const Num_T & | _elem (int i) const
| Get element `i` using linear addressing (by rows) without boundary check (not recommended to use)
Num_T * | _data ()
| Access of the internal data structure (not recommended to use)
const Num_T * | _data () const
| Access to the internal data structure (not recommended to use)
int | _datasize () const
| Access to the internal data structure (not recommended to use)

## Protected Member Functions

void | alloc (int rows, int cols)
| Allocate memory for the matrix.
void | free ()
| Free the memory space of the matrix.

## Protected Attributes

Num_T * | data
| Protected data pointer.
const Factory & | factory
| Element factory (set to DEFAULT_FACTORY to use Num_T default constructors only)
int | datasize
int | no_rows
int | no_cols

## Friends

Mat< Num_T > | concat_horizontal (const Mat< Num_T > &m1, const Mat< Num_T > &m2)
| Concatenate the matrices `m1` and `m2` horizontally.
Mat< Num_T > | concat_vertical (const Mat< Num_T > &m1, const Mat< Num_T > &m2)
| Concatenate the matrices `m1` and `m2` vertically.
Mat< Num_T > | operator+ (const Mat< Num_T > &m1, const Mat< Num_T > &m2)
| Addition of two matrices.
Mat< Num_T > | operator+ (const Mat< Num_T > &m, Num_T t)
| Addition of matrix and scalar.
Mat< Num_T > | operator+ (Num_T t, const Mat< Num_T > &m)
| Addition of scalar and matrix.
Mat< Num_T > | operator- (const Mat< Num_T > &m1, const Mat< Num_T > &m2)
| Subtraction of `m2` from `m1`.
Mat< Num_T > | operator- (const Mat< Num_T > &m, Num_T t)
| Subtraction of scalar from matrix.
Mat< Num_T > | operator- (Num_T t, const Mat< Num_T > &m)
| Subtract matrix from scalar.
Mat< Num_T > | operator- (const Mat< Num_T > &m)
| Subtraction of matrix.
Mat< Num_T > | elem_mult (const Mat< Num_T > &m1, const Mat< Num_T > &m2)
| Element wise multiplication of two matrices.
void | elem_mult_out (const Mat< Num_T > &m1, const Mat< Num_T > &m2, Mat< Num_T > &out)
| Element wise multiplication of two matrices, storing the result in matrix `out`.
void | elem_mult_out (const Mat< Num_T > &m1, const Mat< Num_T > &m2, const Mat< Num_T > &m3, Mat< Num_T > &out)
| Element wise multiplication of three matrices, storing the result in matrix `out`.
void | elem_mult_out (const Mat< Num_T > &m1, const Mat< Num_T > &m2, const Mat< Num_T > &m3, const Mat< Num_T > &m4, Mat< Num_T > &out)
| Element wise multiplication of four matrices, storing the result in matrix `out`.
void | elem_mult_inplace (const Mat< Num_T > &m1, Mat< Num_T > &m2)
| In-place element wise multiplication of two matrices. Fast version of B = elem_mult(A, B).
Num_T | elem_mult_sum (const Mat< Num_T > &m1, const Mat< Num_T > &m2)
| Element wise multiplication of two matrices, followed by summation of the resultant elements. Fast version of sumsum(elem_mult(A, B)).
Mat< Num_T > | operator/ (const Mat< Num_T > &m, Num_T t)
| Element-wise division by a scalar.
Mat< Num_T > | operator/ (Num_T t, const Mat< Num_T > &m)
| Element-wise division (`t` is the dividend, elements of `m` are divisors)
Mat< Num_T > | elem_div (const Mat< Num_T > &m1, const Mat< Num_T > &m2)
| Element wise division of two matrices.
void | elem_div_out (const Mat< Num_T > &m1, const Mat< Num_T > &m2, Mat< Num_T > &out)
| Element wise division of two matrices, storing the result in matrix `out`.
Num_T | elem_div_sum (const Mat< Num_T > &m1, const Mat< Num_T > &m2)
| Element wise division of two matrices, followed by summation of the resultant elements. Fast version of sumsum(elem_div(A, B)).

## Related Symbols

(Note that these are not member symbols.)
typedef Mat< double > | mat
| Default Matrix Type.
typedef Mat< std::complex< double > > | cmat
| Default Complex Matrix Type.
typedef Mat< int > | imat
| Integer matrix.
typedef Mat< short int > | smat
| short int matrix
template<class T >
bmat | to_bmat (const Mat< T > &m)
| Converts a Mat<T> to bmat.
template<class T >
smat | to_smat (const Mat< T > &m)
| Converts a Mat<T> to smat.
template<class T >
imat | to_imat (const Mat< T > &m)
| Converts a Mat<T> to imat.
template<class T >
mat | to_mat (const Mat< T > &m)
| Converts a Mat<T> to mat.
template<class T >
cmat | to_cmat (const Mat< T > &m)
| Converts a Mat<T> to cmat.
template<class T >
cmat | to_cmat (const Mat< T > &real, const Mat< T > &imag)
| Converts real and imaginary Mat<T> to cmat.
ITPP_EXPORT void | sub_v_vT_m (mat &m, const vec &v)
| Calculates m=m-v*v'*m.
ITPP_EXPORT void | sub_m_v_vT (mat &m, const vec &v)
| Calculates m=m-m*v*v'.
template<class T >
Mat< T > | repmat (const Mat< T > &data, int m, int n)
| Creates a matrix with `m` by `n` copies of the matrix `data`.
template<class T >
Mat< T > | repmat (const Vec< T > &v, int m, int n, bool transpose=false)
| Returns a matrix with `m` by `n` copies of the vector `data`.
mat | operator+ (const float &s, const mat &m)
| Addition operator for float and mat.
mat | operator+ (const short &s, const mat &m)
| Addition operator for short and mat.
mat | operator+ (const int &s, const mat &m)
| Addition operator for int and mat.
mat | operator+ (const mat &m, const float &s)
| Addition operator for mat and float.
mat | operator+ (const mat &m, const short &s)
| Addition operator for mat and short.
mat | operator+ (const mat &m, const int &s)
| Addition operator for mat and int.
mat | operator- (const float &s, const mat &m)
| Subtraction operator for float and mat.
mat | operator- (const short &s, const mat &m)
| Subtraction operator for short and mat.
mat | operator- (const int &s, const mat &m)
| Subtraction operator for int and mat.
mat | operator- (const mat &m, const float &s)
| Subtraction operator for mat and float.
mat | operator- (const mat &m, const short &s)
| Subtraction operator for mat and short.
mat | operator- (const mat &m, const int &s)
| Subtraction operator for mat and int.
mat | operator* (const float &s, const mat &m)
| Multiplication operator for float and mat.
mat | operator* (const short &s, const mat &m)
| Multiplication operator for short and mat.
mat | operator* (const int &s, const mat &m)
| Multiplication operator for int and mat.
mat | operator* (const mat &m, const float &s)
| Multiplication operator for mat and float.
mat | operator* (const mat &m, const short &s)
| Multiplication operator for mat and short.
mat | operator* (const mat &m, const int &s)
| Multiplication operator for mat and int.
mat | operator/ (const mat &m, const float &s)
| Division operator for mat and float.
mat | operator/ (const mat &m, const short &s)
| Division operator for mat and short.
mat | operator/ (const mat &m, const int &s)
| Division operator for mat and int.
ITPP_EXPORT cmat | operator+ (const double &s, const cmat &m)
| Addition operator for double and cmat.
ITPP_EXPORT cmat | operator- (const double &s, const cmat &m)
| Subtraction operator for double and cmat.
ITPP_EXPORT cmat | operator* (const double &s, const cmat &m)
| Multiplication operator for double and cmat.
ITPP_EXPORT cmat | operator* (const std::complex< double > &s, const mat &m)
| Multiplication operator for complex<double> and mat.
cmat | operator* (const mat &m, const std::complex< double > &s)
| Multiplication operator for mat and complex<double>
ITPP_EXPORT cmat | operator/ (const cmat &m, const double &s)
| Division operator for cmat and double.
ITPP_EXPORT mat | operator+ (const bmat &a, const mat &b)
| Addition operator for bmat and mat.
ITPP_EXPORT mat | operator+ (const smat &a, const mat &b)
| Addition operator for smat and mat.
ITPP_EXPORT mat | operator+ (const imat &a, const mat &b)
| Addition operator for imat and mat.
mat | operator+ (const mat &a, const bmat &b)
| Addition operator for mat and bmat.
mat | operator+ (const mat &a, const smat &b)
| Addition operator for mat and smat.
mat | operator+ (const mat &a, const imat &b)
| Addition operator for mat and imat.
mat | operator- (const bmat &a, const mat &b)
| Subtraction operator for bmat and mat.
mat | operator- (const smat &a, const mat &b)
| Subtraction operator for smat and mat.
mat | operator- (const imat &a, const mat &b)
| Subtraction operator for imat and mat.
mat | operator- (const mat &a, const bmat &b)
| Subtraction operator for mat and bmat.
mat | operator- (const mat &a, const smat &b)
| Subtraction operator for mat and smat.
mat | operator- (const mat &a, const imat &b)
| Subtraction operator for mat and imat.
ITPP_EXPORT cmat | operator+ (const bmat &a, const cmat &b)
| Addition operator for bmat and cmat.
ITPP_EXPORT cmat | operator+ (const smat &a, const cmat &b)
| Addition operator for smat and cmat.
ITPP_EXPORT cmat | operator+ (const imat &a, const cmat &b)
| Addition operator for imat and cmat.
ITPP_EXPORT cmat | operator+ (const mat &a, const cmat &b)
| Addition operator for mat and cmat.
cmat | operator+ (const cmat &a, const bmat &b)
| Addition operator for cmat and bmat.
cmat | operator+ (const cmat &a, const smat &b)
| Addition operator for cmat and smat.
cmat | operator+ (const cmat &a, const imat &b)
| Addition operator for cmat and imat.
cmat | operator+ (const cmat &a, const mat &b)
| Addition operator for cmat and mat.
cmat | operator- (const bmat &a, const cmat &b)
| Subtraction operator for bmat and cmat.
cmat | operator- (const smat &a, const cmat &b)
| Subtraction operator for smat and cmat.
cmat | operator- (const imat &a, const cmat &b)
| Subtraction operator for imat and cmat.
cmat | operator- (const mat &a, const cmat &b)
| Subtraction operator for mat and cmat.
cmat | operator- (const cmat &a, const bmat &b)
| Subtraction operator for cmat and bmat.
cmat | operator- (const cmat &a, const smat &b)
| Subtraction operator for cmat and smat.
cmat | operator- (const cmat &a, const imat &b)
| Subtraction operator for cmat and imat.
cmat | operator- (const cmat &a, const mat &b)
| Subtraction operator for cmat and mat.
cmat | operator* (const mat &a, const cmat &b)
| Multiplication operator for mat and cmat.
cmat | operator* (const bmat &a, const cmat &b)
| Multiplication operator for bmat and cmat.
cmat | operator* (const smat &a, const cmat &b)
| Multiplication operator for smat and cmat.
cmat | operator* (const imat &a, const cmat &b)
| Multiplication operator for imat and cmat.
cmat | operator* (const cmat &a, const mat &b)
| Multiplication operator for cmat and mat.
cmat | operator* (const cmat &a, const bmat &b)
| Multiplication operator for cmat and bmat.
cmat | operator* (const cmat &a, const smat &b)
| Multiplication operator for cmat and smat.
cmat | operator* (const cmat &a, const imat &b)
| Multiplication operator for cmat and imat.
template<class T >
Mat< T > | mat_1x1 (T m00)
| Matrix of size 1 by 1.
template<class T >
Mat< T > | mat_1x2 (T m00, T m01)
| Matrix of size 1 by 2.
template<class T >
Mat< T > | mat_2x1 (T m00, T m10)
| Matrix of size 2 by 1.
template<class T >
Mat< T > | mat_2x2 (T m00, T m01, T m10, T m11)
| Matrix of size 2 by 2.
template<class T >
Mat< T > | mat_1x3 (T m00, T m01, T m02)
| Matrix of size 1 by 3.
template<class T >
Mat< T > | mat_3x1 (T m00, T m10, T m20)
| Matrix of size 3 by 1.
template<class T >
Mat< T > | mat_2x3 (T m00, T m01, T m02, T m10, T m11, T m12)
| Matrix of size 2 by 3.
template<class T >
Mat< T > | mat_3x2 (T m00, T m01, T m10, T m11, T m20, T m21)
| Matrix of size 3 by 2.
template<class T >
Mat< T > | mat_3x3 (T m00, T m01, T m02, T m10, T m11, T m12, T m20, T m21, T m22)
| Matrix of size 3 by 3.

## Detailed Description

template<class Num_T>
class itpp::Mat< Num_T >

Matrix Class (Templated)

Author
  Tony Ottosson, Tobias Ringstrom, Adam Piatyszek and Conrad Sanderson

Matrices can be of arbitrarily types, but conversions and functions are prepared for `bin`, `short`, `int`, `double`, and `complex<double>` vectors and these are predefined as: `bmat`, `smat`, `imat`, `mat`, and `cmat`. `double` and `complex<double>` are usually `double` and `complex<double>` respectively. However, this can be changed when compiling the it++ (see installation notes for more details). (Note: for binary matrices, an alternative to the bmat class is `GF2mat` and `GF2mat_dense`, which offer a more memory efficient representation and additional functions for linear algebra.)

Examples:

Matrix Constructors: When constructing a matrix without dimensions (memory) use

mat temp;
itpp::Array
General array class.
Definition array.h:105
itpp::Mat
Matrix Class (Templated)
Definition mat.h:202

For construction of a matrix of a given size use

mat temp(rows, cols);
itpp::Mat::rows
int rows() const
The number of rows.
Definition mat.h:237
itpp::Mat::cols
int cols() const
The number of columns.
Definition mat.h:235

It is also possible to assign the constructed matrix the value and dimension of another matrix by

vec temp(inmatrix);

If you have explicit values you would like to assign to the matrix it is possible to do this using strings as:

mat a("0 0.7;5 9.3"); // that is a = [0, 0.7; 5, 9.3]
mat a="0 0.7;5 9.3"; // the constructor are called implicitly

It is also possible to change dimension by

temp.set_size(new_rows, new_cols, false);
itpp::Array::set_size
void set_size(int n, bool copy=false)
Resizing an Array<T>.
Definition array.h:257

where `false` is used to indicate that the old values in `temp` is not copied. If you like to preserve the values use `true`.

There are a number of methods to access parts of a matrix. Examples are

a(5,3); // Element number (5,3)
a(5,9,3,5); // Sub-matrix from rows 5, 6, 7, 8, 9 the columns 3, 4, and 5
a.get_row(10); // Row 10
a.get_col(10); // Column 10

It is also possible to modify parts of a vector as e.g. in

a.set_row(5, invector); // Set row 5 to \c invector
a.set_col(3, invector); // Set column 3 to \c invector
a.copy_col(1, 5); // Copy column 5 to column 1
a.swap_cols(1, 5); // Swap the contents of columns 1 and 5

It is of course also possible to perform the common linear algebra methods such as addition, subtraction, and matrix multiplication. Observe though, that vectors are assumed to be column-vectors in operations with matrices.

Most elementary functions such as sin(), cosh(), log(), abs(), ..., are available as operations on the individual elements of the matrices. Please see the individual functions for more details.

By default, the Mat elements are created using the default constructor for the element type. This can be changed by specifying a suitable Factory in the Mat constructor call; see Detailed Description for Factory.

Definition at line 201 of file mat.h.

## Member Typedef Documentation

## value_type

template<class Num_T >

typedef Num_T itpp::Mat< Num_T >::value_type

The type of the matrix values.

Definition at line 205 of file mat.h.

## Constructor & Destructor Documentation

## Mat() [1/8]

template<class Num_T >

itpp::Mat< Num_T >::Mat | ( | const Factory & | f = `DEFAULT_FACTORY` | ) |

inlineexplicit

Default constructor. An element factory `f` can be specified.

Definition at line 575 of file mat.h.

## Mat() [2/8]

template<class Num_T >

itpp::Mat< Num_T >::Mat | ( | int | rows,
|  | int | cols,
|  | const Factory & | f = `DEFAULT_FACTORY`
| ) |  |

inline

Create a matrix of size (rows, cols). An element factory `f` can be specified.

Definition at line 579 of file mat.h.

References itpp::Mat< Num_T >::alloc(), itpp::Mat< Num_T >::cols(), it_assert_debug, and itpp::Mat< Num_T >::rows().

## Mat() [3/8]

template<class Num_T >

itpp::Mat< Num_T >::Mat | ( | const Mat< Num_T > & | m | ) |

inline

Copy constructor.

Definition at line 587 of file mat.h.

References itpp::Mat< Num_T >::alloc(), itpp::Array< T >::data, and itpp::Mat< Num_T >::data.

## Mat() [4/8]

template<class Num_T >

itpp::Mat< Num_T >::Mat | ( | const Mat< Num_T > & | m,
|  | const Factory & | f
| ) |  |

inline

Constructor, similar to the copy constructor, but also takes an element factory `f` as argument.

Definition at line 595 of file mat.h.

References itpp::Mat< Num_T >::alloc(), itpp::Array< T >::data, and itpp::Mat< Num_T >::data.

## Mat() [5/8]

template<class Num_T >

itpp::Mat< Num_T >::Mat | ( | const Vec< Num_T > & | v,
|  | const Factory & | f = `DEFAULT_FACTORY`
| ) |  |

inline

Construct a matrix from a column vector `v`. An element factory `f` can be specified.

Definition at line 603 of file mat.h.

References itpp::Mat< Num_T >::alloc(), itpp::Mat< Num_T >::data, itpp::Array< T >::size(), and itpp::Mat< Num_T >::size().

## Mat() [6/8]

template<class Num_T >

itpp::Mat< Num_T >::Mat | ( | const std::string & | str,
|  | const Factory & | f = `DEFAULT_FACTORY`
| ) |  |

inline

Set matrix equal to values in string `str`. An element factory `f` can be specified.

Definition at line 612 of file mat.h.

References itpp::Mat< Num_T >::set().

## Mat() [7/8]

template<class Num_T >

itpp::Mat< Num_T >::Mat | ( | const char * | str,
|  | const Factory & | f = `DEFAULT_FACTORY`
| ) |  |

inline

Set matrix equal to values in string `str`. An element factory `f` can be specified.

Definition at line 619 of file mat.h.

References itpp::Mat< Num_T >::set().

## Mat() [8/8]

template<class Num_T >

itpp::Mat< Num_T >::Mat | ( | const Num_T * | c_array,
|  | int | rows,
|  | int | cols,
|  | bool | row_major = `true`,
|  | const Factory & | f = `DEFAULT_FACTORY`
| ) |  |

Constructor taking a C-array as input. An element factory `f` can be specified.

By default the matrix is stored as a row-major matrix (i.e. listing elements in sequence beginning with the first column).

Definition at line 626 of file mat.h.

References itpp::Mat< Num_T >::alloc(), itpp::Mat< Num_T >::cols(), itpp::Mat< Num_T >::data, itpp::Mat< Num_T >::datasize, itpp::Mat< Num_T >::no_cols, itpp::Mat< Num_T >::no_rows, and itpp::Mat< Num_T >::rows().

## ~Mat()

template<class Num_T >

itpp::Mat< Num_T >::~Mat | ( |  | ) |

inline

Destructor.

Definition at line 640 of file mat.h.

References itpp::Array< T >::free().

## Member Function Documentation

## cols()

template<class Num_T >

int itpp::Mat< Num_T >::cols | ( |  | ) | const

inline

The number of columns.

Definition at line 235 of file mat.h.

References itpp::Mat< Num_T >::no_cols.

Referenced by itpp::Mat< Num_T >::Mat(), itpp::Mat< Num_T >::Mat(), itpp::operator*(), itpp::operator*(), itpp::Mat< Num_T >::operator*(), itpp::operator*(), itpp::Mat< Num_T >::operator*(), itpp::operator+(), itpp::Mat< Num_T >::operator+(), itpp::Mat< Num_T >::operator+(), itpp::Mat< Num_T >::operator+(), itpp::Mat< Num_T >::operator+(), itpp::Mat< Num_T >::operator+(), itpp::Mat< Num_T >::operator-(), itpp::Mat< Num_T >::operator/(), itpp::Mat< Num_T >::sub_m_v_vT(), itpp::Mat< Num_T >::sub_v_vT_m(), itpp::to_cmat(), itpp::LLR_calc_unit::to_double(), and itpp::to_mat().

## rows()

template<class Num_T >

int itpp::Mat< Num_T >::rows | ( |  | ) | const

inline

The number of rows.

Definition at line 237 of file mat.h.

References itpp::Mat< Num_T >::no_rows.

Referenced by itpp::Mat< Num_T >::Mat(), itpp::Mat< Num_T >::Mat(), itpp::operator*(), itpp::operator*(), itpp::Mat< Num_T >::operator*(), itpp::operator*(), itpp::Mat< Num_T >::operator*(), itpp::operator+(), itpp::Mat< Num_T >::operator+(), itpp::Mat< Num_T >::operator+(), itpp::Mat< Num_T >::operator+(), itpp::Mat< Num_T >::operator+(), itpp::Mat< Num_T >::operator+(), itpp::Mat< Num_T >::operator-(), itpp::Mat< Num_T >::operator/(), itpp::Mat< Num_T >::sub_m_v_vT(), itpp::to_cmat(), itpp::LLR_calc_unit::to_double(), itpp::to_mat(), and itpp::LLR_calc_unit::to_qllr().

## size()

template<class Num_T >

int itpp::Mat< Num_T >::size | ( |  | ) | const

inline

The number of elements.

Definition at line 239 of file mat.h.

References itpp::Mat< Num_T >::datasize.

Referenced by itpp::lshift_fix(), itpp::lshift_fix(), itpp::Mat< Num_T >::Mat(), itpp::rshift_fix(), itpp::rshift_fix(), itpp::rshift_fix(), itpp::rshift_fix(), itpp::set_fix(), itpp::set_fix(), itpp::set_fix(), itpp::set_fix(), itpp::set_fix(), and itpp::set_fix().

## set_size()

template<class Num_T >

void itpp::Mat< Num_T >::set_size | ( | int | rows,
|  | int | cols,
|  | bool | copy = `false`
| ) |  |

Set size of matrix. If copy = true then keep the data before resizing.

Definition at line 647 of file mat.h.

References itpp::Array< T >::alloc(), itpp::Array< T >::data, itpp::destroy_elements(), itpp::Array< T >::free(), and it_assert_debug.

Referenced by itpp::GF2mat::GF2mat(), itpp::GF2mat::GF2mat(), itpp::GF2mat::GF2mat(), itpp::GF2mat::GF2mat(), itpp::GF2mat::GF2mat(), itpp::GF2mat::GF2mat(), itpp::GF2mat::GF2mat(), itpp::set_fix(), itpp::set_fix(), itpp::set_fix(), itpp::set_fix(), itpp::set_fix(), itpp::set_fix(), and itpp::GF2mat::set_size().

## zeros()

template<class Num_T >

void itpp::Mat< Num_T >::zeros | ( |  | ) |

inline

Set matrix equal to the all zero matrix.

Definition at line 698 of file mat.h.

References itpp::Array< T >::data.

Referenced by itpp::Mat< Num_T >::clear().

## clear()

template<class Num_T >

void itpp::Mat< Num_T >::clear | ( |  | ) |

inline

Set matrix equal to the all zero matrix.

Definition at line 245 of file mat.h.

References itpp::Mat< Num_T >::zeros().

Referenced by itpp::GF2mat::GF2mat(), itpp::GF2mat::GF2mat(), itpp::GF2mat::GF2mat(), itpp::GF2mat::GF2mat(), and itpp::GF2mat::set_size().

## ones()

template<class Num_T >

void itpp::Mat< Num_T >::ones | ( |  | ) |

inline

Set matrix equal to the all one matrix.

Definition at line 705 of file mat.h.

References itpp::Array< T >::data.

## set() [1/2]

template<class Num_T >

void itpp::Mat< Num_T >::set | ( | const std::string & | str | ) |

Set matrix equal to values in the string `str`.

Definition at line 762 of file mat.h.

References itpp::Array< T >::free(), itpp::Array< T >::set_size(), and itpp::Array< T >::size().

Referenced by itpp::Mat< Num_T >::Mat(), itpp::Mat< Num_T >::Mat(), itpp::set_fix(), itpp::set_fix(), itpp::set_fix(), itpp::set_fix(), itpp::set_fix(), and itpp::set_fix().

## operator()() [1/5]

template<class Num_T >

const Num_T & itpp::Mat< Num_T >::operator() | ( | int | r,
|  | int | c
| ) |  | const

inline

Get element (r,c) from matrix.

Definition at line 712 of file mat.h.

References itpp::Array< T >::data, itpp::Array< T >::in_range(), and it_assert_debug.

## operator()() [2/5]

template<class Num_T >

Num_T & itpp::Mat< Num_T >::operator() | ( | int | r,
|  | int | c
| ) |  |

inline

Get element (r,c) from matrix.

Definition at line 720 of file mat.h.

References itpp::Array< T >::data, itpp::Array< T >::in_range(), and it_assert_debug.

## operator()() [3/5]

template<class Num_T >

const Num_T & itpp::Mat< Num_T >::operator() | ( | int | i | ) | const

inline

Get element `i` using linear addressing (by rows)

Definition at line 735 of file mat.h.

References itpp::Array< T >::data, itpp::Array< T >::in_range(), and it_assert_debug.

## operator()() [4/5]

template<class Num_T >

Num_T & itpp::Mat< Num_T >::operator() | ( | int | i | ) |

inline

Get element `i` using linear addressing (by rows)

Definition at line 728 of file mat.h.

References itpp::Array< T >::data, itpp::Array< T >::in_range(), and it_assert_debug.

## get() [1/3]

template<class Num_T >

const Num_T & itpp::Mat< Num_T >::get | ( | int | r,
|  | int | c
| ) |  | const

inline

Get element (r,c) from matrix.

Definition at line 742 of file mat.h.

## get() [2/3]

template<class Num_T >

const Num_T & itpp::Mat< Num_T >::get | ( | int | i | ) | const

inline

Get element `i` using linear addressing (by rows)

Definition at line 748 of file mat.h.

## set() [2/2]

template<class Num_T >

void itpp::Mat< Num_T >::set | ( | int | r,
|  | int | c,
|  | Num_T | t
| ) |  |

inline

Set element (r,c) of matrix.

Definition at line 754 of file mat.h.

References itpp::Array< T >::data, itpp::Array< T >::in_range(), and it_assert_debug.

## operator()() [5/5]

template<class Num_T >

Mat< Num_T > itpp::Mat< Num_T >::operator() | ( | int | r1,
|  | int | r2,
|  | int | c1,
|  | int | c2
| ) |  | const

inline

Sub-matrix from row `r1` to row `r2` and columns `c1` to `c2`.

Value -1 indicates the last row and column, respectively.

Definition at line 826 of file mat.h.

References itpp::Array< T >::data, and it_assert_debug.

## get() [3/3]

template<class Num_T >

Mat< Num_T > itpp::Mat< Num_T >::get | ( | int | r1,
|  | int | r2,
|  | int | c1,
|  | int | c2
| ) |  | const

inline

Sub-matrix from row `r1` to row `r2` and columns `c1` to `c2`.

Value -1 indicates the last row and column, respectively.

Definition at line 846 of file mat.h.

## get_row()

template<class Num_T >

Vec< Num_T > itpp::Mat< Num_T >::get_row | ( | int | r | ) | const

inline

Get row `r`.

Definition at line 852 of file mat.h.

References itpp::Array< T >::data, and it_assert_debug.

## get_rows() [1/2]

template<class Num_T >

Mat< Num_T > itpp::Mat< Num_T >::get_rows | ( | int | r1,
|  | int | r2
| ) |  | const

Get rows `r1` through `r2`.

Definition at line 862 of file mat.h.

References itpp::Array< T >::data, and it_assert_debug.

## get_rows() [2/2]

template<class Num_T >

Mat< Num_T > itpp::Mat< Num_T >::get_rows | ( | const Vec< int > & | indexlist | ) | const

Get the rows specified by `indexlist`.

Definition at line 875 of file mat.h.

References itpp::Array< T >::data, it_assert_debug, and itpp::Array< T >::size().

## get_col()

template<class Num_T >

Vec< Num_T > itpp::Mat< Num_T >::get_col | ( | int | c | ) | const

inline

Get column `c`.

Definition at line 889 of file mat.h.

References itpp::Array< T >::data, and it_assert_debug.

## get_cols() [1/2]

template<class Num_T >

Mat< Num_T > itpp::Mat< Num_T >::get_cols | ( | int | c1,
|  | int | c2
| ) |  | const

Get columns `c1` through `c2`.

Definition at line 900 of file mat.h.

References itpp::Array< T >::data, and it_assert_debug.

## get_cols() [2/2]

template<class Num_T >

Mat< Num_T > itpp::Mat< Num_T >::get_cols | ( | const Vec< int > & | indexlist | ) | const

Get the columns specified by `indexlist`.

Definition at line 913 of file mat.h.

References itpp::Array< T >::data, it_assert_debug, and itpp::Array< T >::size().

## set_row()

template<class Num_T >

void itpp::Mat< Num_T >::set_row | ( | int | r,
|  | const Vec< Num_T > & | v
| ) |  |

inline

Set row `r` to vector `v`.

Definition at line 927 of file mat.h.

References itpp::Array< T >::data, it_assert_debug, and itpp::Array< T >::size().

## set_col()

template<class Num_T >

void itpp::Mat< Num_T >::set_col | ( | int | c,
|  | const Vec< Num_T > & | v
| ) |  |

inline

Set column `c` to vector `v`.

Definition at line 936 of file mat.h.

References itpp::Array< T >::data, it_assert_debug, and itpp::Array< T >::size().

## set_rows()

template<class Num_T >

void itpp::Mat< Num_T >::set_rows | ( | int | r,
|  | const Mat< Num_T > & | m
| ) |  |

Set rows to matrix `m`, staring from row `r`.

Definition at line 946 of file mat.h.

References itpp::Array< T >::data, and it_assert_debug.

## set_cols()

template<class Num_T >

void itpp::Mat< Num_T >::set_cols | ( | int | c,
|  | const Mat< Num_T > & | m
| ) |  |

Set columns to matrix `m`, starting from column `c`.

Definition at line 960 of file mat.h.

References itpp::Array< T >::data, and it_assert_debug.

## copy_row()

template<class Num_T >

void itpp::Mat< Num_T >::copy_row | ( | int | to,
|  | int | from
| ) |  |

inline

Copy row `from` onto row `to`.

Definition at line 975 of file mat.h.

References itpp::Array< T >::data, it_assert_debug, and itpp::to().

## copy_col()

template<class Num_T >

void itpp::Mat< Num_T >::copy_col | ( | int | to,
|  | int | from
| ) |  |

inline

Copy column `from` onto column `to`.

Definition at line 986 of file mat.h.

References itpp::Array< T >::data, it_assert_debug, and itpp::to().

## swap_rows()

template<class Num_T >

void itpp::Mat< Num_T >::swap_rows | ( | int | r1,
|  | int | r2
| ) |  |

inline

Swap the rows `r1` and `r2`.

Definition at line 997 of file mat.h.

References itpp::Array< T >::data, and it_assert_debug.

## swap_cols()

template<class Num_T >

void itpp::Mat< Num_T >::swap_cols | ( | int | c1,
|  | int | c2
| ) |  |

inline

Swap the columns `c1` and `c2`.

Definition at line 1008 of file mat.h.

References itpp::Array< T >::data, and it_assert_debug.

## set_submatrix() [1/3]

template<class Num_T >

void itpp::Mat< Num_T >::set_submatrix | ( | int | r1,
|  | int | r2,
|  | int | c1,
|  | int | c2,
|  | const Mat< Num_T > & | m
| ) |  |

This function is deprecated. Please use set_submatrix(int r, int c, const Mat<> &m) instead.

Definition at line 1019 of file mat.h.

References it_warning.

## set_submatrix() [2/3]

template<class Num_T >

void itpp::Mat< Num_T >::set_submatrix | ( | int | r,
|  | int | c,
|  | const Mat< Num_T > & | m
| ) |  |

inline

Set submatrix defined by upper-left element (r,c) and the size of matrix m to m.

Definition at line 1028 of file mat.h.

References itpp::Array< T >::data, and it_assert_debug.

## set_submatrix() [3/3]

template<class Num_T >

void itpp::Mat< Num_T >::set_submatrix | ( | int | r1,
|  | int | r2,
|  | int | c1,
|  | int | c2,
|  | Num_T | t
| ) |  |

inline

Set all elements of submatrix defined by rows r1,r2 and columns c1,c2 to value t.

Definition at line 1041 of file mat.h.

References itpp::Array< T >::data, and it_assert_debug.

## del_row()

template<class Num_T >

void itpp::Mat< Num_T >::del_row | ( | int | r | ) |

Delete row number `r`.

Definition at line 1058 of file mat.h.

References itpp::Array< T >::data, it_assert_debug, and itpp::Array< T >::set_size().

## del_rows()

template<class Num_T >

void itpp::Mat< Num_T >::del_rows | ( | int | r1,
|  | int | r2
| ) |  |

Delete rows from `r1` to `r2`.

Definition at line 1073 of file mat.h.

References itpp::Array< T >::data, it_assert_debug, and itpp::Array< T >::set_size().

## del_col()

template<class Num_T >

void itpp::Mat< Num_T >::del_col | ( | int | c | ) |

Delete column number `c`.

Definition at line 1090 of file mat.h.

References itpp::Array< T >::data, it_assert_debug, and itpp::Array< T >::set_size().

## del_cols()

template<class Num_T >

void itpp::Mat< Num_T >::del_cols | ( | int | c1,
|  | int | c2
| ) |  |

Delete columns from `c1` to `c2`.

Definition at line 1101 of file mat.h.

References itpp::Array< T >::data, it_assert_debug, and itpp::Array< T >::set_size().

## ins_row()

template<class Num_T >

void itpp::Mat< Num_T >::ins_row | ( | int | r,
|  | const Vec< Num_T > & | v
| ) |  |

Insert vector `v` at row number `r`. The matrix can be empty.

Definition at line 1113 of file mat.h.

References itpp::Array< T >::data, it_assert_debug, itpp::Array< T >::set_size(), and itpp::Array< T >::size().

## ins_col()

template<class Num_T >

void itpp::Mat< Num_T >::ins_col | ( | int | c,
|  | const Vec< Num_T > & | v
| ) |  |

Insert vector `v` at column number `c`. The matrix can be empty.

Definition at line 1137 of file mat.h.

References itpp::Array< T >::data, it_assert_debug, itpp::Array< T >::set_size(), and itpp::Array< T >::size().

## append_row()

template<class Num_T >

void itpp::Mat< Num_T >::append_row | ( | const Vec< Num_T > & | v | ) |

inline

Append vector `v` to the bottom of the matrix. The matrix can be empty.

Definition at line 1157 of file mat.h.

## append_col()

template<class Num_T >

void itpp::Mat< Num_T >::append_col | ( | const Vec< Num_T > & | v | ) |

inline

Append vector `v` to the right side of the matrix. The matrix can be empty.

Definition at line 1163 of file mat.h.

## transpose()

template<class Num_T >

Mat< Num_T > itpp::Mat< Num_T >::transpose | ( |  | ) | const

Matrix transpose.

Definition at line 1169 of file mat.h.

References itpp::Array< T >::data.

Referenced by itpp::Mat< Num_T >::T().

## T()

template<class Num_T >

Mat< Num_T > itpp::Mat< Num_T >::T | ( |  | ) | const

inline

Matrix transpose.

Definition at line 337 of file mat.h.

References itpp::Mat< Num_T >::transpose().

## hermitian_transpose()

template<class Num_T >

Mat< Num_T > itpp::Mat< Num_T >::hermitian_transpose | ( |  | ) | const

Hermitian matrix transpose (conjugate transpose)

Definition at line 1179 of file mat.h.

References itpp::Array< T >::data.

Referenced by itpp::Mat< Num_T >::H().

## H()

template<class Num_T >

Mat< Num_T > itpp::Mat< Num_T >::H | ( |  | ) | const

inline

Hermitian matrix transpose (conjugate transpose)

Definition at line 341 of file mat.h.

References itpp::Mat< Num_T >::hermitian_transpose().

## operator=() [1/5]

template<class Num_T >

Mat< Num_T > & itpp::Mat< Num_T >::operator= | ( | Num_T | t | ) |

inline

Set all elements of the matrix equal to `t`.

Definition at line 1237 of file mat.h.

References itpp::Array< T >::data.

## operator=() [2/5]

template<class Num_T >

Mat< Num_T > & itpp::Mat< Num_T >::operator= | ( | const Mat< Num_T > & | m | ) |

inline

Set matrix equal to `m`.

Definition at line 1245 of file mat.h.

References itpp::Array< T >::data, and itpp::Array< T >::set_size().

## operator=() [3/5]

template<class Num_T >

Mat< Num_T > & itpp::Mat< Num_T >::operator= | ( | const Vec< Num_T > & | v | ) |

inline

Set matrix equal to the vector `v`, assuming column vector.

Definition at line 1256 of file mat.h.

References itpp::Array< T >::data, it_assert_debug, itpp::Array< T >::set_size(), and itpp::Array< T >::size().

## operator=() [4/5]

template<class Num_T >

Mat< Num_T > & itpp::Mat< Num_T >::operator= | ( | const std::string & | str | ) |

inline

Set matrix equal to values in the string `str`.

Definition at line 1267 of file mat.h.

## operator=() [5/5]

template<class Num_T >

Mat< Num_T > & itpp::Mat< Num_T >::operator= | ( | const char * | str | ) |

inline

Set matrix equal to values in the string `str`.

Definition at line 1274 of file mat.h.

## operator+=() [1/2]

template<class Num_T >

Mat< Num_T > & itpp::Mat< Num_T >::operator+= | ( | const Mat< Num_T > & | m | ) |

Addition of matrices.

Definition at line 1283 of file mat.h.

References itpp::Array< T >::data, it_assert_debug, and itpp::Array< T >::operator=().

## operator+=() [2/2]

template<class Num_T >

Mat< Num_T > & itpp::Mat< Num_T >::operator+= | ( | Num_T | t | ) |

inline

Addition of scalar to matrix.

Definition at line 1301 of file mat.h.

References itpp::Array< T >::data.

## operator-=() [1/2]

template<class Num_T >

Mat< Num_T > & itpp::Mat< Num_T >::operator-= | ( | const Mat< Num_T > & | m | ) |

Subtraction of matrix.

Definition at line 1353 of file mat.h.

References itpp::Array< T >::data, it_assert_debug, and itpp::Array< T >::set_size().

## operator-=() [2/2]

template<class Num_T >

Mat< Num_T > & itpp::Mat< Num_T >::operator-= | ( | Num_T | t | ) |

inline

Subtraction of scalar from matrix.

Definition at line 1402 of file mat.h.

References itpp::Array< T >::data.

## operator*=() [1/2]

template<class Num_T >

Mat< Num_T > & itpp::Mat< Num_T >::operator*= | ( | const Mat< Num_T > & | m | ) |

Matrix multiplication.

Definition at line 1461 of file mat.h.

References itpp::Array< T >::data, it_assert_debug, and itpp::Array< T >::operator=().

## operator*=() [2/2]

template<class Num_T >

Mat< Num_T > & itpp::Mat< Num_T >::operator*= | ( | Num_T | t | ) |

inline

Multiplication by a scalar.

Definition at line 1493 of file mat.h.

References itpp::Array< T >::data.

## operator/=() [1/2]

template<class Num_T >

Mat< Num_T > & itpp::Mat< Num_T >::operator/= | ( | Num_T | t | ) |

inline

Division by a scalar.

Definition at line 1652 of file mat.h.

References itpp::Array< T >::data.

## operator/=() [2/2]

template<class Num_T >

Mat< Num_T > & itpp::Mat< Num_T >::operator/= | ( | const Mat< Num_T > & | m | ) |

inline

Element-wise division with the current matrix.

Definition at line 1660 of file mat.h.

References itpp::Array< T >::data, and it_assert_debug.

## operator==()

template<class Num_T >

bool itpp::Mat< Num_T >::operator== | ( | const Mat< Num_T > & | m | ) | const

Compare two matrices. False if wrong sizes or different values.

Definition at line 1723 of file mat.h.

References itpp::Array< T >::data.

## operator!=()

template<class Num_T >

bool itpp::Mat< Num_T >::operator!= | ( | const Mat< Num_T > & | m | ) | const

Compare two matrices. True if different.

Definition at line 1733 of file mat.h.

References itpp::Array< T >::data.

## _elem() [1/4]

template<class Num_T >

Num_T & itpp::Mat< Num_T >::_elem | ( | int | r,
|  | int | c
| ) |  |

inline

Get element (r,c) from matrix without boundary check (not recommended to use)

Definition at line 431 of file mat.h.

References itpp::Mat< Num_T >::data, and itpp::Mat< Num_T >::no_rows.

Referenced by itpp::Mat< Num_T >::sub_m_v_vT().

## _elem() [2/4]

template<class Num_T >

const Num_T & itpp::Mat< Num_T >::_elem | ( | int | r,
|  | int | c
| ) |  | const

inline

Get element (r,c) from matrix without boundary check (not recommended to use)

Definition at line 433 of file mat.h.

References itpp::Mat< Num_T >::data, and itpp::Mat< Num_T >::no_rows.

## _elem() [3/4]

template<class Num_T >

Num_T & itpp::Mat< Num_T >::_elem | ( | int | i | ) |

inline

Get element `i` using linear addressing (by rows) without boundary check (not recommended to use)

Definition at line 435 of file mat.h.

References itpp::Mat< Num_T >::data.

## _elem() [4/4]

template<class Num_T >

const Num_T & itpp::Mat< Num_T >::_elem | ( | int | i | ) | const

inline

Get element `i` using linear addressing (by rows) without boundary check (not recommended to use)

Definition at line 437 of file mat.h.

References itpp::Mat< Num_T >::data.

## _data() [1/2]

template<class Num_T >

Num_T * itpp::Mat< Num_T >::_data | ( |  | ) |

inline

Access of the internal data structure (not recommended to use)

Definition at line 440 of file mat.h.

References itpp::Mat< Num_T >::data.

Referenced by itpp::operator*(), itpp::operator*(), itpp::Vec< double >::operator*(), and itpp::operator*().

## _data() [2/2]

template<class Num_T >

const Num_T * itpp::Mat< Num_T >::_data | ( |  | ) | const

inline

Access to the internal data structure (not recommended to use)

Definition at line 442 of file mat.h.

References itpp::Mat< Num_T >::data.

## _datasize()

template<class Num_T >

int itpp::Mat< Num_T >::_datasize | ( |  | ) | const

inline

Access to the internal data structure (not recommended to use)

Definition at line 444 of file mat.h.

References itpp::Mat< Num_T >::datasize.

Referenced by itpp::Mat< Num_T >::operator+(), and itpp::Mat< Num_T >::operator/().

## alloc()

template<class Num_T >

void itpp::Mat< Num_T >::alloc | ( | int | rows,
|  | int | cols
| ) |  |

inlineprotected

Allocate memory for the matrix.

Definition at line 548 of file mat.h.

References itpp::create_elements(), itpp::Array< T >::data, and itpp::Array< T >::factory.

Referenced by itpp::Mat< Num_T >::Mat(), itpp::Mat< Num_T >::Mat(), itpp::Mat< Num_T >::Mat(), itpp::Mat< Num_T >::Mat(), and itpp::Mat< Num_T >::Mat().

## free()

template<class Num_T >

void itpp::Mat< Num_T >::free | ( |  | ) |

inlineprotected

Free the memory space of the matrix.

Definition at line 565 of file mat.h.

References itpp::Array< T >::data, and itpp::destroy_elements().

## Friends And Related Symbol Documentation

## mat

template<class Num_T >

typedef Mat<double> mat

related

Default Matrix Type.

Definition at line 482 of file mat.h.

## cmat

template<class Num_T >

typedef Mat<std::complex<double> > cmat

related

Default Complex Matrix Type.

Definition at line 488 of file mat.h.

## imat

template<class Num_T >

typedef Mat<int> imat

related

Integer matrix.

Definition at line 494 of file mat.h.

## smat

template<class Num_T >

typedef Mat<short int> smat

related

short int matrix

Definition at line 500 of file mat.h.

## concat_horizontal

template<class Num_T >

Mat< Num_T > concat_horizontal | ( | const Mat< Num_T > & | m1,
|  | const Mat< Num_T > & | m2
| ) |  |

friend

Concatenate the matrices `m1` and `m2` horizontally.

Definition at line 1194 of file mat.h.

## concat_vertical

template<class Num_T >

Mat< Num_T > concat_vertical | ( | const Mat< Num_T > & | m1,
|  | const Mat< Num_T > & | m2
| ) |  |

friend

Concatenate the matrices `m1` and `m2` vertically.

Definition at line 1216 of file mat.h.

## operator+ [1/22]

template<class Num_T >

Mat< Num_T > operator+ | ( | const Mat< Num_T > & | m1,
|  | const Mat< Num_T > & | m2
| ) |  |

friend

Addition of two matrices.

Definition at line 1309 of file mat.h.

## operator+ [2/22]

template<class Num_T >

Mat< Num_T > operator+ | ( | const Mat< Num_T > & | m,
|  | Num_T | t
| ) |  |

friend

Addition of matrix and scalar.

Definition at line 1331 of file mat.h.

## operator+ [3/22]

template<class Num_T >

Mat< Num_T > operator+ | ( | Num_T | t,
|  | const Mat< Num_T > & | m
| ) |  |

friend

Addition of scalar and matrix.

Definition at line 1342 of file mat.h.

## operator- [1/25]

template<class Num_T >

Mat< Num_T > operator- | ( | const Mat< Num_T > & | m1,
|  | const Mat< Num_T > & | m2
| ) |  |

friend

Subtraction of `m2` from `m1`.

Definition at line 1382 of file mat.h.

## operator- [2/25]

template<class Num_T >

Mat< Num_T > operator- | ( | const Mat< Num_T > & | m,
|  | Num_T | t
| ) |  |

friend

Subtraction of scalar from matrix.

Definition at line 1410 of file mat.h.

## operator- [3/25]

template<class Num_T >

Mat< Num_T > operator- | ( | Num_T | t,
|  | const Mat< Num_T > & | m
| ) |  |

friend

Subtract matrix from scalar.

Definition at line 1427 of file mat.h.

## operator- [4/25]

template<class Num_T >

Mat< Num_T > operator- | ( | const Mat< Num_T > & | m | ) |

friend

Subtraction of matrix.

Definition at line 1444 of file mat.h.

## elem_mult

template<class Num_T >

Mat< Num_T > elem_mult | ( | const Mat< Num_T > & | m1,
|  | const Mat< Num_T > & | m2
| ) |  |

friend

Element wise multiplication of two matrices.

Definition at line 1582 of file mat.h.

## elem_mult_out [1/3]

template<class Num_T >

void elem_mult_out | ( | const Mat< Num_T > & | m1,
|  | const Mat< Num_T > & | m2,
|  | Mat< Num_T > & | out
| ) |  |

friend

Element wise multiplication of two matrices, storing the result in matrix `out`.

Definition at line 1590 of file mat.h.

## elem_mult_out [2/3]

template<class Num_T >

void elem_mult_out | ( | const Mat< Num_T > & | m1,
|  | const Mat< Num_T > & | m2,
|  | const Mat< Num_T > & | m3,
|  | Mat< Num_T > & | out
| ) |  |

friend

Element wise multiplication of three matrices, storing the result in matrix `out`.

Definition at line 1601 of file mat.h.

## elem_mult_out [3/3]

template<class Num_T >

void elem_mult_out | ( | const Mat< Num_T > & | m1,
|  | const Mat< Num_T > & | m2,
|  | const Mat< Num_T > & | m3,
|  | const Mat< Num_T > & | m4,
|  | Mat< Num_T > & | out
| ) |  |

friend

Element wise multiplication of four matrices, storing the result in matrix `out`.

Definition at line 1613 of file mat.h.

## elem_mult_inplace

template<class Num_T >

void elem_mult_inplace | ( | const Mat< Num_T > & | m1,
|  | Mat< Num_T > & | m2
| ) |  |

friend

In-place element wise multiplication of two matrices. Fast version of B = elem_mult(A, B).

Definition at line 1630 of file mat.h.

## elem_mult_sum

template<class Num_T >

Num_T elem_mult_sum | ( | const Mat< Num_T > & | m1,
|  | const Mat< Num_T > & | m2
| ) |  |

friend

Element wise multiplication of two matrices, followed by summation of the resultant elements. Fast version of sumsum(elem_mult(A, B)).

Definition at line 1639 of file mat.h.

## operator/ [1/6]

template<class Num_T >

Mat< Num_T > operator/ | ( | const Mat< Num_T > & | m,
|  | Num_T | t
| ) |  |

friend

Element-wise division by a scalar.

Definition at line 1670 of file mat.h.

## operator/ [2/6]

template<class Num_T >

Mat< Num_T > operator/ | ( | Num_T | t,
|  | const Mat< Num_T > & | m
| ) |  |

friend

Element-wise division (`t` is the dividend, elements of `m` are divisors)

Definition at line 1679 of file mat.h.

## elem_div

template<class Num_T >

Mat< Num_T > elem_div | ( | const Mat< Num_T > & | m1,
|  | const Mat< Num_T > & | m2
| ) |  |

friend

Element wise division of two matrices.

Definition at line 1688 of file mat.h.

## elem_div_out

template<class Num_T >

void elem_div_out | ( | const Mat< Num_T > & | m1,
|  | const Mat< Num_T > & | m2,
|  | Mat< Num_T > & | out
| ) |  |

friend

Element wise division of two matrices, storing the result in matrix `out`.

Definition at line 1696 of file mat.h.

## elem_div_sum

template<class Num_T >

Num_T elem_div_sum | ( | const Mat< Num_T > & | m1,
|  | const Mat< Num_T > & | m2
| ) |  |

friend

Element wise division of two matrices, followed by summation of the resultant elements. Fast version of sumsum(elem_div(A, B)).

Definition at line 1710 of file mat.h.

## to_bmat()

template<class T >

bmat to_bmat | ( | const Mat< T > & | m | ) |

related

Converts a Mat<T> to bmat.

Definition at line 168 of file converters.h.

## to_smat()

template<class T >

smat to_smat | ( | const Mat< T > & | m | ) |

related

Converts a Mat<T> to smat.

Definition at line 184 of file converters.h.

## to_imat()

template<class T >

imat to_imat | ( | const Mat< T > & | m | ) |

related

Converts a Mat<T> to imat.

Definition at line 200 of file converters.h.

## to_mat()

template<class T >

mat to_mat | ( | const Mat< T > & | m | ) |

related

Converts a Mat<T> to mat.

Definition at line 216 of file converters.h.

## to_cmat() [1/2]

template<class T >

cmat to_cmat | ( | const Mat< T > & | m | ) |

related

Converts a Mat<T> to cmat.

Definition at line 232 of file converters.h.

## to_cmat() [2/2]

template<class T >

cmat to_cmat | ( | const Mat< T > & | real,
|  | const Mat< T > & | imag
| ) |  |

related

Converts real and imaginary Mat<T> to cmat.

Definition at line 256 of file converters.h.

References itpp::imag(), it_assert_debug, and itpp::real().

## sub_v_vT_m()

template<class Num_T >

ITPP_EXPORT void sub_v_vT_m | ( | mat & | m,
|  | const vec & | v
| ) |  |

related

Calculates m=m-v*v'*m.

Definition at line 37 of file fastmath.cpp.

References itpp::Mat< Num_T >::cols().

## sub_m_v_vT()

template<class Num_T >

ITPP_EXPORT void sub_m_v_vT | ( | mat & | m,
|  | const vec & | v
| ) |  |

related

Calculates m=m-m*v*v'.

Definition at line 65 of file fastmath.cpp.

References itpp::Mat< Num_T >::_elem(), itpp::Mat< Num_T >::cols(), it_assert, itpp::Mat< Num_T >::rows(), and itpp::Array< T >::size().

## operator+() [4/22]

template<class Num_T >

mat operator+ | ( | const float & | s,
|  | const mat & | m
| ) |  |

related

Addition operator for float and mat.

Definition at line 496 of file operators.h.

## operator+() [5/22]

template<class Num_T >

mat operator+ | ( | const short & | s,
|  | const mat & | m
| ) |  |

related

Addition operator for short and mat.

Definition at line 502 of file operators.h.

## operator+() [6/22]

template<class Num_T >

mat operator+ | ( | const int & | s,
|  | const mat & | m
| ) |  |

related

Addition operator for int and mat.

Definition at line 508 of file operators.h.

## operator+() [7/22]

template<class Num_T >

mat operator+ | ( | const mat & | m,
|  | const float & | s
| ) |  |

related

Addition operator for mat and float.

Definition at line 514 of file operators.h.

## operator+() [8/22]

template<class Num_T >

mat operator+ | ( | const mat & | m,
|  | const short & | s
| ) |  |

related

Addition operator for mat and short.

Definition at line 520 of file operators.h.

## operator+() [9/22]

template<class Num_T >

mat operator+ | ( | const mat & | m,
|  | const int & | s
| ) |  |

related

Addition operator for mat and int.

Definition at line 526 of file operators.h.

## operator-() [5/25]

template<class Num_T >

mat operator- | ( | const float & | s,
|  | const mat & | m
| ) |  |

related

Subtraction operator for float and mat.

Definition at line 532 of file operators.h.

## operator-() [6/25]

template<class Num_T >

mat operator- | ( | const short & | s,
|  | const mat & | m
| ) |  |

related

Subtraction operator for short and mat.

Definition at line 538 of file operators.h.

## operator-() [7/25]

template<class Num_T >

mat operator- | ( | const int & | s,
|  | const mat & | m
| ) |  |

related

Subtraction operator for int and mat.

Definition at line 544 of file operators.h.

## operator-() [8/25]

template<class Num_T >

mat operator- | ( | const mat & | m,
|  | const float & | s
| ) |  |

related

Subtraction operator for mat and float.

Definition at line 550 of file operators.h.

## operator-() [9/25]

template<class Num_T >

mat operator- | ( | const mat & | m,
|  | const short & | s
| ) |  |

related

Subtraction operator for mat and short.

Definition at line 556 of file operators.h.

## operator-() [10/25]

template<class Num_T >

mat operator- | ( | const mat & | m,
|  | const int & | s
| ) |  |

related

Subtraction operator for mat and int.

Definition at line 562 of file operators.h.

## operator*() [1/17]

template<class Num_T >

mat operator* | ( | const float & | s,
|  | const mat & | m
| ) |  |

related

Multiplication operator for float and mat.

Definition at line 568 of file operators.h.

## operator*() [2/17]

template<class Num_T >

mat operator* | ( | const short & | s,
|  | const mat & | m
| ) |  |

related

Multiplication operator for short and mat.

Definition at line 574 of file operators.h.

## operator*() [3/17]

template<class Num_T >

mat operator* | ( | const int & | s,
|  | const mat & | m
| ) |  |

related

Multiplication operator for int and mat.

Definition at line 580 of file operators.h.

## operator*() [4/17]

template<class Num_T >

mat operator* | ( | const mat & | m,
|  | const float & | s
| ) |  |

related

Multiplication operator for mat and float.

Definition at line 586 of file operators.h.

## operator*() [5/17]

template<class Num_T >

mat operator* | ( | const mat & | m,
|  | const short & | s
| ) |  |

related

Multiplication operator for mat and short.

Definition at line 592 of file operators.h.

## operator*() [6/17]

template<class Num_T >

mat operator* | ( | const mat & | m,
|  | const int & | s
| ) |  |

related

Multiplication operator for mat and int.

Definition at line 598 of file operators.h.

## operator/() [3/6]

template<class Num_T >

mat operator/ | ( | const mat & | m,
|  | const float & | s
| ) |  |

related

Division operator for mat and float.

Definition at line 604 of file operators.h.

## operator/() [4/6]

template<class Num_T >

mat operator/ | ( | const mat & | m,
|  | const short & | s
| ) |  |

related

Division operator for mat and short.

Definition at line 610 of file operators.h.

## operator/() [5/6]

template<class Num_T >

mat operator/ | ( | const mat & | m,
|  | const int & | s
| ) |  |

related

Division operator for mat and int.

Definition at line 616 of file operators.h.

## operator+() [10/22]

template<class Num_T >

ITPP_EXPORT cmat operator+ | ( | const double & | s,
|  | const cmat & | m
| ) |  |

related

Addition operator for double and cmat.

Definition at line 207 of file operators.cpp.

References itpp::Mat< Num_T >::_datasize(), itpp::Mat< Num_T >::cols(), it_assert_debug, and itpp::Mat< Num_T >::rows().

## operator-() [11/25]

template<class Num_T >

ITPP_EXPORT cmat operator- | ( | const double & | s,
|  | const cmat & | m
| ) |  |

related

Subtraction operator for double and cmat.

Definition at line 218 of file operators.cpp.

References itpp::Mat< Num_T >::cols(), it_assert_debug, and itpp::Mat< Num_T >::rows().

## operator*() [7/17]

template<class Num_T >

ITPP_EXPORT cmat operator* | ( | const double & | s,
|  | const cmat & | m
| ) |  |

related

Multiplication operator for double and cmat.

Definition at line 229 of file operators.cpp.

References itpp::Mat< Num_T >::cols(), it_assert_debug, and itpp::Mat< Num_T >::rows().

## operator*() [8/17]

template<class Num_T >

ITPP_EXPORT cmat operator* | ( | const std::complex< double > & | s,
|  | const mat & | m
| ) |  |

related

Multiplication operator for complex<double> and mat.

Definition at line 240 of file operators.cpp.

References itpp::Mat< Num_T >::cols(), it_assert_debug, and itpp::Mat< Num_T >::rows().

## operator*() [9/17]

template<class Num_T >

cmat operator* | ( | const mat & | m,
|  | const std::complex< double > & | s
| ) |  |

related

Multiplication operator for mat and complex<double>

Definition at line 648 of file operators.h.

## operator/() [6/6]

template<class Num_T >

ITPP_EXPORT cmat operator/ | ( | const cmat & | m,
|  | const double & | s
| ) |  |

related

Division operator for cmat and double.

Definition at line 252 of file operators.cpp.

References itpp::Mat< Num_T >::_datasize(), itpp::Mat< Num_T >::cols(), it_assert_debug, and itpp::Mat< Num_T >::rows().

## operator+() [11/22]

template<class Num_T >

ITPP_EXPORT mat operator+ | ( | const smat & | a,
|  | const mat & | b
| ) |  |

related

Addition operator for smat and mat.

Definition at line 403 of file operators.cpp.

References itpp::Mat< Num_T >::cols(), it_assert_debug, and itpp::Mat< Num_T >::rows().

## operator+() [12/22]

template<class Num_T >

ITPP_EXPORT mat operator+ | ( | const imat & | a,
|  | const mat & | b
| ) |  |

related

Addition operator for imat and mat.

Definition at line 416 of file operators.cpp.

## operator+() [13/22]

template<class Num_T >

mat operator+ | ( | const mat & | a,
|  | const bmat & | b
| ) |  |

related

Addition operator for mat and bmat.

Definition at line 900 of file operators.h.

## operator+() [14/22]

template<class Num_T >

mat operator+ | ( | const mat & | a,
|  | const smat & | b
| ) |  |

related

Addition operator for mat and smat.

Definition at line 906 of file operators.h.

## operator+() [15/22]

template<class Num_T >

mat operator+ | ( | const mat & | a,
|  | const imat & | b
| ) |  |

related

Addition operator for mat and imat.

Definition at line 912 of file operators.h.

## operator-() [12/25]

template<class Num_T >

mat operator- | ( | const bmat & | a,
|  | const mat & | b
| ) |  |

related

Subtraction operator for bmat and mat.

Definition at line 918 of file operators.h.

## operator-() [13/25]

template<class Num_T >

mat operator- | ( | const smat & | a,
|  | const mat & | b
| ) |  |

related

Subtraction operator for smat and mat.

Definition at line 924 of file operators.h.

## operator-() [14/25]

template<class Num_T >

mat operator- | ( | const imat & | a,
|  | const mat & | b
| ) |  |

related

Subtraction operator for imat and mat.

Definition at line 930 of file operators.h.

## operator-() [15/25]

template<class Num_T >

mat operator- | ( | const mat & | a,
|  | const bmat & | b
| ) |  |

related

Subtraction operator for mat and bmat.

Definition at line 936 of file operators.h.

## operator-() [16/25]

template<class Num_T >

mat operator- | ( | const mat & | a,
|  | const smat & | b
| ) |  |

related

Subtraction operator for mat and smat.

Definition at line 942 of file operators.h.

## operator-() [17/25]

template<class Num_T >

mat operator- | ( | const mat & | a,
|  | const imat & | b
| ) |  |

related

Subtraction operator for mat and imat.

Definition at line 948 of file operators.h.

## operator+() [16/22]

template<class Num_T >

ITPP_EXPORT cmat operator+ | ( | const smat & | a,
|  | const cmat & | b
| ) |  |

related

Addition operator for smat and cmat.

Definition at line 444 of file operators.cpp.

References itpp::Mat< Num_T >::cols(), it_assert_debug, and itpp::Mat< Num_T >::rows().

## operator+() [17/22]

template<class Num_T >

ITPP_EXPORT cmat operator+ | ( | const imat & | a,
|  | const cmat & | b
| ) |  |

related

Addition operator for imat and cmat.

Definition at line 457 of file operators.cpp.

References itpp::Mat< Num_T >::cols(), it_assert_debug, and itpp::Mat< Num_T >::rows().

## operator+() [18/22]

template<class Num_T >

ITPP_EXPORT cmat operator+ | ( | const mat & | a,
|  | const cmat & | b
| ) |  |

related

Addition operator for mat and cmat.

Definition at line 470 of file operators.cpp.

References itpp::Mat< Num_T >::cols(), it_assert_debug, and itpp::Mat< Num_T >::rows().

## operator+() [19/22]

template<class Num_T >

cmat operator+ | ( | const cmat & | a,
|  | const bmat & | b
| ) |  |

related

Addition operator for cmat and bmat.

Definition at line 980 of file operators.h.

## operator+() [20/22]

template<class Num_T >

cmat operator+ | ( | const cmat & | a,
|  | const smat & | b
| ) |  |

related

Addition operator for cmat and smat.

Definition at line 986 of file operators.h.

## operator+() [21/22]

template<class Num_T >

cmat operator+ | ( | const cmat & | a,
|  | const imat & | b
| ) |  |

related

Addition operator for cmat and imat.

Definition at line 992 of file operators.h.

## operator+() [22/22]

template<class Num_T >

cmat operator+ | ( | const cmat & | a,
|  | const mat & | b
| ) |  |

related

Addition operator for cmat and mat.

Definition at line 998 of file operators.h.

## operator-() [18/25]

template<class Num_T >

cmat operator- | ( | const bmat & | a,
|  | const cmat & | b
| ) |  |

related

Subtraction operator for bmat and cmat.

Definition at line 1004 of file operators.h.

## operator-() [19/25]

template<class Num_T >

cmat operator- | ( | const smat & | a,
|  | const cmat & | b
| ) |  |

related

Subtraction operator for smat and cmat.

Definition at line 1010 of file operators.h.

## operator-() [20/25]

template<class Num_T >

cmat operator- | ( | const imat & | a,
|  | const cmat & | b
| ) |  |

related

Subtraction operator for imat and cmat.

Definition at line 1016 of file operators.h.

## operator-() [21/25]

template<class Num_T >

cmat operator- | ( | const mat & | a,
|  | const cmat & | b
| ) |  |

related

Subtraction operator for mat and cmat.

Definition at line 1022 of file operators.h.

## operator-() [22/25]

template<class Num_T >

cmat operator- | ( | const cmat & | a,
|  | const bmat & | b
| ) |  |

related

Subtraction operator for cmat and bmat.

Definition at line 1028 of file operators.h.

## operator-() [23/25]

template<class Num_T >

cmat operator- | ( | const cmat & | a,
|  | const smat & | b
| ) |  |

related

Subtraction operator for cmat and smat.

Definition at line 1034 of file operators.h.

## operator-() [24/25]

template<class Num_T >

cmat operator- | ( | const cmat & | a,
|  | const imat & | b
| ) |  |

related

Subtraction operator for cmat and imat.

Definition at line 1040 of file operators.h.

## operator-() [25/25]

template<class Num_T >

cmat operator- | ( | const cmat & | a,
|  | const mat & | b
| ) |  |

related

Subtraction operator for cmat and mat.

Definition at line 1046 of file operators.h.

## operator*() [10/17]

template<class Num_T >

cmat operator* | ( | const mat & | a,
|  | const cmat & | b
| ) |  |

related

Multiplication operator for mat and cmat.

Definition at line 1052 of file operators.h.

References itpp::to_cmat().

## operator*() [11/17]

template<class Num_T >

cmat operator* | ( | const bmat & | a,
|  | const cmat & | b
| ) |  |

related

Multiplication operator for bmat and cmat.

Definition at line 1058 of file operators.h.

References itpp::to_cmat().

## operator*() [12/17]

template<class Num_T >

cmat operator* | ( | const smat & | a,
|  | const cmat & | b
| ) |  |

related

Multiplication operator for smat and cmat.

Definition at line 1064 of file operators.h.

References itpp::to_cmat().

## operator*() [13/17]

template<class Num_T >

cmat operator* | ( | const imat & | a,
|  | const cmat & | b
| ) |  |

related

Multiplication operator for imat and cmat.

Definition at line 1070 of file operators.h.

References itpp::to_cmat().

## operator*() [14/17]

template<class Num_T >

cmat operator* | ( | const cmat & | a,
|  | const mat & | b
| ) |  |

related

Multiplication operator for cmat and mat.

Definition at line 1076 of file operators.h.

References itpp::to_cmat().

## operator*() [15/17]

template<class Num_T >

cmat operator* | ( | const cmat & | a,
|  | const bmat & | b
| ) |  |

related

Multiplication operator for cmat and bmat.

Definition at line 1082 of file operators.h.

References itpp::to_cmat().

## operator*() [16/17]

template<class Num_T >

cmat operator* | ( | const cmat & | a,
|  | const smat & | b
| ) |  |

related

Multiplication operator for cmat and smat.

Definition at line 1088 of file operators.h.

References itpp::to_cmat().

## operator*() [17/17]

template<class Num_T >

cmat operator* | ( | const cmat & | a,
|  | const imat & | b
| ) |  |

related

Multiplication operator for cmat and imat.

Definition at line 1094 of file operators.h.

References itpp::to_cmat().

## mat_1x1()

template<class T >

Mat< T > mat_1x1 | ( | T | m00 | ) |

related

Matrix of size 1 by 1.

Definition at line 361 of file specmat.h.

## mat_1x2()

template<class T >

Mat< T > mat_1x2 | ( | T | m00,
|  | T | m01
| ) |  |

related

Matrix of size 1 by 2.

Definition at line 373 of file specmat.h.

## mat_2x1()

template<class T >

Mat< T > mat_2x1 | ( | T | m00,
|  | T | m10
| ) |  |

related

Matrix of size 2 by 1.

Definition at line 386 of file specmat.h.

## mat_2x2()

template<class T >

Mat< T > mat_2x2 | ( | T | m00,
|  | T | m01,
|  | T | m10,
|  | T | m11
| ) |  |

related

Matrix of size 2 by 2.

Definition at line 400 of file specmat.h.

## mat_1x3()

template<class T >

Mat< T > mat_1x3 | ( | T | m00,
|  | T | m01,
|  | T | m02
| ) |  |

related

Matrix of size 1 by 3.

Definition at line 416 of file specmat.h.

## mat_3x1()

template<class T >

Mat< T > mat_3x1 | ( | T | m00,
|  | T | m10,
|  | T | m20
| ) |  |

related

Matrix of size 3 by 1.

Definition at line 430 of file specmat.h.

## mat_2x3()

template<class T >

Mat< T > mat_2x3 | ( | T | m00,
|  | T | m01,
|  | T | m02,
|  | T | m10,
|  | T | m11,
|  | T | m12
| ) |  |

related

Matrix of size 2 by 3.

Definition at line 446 of file specmat.h.

## mat_3x2()

template<class T >

Mat< T > mat_3x2 | ( | T | m00,
|  | T | m01,
|  | T | m10,
|  | T | m11,
|  | T | m20,
|  | T | m21
| ) |  |

related

Matrix of size 3 by 2.

Definition at line 464 of file specmat.h.

## mat_3x3()

template<class T >

Mat< T > mat_3x3 | ( | T | m00,
|  | T | m01,
|  | T | m02,
|  | T | m10,
|  | T | m11,
|  | T | m12,
|  | T | m20,
|  | T | m21,
|  | T | m22
| ) |  |

related

Matrix of size 3 by 3.

Definition at line 483 of file specmat.h.

## Member Data Documentation

## datasize

template<class Num_T >

int itpp::Mat< Num_T >::datasize

protected

Protected integer variables

Definition at line 454 of file mat.h.

Referenced by itpp::Mat< Num_T >::_datasize(), itpp::Mat< Num_T >::Mat(), and itpp::Mat< Num_T >::size().

## no_rows

template<class Num_T >

int itpp::Mat< Num_T >::no_rows

protected

Protected integer variables

Definition at line 454 of file mat.h.

Referenced by itpp::Mat< Num_T >::_elem(), itpp::Mat< Num_T >::_elem(), itpp::Mat< Num_T >::Mat(), and itpp::Mat< Num_T >::rows().

## no_cols

template<class Num_T >

int itpp::Mat< Num_T >::no_cols

protected

Protected integer variables

Definition at line 454 of file mat.h.

Referenced by itpp::Mat< Num_T >::cols(), and itpp::Mat< Num_T >::Mat().

## data

template<class Num_T >

Num_T* itpp::Mat< Num_T >::data

protected

Protected data pointer.

Definition at line 457 of file mat.h.

Referenced by itpp::Mat< Num_T >::_data(), itpp::Mat< Num_T >::_data(), itpp::Mat< Num_T >::_elem(), itpp::Mat< Num_T >::_elem(), itpp::Mat< Num_T >::_elem(), itpp::Mat< Num_T >::_elem(), itpp::Mat< Num_T >::Mat(), itpp::Mat< Num_T >::Mat(), itpp::Mat< Num_T >::Mat(), and itpp::Mat< Num_T >::Mat().

## factory

template<class Num_T >

const Factory& itpp::Mat< Num_T >::factory

protected

Element factory (set to DEFAULT_FACTORY to use Num_T default constructors only)

Definition at line 459 of file mat.h.

The documentation for this class was generated from the following files:

- itpp/base/factory.h
- itpp/base/mat.h
- itpp/base/converters.h
- itpp/base/fastmath.h
- itpp/base/matfunc.h
- itpp/base/operators.h
- itpp/base/specmat.h
- itpp/fixed/cfix.cpp
- itpp/fixed/cfix.h
- itpp/fixed/fix.cpp
- itpp/fixed/fix.h

Generated on Mon Jun 10 2024 11:49:37 for IT++ by Doxygen 1.9.8