ECF 1.5
Public Member Functions | List of all members
algebra::matrix Class Reference

Public Member Functions

 matrix (const char *_name)
 
 matrix (const matrix &m)
 
void saveToFile (const std::string &filename)
 
void saveToFile (std::ofstream &f)
 
bool loadFromFile (const std::string &filename)
 
bool loadFromFile (std::ifstream &f)
 
matrixoperator= (const matrix &m)
 
void cleanup ()
 
void zero ()
 
void ident ()
 
Complex trace ()
 
void clear (Complex value)
 
bool create (int _r, int _c, Complex *_elements)
 
bool create (int _r, int _c)
 
bool create (int _r)
 
Complex & operator() (int row, int col)
 
void random_unitary (const std::vector< double > &phi_v, const std::vector< double > &psi_v, const std::vector< double > &chi_v, double alpha)
 
bool eigenValues (std::vector< double > &values)
 
double safeLog (double x)
 
double entropy ()
 
Complex getDirect (int row, int col)
 
void setDirect (int _n, Complex data)
 
void setDirect (int row, int col, Complex data)
 
void setDirect (int row, int col, double re, double im)
 
Complex get (int _n)
 
Complex * getElements ()
 
void print (std::ostream &f, bool printAll=false)
 
void multiplyScalar (Complex &c)
 
void sqTranspose ()
 
void transpose (matrix &B)
 
void subtract (Complex &c)
 
void subtract (matrix *B, matrix *output)
 
void add (matrix *B, matrix *output)
 
void random (double smallValue, double largeValue)
 
void add (matrix *B)
 
void dot (matrix *B, Complex &output)
 
bool multiply (matrix &B, matrix &output, char TRANSB='N')
 
void tensor (matrix *B, matrix *output)
 
int getRows ()
 
int getCols ()
 
int getSize ()
 

Detailed Description

Definition at line 92 of file Algebra.h.

Constructor & Destructor Documentation

◆ matrix() [1/3]

algebra::matrix::matrix ( )
inline

Definition at line 95 of file Algebra.h.

◆ matrix() [2/3]

algebra::matrix::matrix ( const char *  _name)
inline

Definition at line 103 of file Algebra.h.

◆ matrix() [3/3]

algebra::matrix::matrix ( const matrix m)
inline

Definition at line 112 of file Algebra.h.

◆ ~matrix()

algebra::matrix::~matrix ( )
inline

Definition at line 129 of file Algebra.h.

Member Function Documentation

◆ add() [1/2]

void algebra::matrix::add ( matrix B)
inline

Definition at line 503 of file Algebra.h.

◆ add() [2/2]

void algebra::matrix::add ( matrix B,
matrix output 
)
inline

Definition at line 483 of file Algebra.h.

◆ cleanup()

void algebra::matrix::cleanup ( )
inline

Definition at line 169 of file Algebra.h.

◆ clear()

void algebra::matrix::clear ( Complex  value)
inline

Definition at line 218 of file Algebra.h.

◆ create() [1/3]

bool algebra::matrix::create ( int  _r)
inline

Definition at line 256 of file Algebra.h.

◆ create() [2/3]

bool algebra::matrix::create ( int  _r,
int  _c 
)
inline

Definition at line 237 of file Algebra.h.

◆ create() [3/3]

bool algebra::matrix::create ( int  _r,
int  _c,
Complex *  _elements 
)
inline

Definition at line 226 of file Algebra.h.

◆ eigenValues()

bool algebra::matrix::eigenValues ( std::vector< double > &  values)

Definition at line 91 of file Algebra.cpp.

◆ entropy()

double algebra::matrix::entropy ( )
inline

Definition at line 285 of file Algebra.h.

◆ get()

Complex algebra::matrix::get ( int  _n)
inline

Definition at line 358 of file Algebra.h.

◆ getCols()

int algebra::matrix::getCols ( )
inline

Definition at line 533 of file Algebra.h.

◆ getDirect()

Complex algebra::matrix::getDirect ( int  row,
int  col 
)
inline

Definition at line 301 of file Algebra.h.

◆ getElements()

Complex * algebra::matrix::getElements ( )
inline

Definition at line 369 of file Algebra.h.

◆ getRows()

int algebra::matrix::getRows ( )
inline

Definition at line 529 of file Algebra.h.

◆ getSize()

int algebra::matrix::getSize ( )
inline

Definition at line 537 of file Algebra.h.

◆ ident()

void algebra::matrix::ident ( )
inline

Definition at line 192 of file Algebra.h.

◆ multiply()

bool algebra::matrix::multiply ( matrix B,
matrix output,
char  TRANSB = 'N' 
)

Definition at line 168 of file Algebra.cpp.

◆ multiplyScalar()

void algebra::matrix::multiplyScalar ( Complex &  c)
inline

Definition at line 404 of file Algebra.h.

◆ operator()()

Complex & algebra::matrix::operator() ( int  row,
int  col 
)
inline

Definition at line 261 of file Algebra.h.

◆ operator=()

matrix & algebra::matrix::operator= ( const matrix m)
inline

Definition at line 137 of file Algebra.h.

◆ print()

void algebra::matrix::print ( std::ostream &  f,
bool  printAll = false 
)
inline

Definition at line 374 of file Algebra.h.

◆ random_unitary()

void algebra::mat::random_unitary ( const std::vector< double > &  phi_v,
const std::vector< double > &  psi_v,
const std::vector< double > &  chi_v,
double  alpha 
)

Definition at line 25 of file Algebra.cpp.

◆ safeLog()

double algebra::matrix::safeLog ( double  x)
inline

Definition at line 279 of file Algebra.h.

◆ setDirect() [1/3]

void algebra::matrix::setDirect ( int  _n,
Complex  data 
)
inline

Definition at line 316 of file Algebra.h.

◆ setDirect() [2/3]

void algebra::matrix::setDirect ( int  row,
int  col,
Complex  data 
)
inline

Definition at line 329 of file Algebra.h.

◆ setDirect() [3/3]

void algebra::matrix::setDirect ( int  row,
int  col,
double  re,
double  im 
)
inline

Definition at line 344 of file Algebra.h.

◆ sqTranspose()

void algebra::matrix::sqTranspose ( )
inline

Definition at line 415 of file Algebra.h.

◆ subtract() [1/2]

void algebra::matrix::subtract ( Complex &  c)
inline

Definition at line 453 of file Algebra.h.

◆ subtract() [2/2]

void algebra::matrix::subtract ( matrix B,
matrix output 
)
inline

Definition at line 464 of file Algebra.h.

◆ tensor()

void algebra::matrix::tensor ( matrix B,
matrix output 
)

Definition at line 147 of file Algebra.cpp.

◆ trace()

Complex algebra::matrix::trace ( )
inline

Definition at line 208 of file Algebra.h.

◆ transpose()

void algebra::matrix::transpose ( matrix B)
inline

Definition at line 437 of file Algebra.h.

◆ zero()

void algebra::matrix::zero ( )
inline

Definition at line 181 of file Algebra.h.


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