matrix_m< T > Class Template Reference
LibRPA
|
Public Types |
Public Member Functions |
Public Attributes |
Static Public Attributes |
List of all members
matrix_m< T > Class Template Reference
Public Types | |
using | type = T |
using | real_t = typename to_real< T >::type |
using | cplx_t = typename to_cplx< T >::type |
Public Member Functions | |
matrix_m (const int &nrows, const int &ncols, MAJOR major=MAJOR::ROW) | |
matrix_m (const int &nrows, const int &ncols, const T *const parr, MAJOR major=MAJOR::ROW) | |
matrix_m (const int &nrows, const int &ncols, const T *const parr, MAJOR major_arr, MAJOR major) | |
matrix_m (const int &nrows, const int &ncols, const std::shared_ptr< std::valarray< T >> &valarr, MAJOR major_valarr) | |
matrix_m (const std::vector< std::vector< T >> &nested_vector, MAJOR major=MAJOR::ROW) | |
matrix_m (const matrix_m< T > &m)=default | |
matrix_m (matrix_m &&m)=default | |
void | zero_out () |
void | clear () |
void | set_diag (const T &v) |
void | scale_row (int irow, const T &scale) |
void | scale_col (int icol, const T &scale) |
void | randomize (const T &lb=0, const T &ub=1, bool symmetrize=false, bool hermitian=false) |
Randomize the matrix elements with lower and upper bound and symmetry constraint. | |
int | nr () const |
int | nc () const |
int | ld () const |
MAJOR | major () const |
int | size () const |
int | mrank () const |
bool | is_row_major () const |
bool | is_col_major () const |
T & | operator() (const int ir, const int ic) |
const T & | operator() (const int ir, const int ic) const |
T & | at (const int ir, const int ic) |
const T & | at (const int ir, const int ic) const |
T * | ptr () |
const T * | ptr () const |
std::shared_ptr< std::valarray< T > > | sptr () |
const std::shared_ptr< std::valarray< T > > | sptr () const |
matrix_m< T > | copy () const |
void | swap_to_row_major () |
void | swap_to_col_major () |
matrix_m< T > & | operator= (const matrix_m< T > &m)=default |
matrix_m< T > & | operator= (matrix_m< T > &&m)=default |
matrix_m< T > & | operator= (const T &cnum) |
template<typename T1 > | |
void | operator+= (const matrix_m< T1 > &m) |
template<typename T1 > | |
void | operator+= (const std::vector< T1 > &v) |
template<typename T1 > | |
void | operator+= (const T1 &cnum) |
template<typename T1 > | |
void | operator-= (const matrix_m< T1 > &m) |
template<typename T1 > | |
void | operator-= (const std::vector< T1 > &v) |
template<typename T1 > | |
void | operator-= (const T1 &cnum) |
template<typename T1 > | |
void | operator*= (const T1 &cnum) |
template<typename T1 > | |
void | operator/= (const T1 &cnum) |
void | reshape (int nrows_new, int ncols_new) |
matrix_m< T > & | resize (int nrows_new, int ncols_new) |
matrix_m< T > & | resize (int nrows_new, int ncols_new, MAJOR major) |
matrix_m< T > & | conj () |
matrix_m< T > | get_transpose (bool conjugate=false) const |
matrix_m< T > & | transpose (bool conjugate=false) |
matrix_m< cplx_t > | to_complex () const |
matrix_m< real_t > | get_real () const |
matrix_m< real_t > | get_imag () const |
int | count_absle (real_t thres) const |
int | count_absge (real_t thres) const |
void | argmin (int &ir, int &ic) const |
void | argmax (int &ir, int &ic) const |
real_t | min () const |
real_t | max () const |
real_t | absmin () const |
real_t | absmax () const |
Public Attributes | |
matrix_data< T > | dataobj |
Static Public Attributes | |
static const bool | is_complex = is_complex_t<T>::value |
Flag of whether the instantialized matrix class is complex-typed. | |
static const bool | is_double = std::is_same<T, double>::value |
The documentation for this class was generated from the following file:
Generated by