MADNESS  0.10.1
Public Types | Public Member Functions | Public Attributes | List of all members
MatrixOperator Class Reference

class defining an operator in matrix form, fixed to size (4,4) More...

Inheritance diagram for MatrixOperator:
Inheritance graph
[legend]

Public Types

typedef std::vector< std::pair< double_complex, std::shared_ptr< SCFOperatorBase< double_complex, 3 > > > > opT
 

Public Member Functions

 MatrixOperator (const int i=4, const int j=4)
 
void add_operator (const int i, const int j, const double_complex &fac, const std::shared_ptr< SCFOperatorBase< double_complex, 3 >> op)
 
void add_submatrix (int istart, int jstart, const MatrixOperator &submatrix)
 add a submatrix to this More...
 
std::size_t ncol () const
 
std::size_t nrow () const
 
virtual Spinor operator() (const Spinor &arg) const
 
virtual std::vector< Spinoroperator() (const std::vector< Spinor > &arg) const
 
MatrixOperator operator+ (const MatrixOperator &other) const
 
MatrixOperatoroperator+= (const MatrixOperator &other)
 
void print (std::string name="") const
 

Public Attributes

std::vector< std::vector< opT > > elements
 matrix containing prefactor and operator More...
 

Detailed Description

class defining an operator in matrix form, fixed to size (4,4)

Member Typedef Documentation

◆ opT

typedef std::vector<std::pair<double_complex,std::shared_ptr<SCFOperatorBase<double_complex,3> > > > MatrixOperator::opT

Constructor & Destructor Documentation

◆ MatrixOperator()

MatrixOperator::MatrixOperator ( const int  i = 4,
const int  j = 4 
)
inlineexplicit

References e().

Member Function Documentation

◆ add_operator()

void MatrixOperator::add_operator ( const int  i,
const int  j,
const double_complex fac,
const std::shared_ptr< SCFOperatorBase< double_complex, 3 >>  op 
)
inline

References op().

Referenced by make_Hd(), make_Hdiag(), make_sp(), and moments().

◆ add_submatrix()

void MatrixOperator::add_submatrix ( int  istart,
int  jstart,
const MatrixOperator submatrix 
)
inline

add a submatrix to this

Parameters
[in]istartrow where to add the submatrix
[in]jstartcolumn where to add the submatrix

References elements, ncol(), and nrow().

Referenced by make_alpha_p().

◆ ncol()

std::size_t MatrixOperator::ncol ( ) const
inline

Referenced by add_submatrix().

◆ nrow()

std::size_t MatrixOperator::nrow ( ) const
inline

Referenced by add_submatrix().

◆ operator()() [1/2]

virtual Spinor MatrixOperator::operator() ( const Spinor arg) const
inlinevirtual

◆ operator()() [2/2]

virtual std::vector<Spinor> MatrixOperator::operator() ( const std::vector< Spinor > &  arg) const
inlinevirtual

References a, and madness::arg().

◆ operator+()

MatrixOperator MatrixOperator::operator+ ( const MatrixOperator other) const
inline

References elements.

◆ operator+=()

MatrixOperator& MatrixOperator::operator+= ( const MatrixOperator other)
inline

References elements.

◆ print()

void MatrixOperator::print ( std::string  name = "") const
inline

Member Data Documentation

◆ elements

std::vector<std::vector<opT> > MatrixOperator::elements

matrix containing prefactor and operator

Referenced by add_submatrix(), operator+(), and operator+=().


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