MPQC 3.0.0-alpha
Loading...
Searching...
No Matches
mpqc.Math.Matrix

Matrix and Vector classes and function, derived from Eigen. More...

Classes

struct  mpqc::matrix< T, Order >
 Matrix class derived from Eigen::Matrix with additional MPQC integration. More...
 
struct  mpqc::vector< T >
 Vector class derived from Eigen::Matrix with additional MPQC integration. More...
 

Typedefs

typedef matrix< double > mpqc::Matrix
 Convience double matrix type.
 
typedef vector< double > mpqc::Vector
 Convience double vector type.
 

Functions

template<class E >
double mpqc::absmax (const E &e)
 absolute max of an Eigen type
 
template<class T >
mpqc::dot (const matrix< T > &a, const matrix< T > &b)
 element-wise dot product of two matrices
 
template<class T >
Eigen::SelfAdjointEigenSolver< Matrix::EigenType > mpqc::symmetric (const matrix< T > &a)
 Computes (Eigen::SelfAdjointEigenSolver) eigensystem of a matrix.
 
template<class T >
mpqc::norm (const matrix< T > &a)
 Matrix norm.
 
template<class T >
void mpqc::normalize (matrix< T > &a)
 Normalize matrix.
 
template<class T >
void mpqc::orthonormalize (matrix< T > &d, const matrix< T > &b)
 orthormalize matrix d wrt to normalized matrix b d = normalize(d - (<d|b>*b))
 

Detailed Description

Matrix and Vector classes and function, derived from Eigen.

The matrix and vector objects overide operator(), s.t. if one of the arguments is a range, a block is returned rather than a single element. Example:

matrix(0,range(0,4)); // returns 1x4 sub-matrix (0,0:3)
matrix(0,0); // returns matrix element (0,0);
vector(range(2,4)); // returns sub-vector (2:3)

Function Documentation

◆ absmax()

template<class E >
double mpqc::absmax ( const E & e)

absolute max of an Eigen type

Todo
Refactor to accept EigenBase types and return proper type

◆ dot()

template<class T >
T mpqc::dot ( const matrix< T > & a,
const matrix< T > & b )

element-wise dot product of two matrices

Todo
Refactor to work with EigenBase types

Referenced by mpqc::orthonormalize().

◆ norm()

template<class T >
T mpqc::norm ( const matrix< T > & a)

Matrix norm.

Todo
Refactor to work with EigenBase types

◆ normalize()

template<class T >
void mpqc::normalize ( matrix< T > & a)

Normalize matrix.

Todo
Refactor to work with EigenBase types

Referenced by mpqc::orthonormalize().

◆ orthonormalize()

template<class T >
void mpqc::orthonormalize ( matrix< T > & d,
const matrix< T > & b )

orthormalize matrix d wrt to normalized matrix b d = normalize(d - (<d|b>*b))

Todo
Refactor to work with EigenBase types

References mpqc::dot(), and mpqc::normalize().

◆ symmetric()

template<class T >
Eigen::SelfAdjointEigenSolver< Matrix::EigenType > mpqc::symmetric ( const matrix< T > & a)

Computes (Eigen::SelfAdjointEigenSolver) eigensystem of a matrix.

Matrix must be symmetric.

Todo
Find a better name

Referenced by mpqc::ci::direct().


Generated at Wed Sep 25 2024 02:45:31 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.12.0.