Psi4
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
psi::Matrix Class Reference

Makes using matrices just a little easier. More...

#include <matrix.h>

Inheritance diagram for psi::Matrix:

Public Types

enum  SaveType { Full, SubBlocks, LowerTriangle }
 

Public Member Functions

 Matrix ()
 Default constructor, zeros everything out. More...
 
 Matrix (const std::string &name, int symmetry=0)
 
 Matrix (const Matrix &copy)
 copy reference constructor More...
 
 Matrix (const SharedMatrix &copy)
 Explicit shared point copy constructor. More...
 
 Matrix (const Matrix *copy)
 copy pointer constructor More...
 
 Matrix (int nirrep, const int *rowspi, const int *colspi, int symmetry=0)
 
 Matrix (const std::string &name, int nirrep, const int *rowspi, const int *colspi, int symmetry=0)
 
 Matrix (int nirrep, int rows, const int *colspi)
 
 Matrix (int nirrep, const int *rowspi, int cols)
 
 Matrix (int rows, int cols)
 
 Matrix (const std::string &name, int rows, int cols)
 
 Matrix (dpdfile2 *inFile)
 
 Matrix (const std::string &name, const Dimension &rows, const Dimension &cols, int symmetry=0)
 
 Matrix (const Dimension &rows, const Dimension &cols, int symmetry=0)
 
virtual ~Matrix ()
 Destructor, frees memory. More...
 
void init (int nirrep, const int *rowspi, const int *colspi, const std::string &name="", int symmetry=0)
 
void init (const Dimension &rowspi, const Dimension &colspi, const std::string &name="", int symmetry=0)
 
SharedMatrix clone () const
 Creates an exact copy of the matrix and returns it. More...
 
SharedMatrix matrix_3d_rotation (Vector3 axis, double phi, bool Sn)
 
void copy_to_row (int h, int row, double const *const data)
 Copies data to the row specified. Assumes data is of correct length. More...
 
void load (const std::string &filename)
 
void load_mpqc (const std::string &filename)
 
void set (double val)
 
void set (const double *const tri)
 
void set (int h, int m, int n, double val)
 
void set (int m, int n, double val)
 
double get (const int &h, const int &m, const int &n) const
 
double get (const int &m, const int &n) const
 
SharedVector get_row (int h, int m)
 
SharedVector get_column (int h, int m)
 
void set_row (int h, int m, SharedVector vec)
 
void set_column (int h, int m, SharedVector vec)
 
SharedMatrix get_block (const Slice &rows, const Slice &cols)
 
void set_block (const Slice &rows, const Slice &cols, SharedMatrix block)
 
double ** pointer (const int &h=0) const
 
const double ** const_pointer (const int &h=0) const
 
double * get_pointer (const int &h=0) const
 
const double * get_const_pointer (const int &h=0) const
 
size_t size (const int &h=0) const
 
void apply_denominator (const Matrix *const)
 apply_denominators a matrix to this More...
 
void apply_denominator (const Matrix &)
 apply_denominators a matrix to this More...
 
void apply_denominator (const SharedMatrix &)
 apply_denominators a matrix to this More...
 
double ** to_block_matrix () const
 
SharedMatrix to_block_sharedmatrix () const
 
double * to_lower_triangle () const
 
SimpleMatrix * to_simple_matrix () const
 
void set_name (const std::string &name)
 
const std::string & name () const
 
void print_out () const
 Python compatible printer. More...
 
void print (std::string outfile="outfile", const char *extra=NULL) const
 
void print_atom_vector (std::string out_fname="outfile")
 Prints the matrix with atom and xyz styling. More...
 
void print_to_mathematica ()
 
void eivprint (const Vector *const values, std::string out="outfile")
 
void eivprint (const Vector &values, std::string out="outfile")
 Print the matrix with corresponding eigenvalues below each column. More...
 
void eivprint (const std::shared_ptr< Vector > &values, std::string out="outfile")
 Print the matrix with corresponding eigenvalues below each column. More...
 
int rowdim (const int &h=0) const
 Returns the rows in irrep h. More...
 
int coldim (const int &h=0) const
 Returns the cols in irrep h. More...
 
const Dimensionrowspi () const
 Returns the rows per irrep array. More...
 
int rowspi (const int &h) const
 Returns the rows per irrep array. More...
 
const Dimensioncolspi () const
 Returns the columns per irrep array. More...
 
int colspi (const int &h) const
 Returns the columns per irrep array. More...
 
const int & nirrep () const
 Returns the number of irreps. More...
 
int nrow () const
 Returns the total number of rows. More...
 
int ncol () const
 Returns the total number of columns. More...
 
int max_nrow () const
 Returns the row size of the largest block. More...
 
int max_ncol () const
 Returns the column size of the largest block. More...
 
const int & symmetry () const
 
void symmetrize_gradient (std::shared_ptr< Molecule > mol)
 
void symmetrize_hessian (std::shared_ptr< Molecule > mol)
 
void identity ()
 Set this to identity. More...
 
void zero ()
 Zeros this out. More...
 
void zero_diagonal ()
 Zeros the diagonal. More...
 
double trace ()
 Returns the trace of this. More...
 
SharedMatrix transpose ()
 Creates a new matrix which is the transpose of this. More...
 
void transpose_this ()
 In place transposition. More...
 
void add (const Matrix *const)
 Adds a matrix to this. More...
 
void add (const Matrix &)
 Adds a matrix to this. More...
 
void add (const SharedMatrix &)
 Adds a matrix to this. More...
 
void subtract (const Matrix *const)
 Subtracts a matrix from this. More...
 
void subtract (const SharedMatrix &)
 Subtracts a matrix from this. More...
 
void accumulate_product (const Matrix *const, const Matrix *const)
 Multiplies the two arguments and adds their result to this. More...
 
void accumulate_product (const SharedMatrix &, const SharedMatrix &)
 
void scale (double)
 Scales this matrix. More...
 
double sum_of_squares ()
 Returns the sum of the squares of this. More...
 
double rms ()
 Returns the rms of this. More...
 
double absmax ()
 Returns the absoluate maximum balue. More...
 
void add (int h, int m, int n, double val)
 Add val to an element of this. More...
 
void add (int m, int n, double val)
 Add val to an element of this. More...
 
void element_add_mirror ()
 
void scale_row (int h, int m, double a)
 Scale row m of irrep h by a. More...
 
void scale_column (int h, int n, double a)
 Scale column n of irrep h by a. More...
 
void apply_symmetry (const SharedMatrix &a, const SharedMatrix &transformer)
 
void remove_symmetry (const SharedMatrix &a, const SharedMatrix &transformer)
 
void transform (const SharedMatrix &L, const SharedMatrix &F, const SharedMatrix &R)
 
double vector_dot (const Matrix *const rhs)
 Returns the vector dot product of this by rhs. More...
 
double vector_dot (const SharedMatrix &rhs)
 
double vector_dot (const Matrix &rhs)
 
void axpy (double a, SharedMatrix X)
 
SharedMatrix collapse (int dim=0)
 
SharedMatrix canonical_orthogonalization (double delta=0.0, SharedMatrix eigvec=SharedMatrix())
 
SharedMatrix partial_cholesky_factorize (double delta=0.0, bool throw_if_negative=false)
 
std::pair< SharedMatrix,
SharedMatrix
partial_square_root (double delta=0.0)
 
void cholesky_factorize ()
 
void invert ()
 
void general_invert ()
 
Dimension power (double alpha, double cutoff=1.0E-12)
 
void expm (int n=2, bool scale=false)
 
void swap_rows (int h, int i, int j)
 Swap rows i and j. More...
 
void swap_columns (int h, int i, int j)
 Swap cols i and j. More...
 
void hermitivitize ()
 
void copy_lower_to_upper ()
 
void copy_upper_to_lower ()
 
void zero_lower ()
 
void zero_upper ()
 
void zero_row (int h, int i)
 
void zero_column (int h, int i)
 
void transform (const Matrix &a, const Matrix &transformer)
 Transform a by transformer save result to this. More...
 
void transform (const Matrix &transformer)
 Transform this by transformer. More...
 
void back_transform (const Matrix &a, const Matrix &transformer)
 Back transform a by transformer save result to this. More...
 
void back_transform (const Matrix &transformer)
 Back transform this by transformer. More...
 
bool add_and_orthogonalize_row (const SharedVector v)
 
void schmidt ()
 
void schmidt_orthog (SharedMatrix S, int n)
 
Dimension schmidt_orthog_columns (SharedMatrix S, double tol, double *res=0)
 
void project_out (Matrix &v)
 
void gemm (bool transa, bool transb, double alpha, const Matrix &a, const Matrix &b, double beta)
 General matrix multiply, saves result to this. More...
 
void diagonalize (Matrix &eigvectors, Vector &eigvalues, int nMatz=1)
 Diagonalize a symmetric matrix. Eigvectors and eigvalues must be created by caller. More...
 
void write_to_dpdfile2 (dpdfile2 *outFile)
 Writes this to the dpdfile2 given. More...
 
void set_numpy_shape (std::vector< int > shape)
 
std::vector< int > numpy_shape ()
 
void rotate_columns (int h, int i, int j, double theta)
 
void copy (const SharedMatrix &cp)
 
void copy (const Matrix &cp)
 
void copy (const Matrix *cp)
 
bool load (psi::PSIO *psio, size_t fileno, const std::string &tocentry, int nso)
 
bool load (std::shared_ptr< psi::PSIO > &psio, size_t fileno, const std::string &tocentry, int nso)
 
void load (psi::PSIO *const psio, size_t fileno, SaveType savetype=LowerTriangle)
 
void load (std::shared_ptr< psi::PSIO > &psio, size_t fileno, SaveType savetype=LowerTriangle)
 
void save (const std::string &filename, bool append=true, bool saveLowerTriangle=true, bool saveSubBlocks=false)
 
void save (psi::PSIO *const psio, size_t fileno, SaveType savetype=LowerTriangle)
 
void save (std::shared_ptr< psi::PSIO > &psio, size_t fileno, SaveType savetype=LowerTriangle)
 
void set (const double *const *const sq)
 
void set (const double *const *const sq, int irrep)
 
void set (const SimpleMatrix *const sq)
 
void set (const std::shared_ptr< SimpleMatrix > &sq)
 
void set_diagonal (const Vector *const vec)
 
void set_diagonal (const Vector &vec)
 
void set_diagonal (const std::shared_ptr< Vector > &vec)
 
void transform (const Matrix *const a, const Matrix *const transformer)
 
void transform (const SharedMatrix &a, const SharedMatrix &transformer)
 
void transform (const Matrix *const transformer)
 
void transform (const SharedMatrix &transformer)
 
void back_transform (const Matrix *const a, const Matrix *const transformer)
 
void back_transform (const SharedMatrix &a, const SharedMatrix &transformer)
 
void back_transform (const Matrix *const transformer)
 
void back_transform (const SharedMatrix &transformer)
 
void gemm (bool transa, bool transb, double alpha, const Matrix *const a, const Matrix *const b, double beta)
 
void gemm (bool transa, bool transb, double alpha, const SharedMatrix &a, const SharedMatrix &b, double beta)
 
void gemm (bool transa, bool transb, double alpha, const SharedMatrix &a, const Matrix &b, double beta)
 
void gemm (bool transa, bool transb, double alpha, const Matrix &a, const SharedMatrix &b, double beta)
 
void gemm (const char &transa, const char &transb, const std::vector< int > &m, const std::vector< int > &n, const std::vector< int > &k, const double &alpha, const SharedMatrix &a, const std::vector< int > &lda, const SharedMatrix &b, const std::vector< int > &ldb, const double &beta, const std::vector< int > &ldc, const std::vector< unsigned long > &offset_a=std::vector< unsigned long >(), const std::vector< unsigned long > &offset_b=std::vector< unsigned long >(), const std::vector< unsigned long > &offset_c=std::vector< unsigned long >())
 
void gemm (const char &transa, const char &transb, const int &m, const int &n, const int &k, const double &alpha, const SharedMatrix &a, const int &lda, const SharedMatrix &b, const int &ldb, const double &beta, const int &ldc, const unsigned long &offset_a=0, const unsigned long &offset_b=0, const unsigned long &offset_c=0)
 
void diagonalize (Matrix *eigvectors, Vector *eigvalues, diagonalize_order nMatz=ascending)
 
void diagonalize (SharedMatrix &eigvectors, std::shared_ptr< Vector > &eigvalues, diagonalize_order nMatz=ascending)
 
void diagonalize (SharedMatrix &eigvectors, Vector &eigvalues, diagonalize_order nMatz=ascending)
 
void diagonalize (SharedMatrix &metric, SharedMatrix &eigvectors, std::shared_ptr< Vector > &eigvalues, diagonalize_order nMatz=ascending)
 
void svd (SharedMatrix &U, SharedVector &S, SharedMatrix &V)
 
void svd_a (SharedMatrix &U, SharedVector &S, SharedMatrix &V)
 
std::tuple< SharedMatrix,
SharedVector, SharedMatrix
svd_temps ()
 
std::tuple< SharedMatrix,
SharedVector, SharedMatrix
svd_a_temps ()
 
SharedMatrix pseudoinverse (double condition, int &nremoved)
 
bool schmidt_add_row (int h, int rows, Vector &v) throw ()
 
bool schmidt_add_row (int h, int rows, double *v) throw ()
 
double ** operator[] (int i)
 
double & operator() (int i, int j)
 
const double & operator() (int i, int j) const
 
double & operator() (int h, int i, int j)
 
const double & operator() (int h, int i, int j) const
 
bool equal (const Matrix &rhs)
 
bool equal (const SharedMatrix &rhs)
 
bool equal (const Matrix *rhs)
 
bool equal_but_for_row_order (const Matrix &rhs, double TOL=1.0e-10)
 
bool equal_but_for_row_order (const SharedMatrix &rhs, double TOL=1.0e-10)
 
bool equal_but_for_row_order (const Matrix *rhs, double TOL=1.0e-10)
 

Static Public Member Functions

static SharedMatrix create (const std::string &name, const Dimension &rows, const Dimension &cols)
 
static SharedMatrix horzcat (const std::vector< SharedMatrix > &mats)
 
static SharedMatrix vertcat (const std::vector< SharedMatrix > &mats)
 
static SharedMatrix doublet (const SharedMatrix &A, const SharedMatrix &B, bool transA=false, bool transB=false)
 
static SharedMatrix triplet (const SharedMatrix &A, const SharedMatrix &B, const SharedMatrix &C, bool transA=false, bool transB=false, bool transC=false)
 

Protected Member Functions

void alloc ()
 Allocates matrix_. More...
 
void release ()
 Release matrix_. More...
 
void copy_from (double ***)
 Copies data from the passed matrix to this matrix_. More...
 
void print_mat (const double *const *const a, int m, int n, std::string out) const
 

Static Protected Member Functions

static double ** matrix (int nrow, int ncol)
 allocate a block matrix – analogous to libciomr's block_matrix More...
 
static void free (double **Block)
 free a (block) matrix – analogous to libciomr's free_block More...
 

Protected Attributes

double *** matrix_
 Matrix data. More...
 
int nirrep_
 Number of irreps. More...
 
Dimension rowspi_
 Rows per irrep array. More...
 
Dimension colspi_
 Columns per irrep array. More...
 
std::string name_
 Name of the matrix. More...
 
int symmetry_
 Symmetry of this matrix (in most cases this will be 0 [totally symmetric]) More...
 
std::vector< int > numpy_shape_
 Numpy Shape. More...
 

Friends

class Vector
 

Detailed Description

Makes using matrices just a little easier.

Using a matrix factory makes creating these a breeze.

Member Enumeration Documentation

Enumerator
Full 
SubBlocks 
LowerTriangle 

Constructor & Destructor Documentation

psi::Matrix::Matrix ( )

Default constructor, zeros everything out.

psi::Matrix::Matrix ( const std::string &  name,
int  symmetry = 0 
)

Constructor, zeros everything out, sets name_

Parameters
nameName of the matrix, used in saving and printing.
psi::Matrix::Matrix ( const Matrix copy)

copy reference constructor

psi::Matrix::Matrix ( const SharedMatrix copy)
explicit

Explicit shared point copy constructor.

psi::Matrix::Matrix ( const Matrix copy)
explicit

copy pointer constructor

psi::Matrix::Matrix ( int  nirrep,
const int *  rowspi,
const int *  colspi,
int  symmetry = 0 
)

Constructor, sets up the matrix

Parameters
nirrepNumber of blocks.
rowspiArray of length nirreps giving row dimensionality.
colspiArray of length nirreps giving column dimensionality.
psi::Matrix::Matrix ( const std::string &  name,
int  nirrep,
const int *  rowspi,
const int *  colspi,
int  symmetry = 0 
)

Constructor, sets name_, and sets up the matrix

Parameters
nameName of the matrix.
nirrepNumber of blocks.
rowspiArray of length nirreps giving row dimensionality.
colspiArray of length nirreps giving column dimensionality.
psi::Matrix::Matrix ( int  nirrep,
int  rows,
const int *  colspi 
)

Constructor, forms non-standard matrix.

Parameters
nirrepNumber of blocks.
rowsSingular value. All blocks have same number of rows.
colspiArray of length nirreps. Defines blocking scheme for columns.
psi::Matrix::Matrix ( int  nirrep,
const int *  rowspi,
int  cols 
)

Constructor, forms non-standard matrix.

Parameters
nirrepNumber of blocks.
rowspiArray of length nirreps. Defines blocking scheme for rows.
colsSingular value. All blocks have same number of columns.
psi::Matrix::Matrix ( int  rows,
int  cols 
)

Constructor, sets up the matrix Convenience case for 1 irrep Note: You should be using SimpleMatrix

Parameters
rowsRow dimensionality.
colsColumn dimensionality.
psi::Matrix::Matrix ( const std::string &  name,
int  rows,
int  cols 
)

Constructor, sets up the matrix Convenience case for 1 irrep Note: You should be using SimpleMatrix

Parameters
nameName of the matrix.
rowsRow dimensionality.
colsColumn dimensionality.
psi::Matrix::Matrix ( dpdfile2 inFile)

Contructs a Matrix from a dpdfile2

Parameters
inFiledpdfile2 object to replicate (must already be initialized).
psi::Matrix::Matrix ( const std::string &  name,
const Dimension rows,
const Dimension cols,
int  symmetry = 0 
)

Constructor using Dimension objects to define order and dimensionality.

Parameters
nameName of the matrix.
rowsDimension object providing row information.
colsDimension object providing column information.
symmetryoverall symmetry of the data.
psi::Matrix::Matrix ( const Dimension rows,
const Dimension cols,
int  symmetry = 0 
)

Constructor using Dimension objects to define order and dimensionality.

Parameters
rowsDimension object providing row information.
colsDimension object providing column information.
symmetryoverall symmetry of the data.
psi::Matrix::~Matrix ( )
virtual

Destructor, frees memory.

Member Function Documentation

double psi::Matrix::absmax ( )

Returns the absoluate maximum balue.

void psi::Matrix::accumulate_product ( const Matrix * const  a,
const Matrix * const  b 
)

Multiplies the two arguments and adds their result to this.

void psi::Matrix::accumulate_product ( const SharedMatrix a,
const SharedMatrix b 
)
void psi::Matrix::add ( const Matrix * const  plus)

Adds a matrix to this.

void psi::Matrix::add ( const Matrix plus)

Adds a matrix to this.

void psi::Matrix::add ( const SharedMatrix plus)

Adds a matrix to this.

void psi::Matrix::add ( int  h,
int  m,
int  n,
double  val 
)
inline

Add val to an element of this.

void psi::Matrix::add ( int  m,
int  n,
double  val 
)
inline

Add val to an element of this.

bool psi::Matrix::add_and_orthogonalize_row ( const SharedVector  v)

Expands the row dimension by one, and then orthogonalizes vector v against the current rows, before setting the new row to the orthogonalized copy of v

void psi::Matrix::alloc ( )
protected

Allocates matrix_.

void psi::Matrix::apply_denominator ( const Matrix * const  plus)

apply_denominators a matrix to this

void psi::Matrix::apply_denominator ( const Matrix plus)

apply_denominators a matrix to this

void psi::Matrix::apply_denominator ( const SharedMatrix plus)

apply_denominators a matrix to this

void psi::Matrix::apply_symmetry ( const SharedMatrix a,
const SharedMatrix transformer 
)

Special function to transform a SimpleMatrix (no symmetry) into a symmetry matrix.

Parameters
aSimpleMatrix to transform
transformerThe matrix returned by PetiteList::aotoso() that acts as the transformer
void psi::Matrix::axpy ( double  a,
SharedMatrix  X 
)

Simple AXPY call with support for irreps Y = a * X + Y

Parameters
aScaling parameter
XMatrix to be be added
void psi::Matrix::back_transform ( const Matrix *const  a,
const Matrix *const  transformer 
)

Back transform a by transformer save result to this

void psi::Matrix::back_transform ( const SharedMatrix a,
const SharedMatrix transformer 
)
void psi::Matrix::back_transform ( const Matrix *const  transformer)

Back transform this by transformer

void psi::Matrix::back_transform ( const SharedMatrix transformer)
void psi::Matrix::back_transform ( const Matrix a,
const Matrix transformer 
)

Back transform a by transformer save result to this.

void psi::Matrix::back_transform ( const Matrix transformer)

Back transform this by transformer.

SharedMatrix psi::Matrix::canonical_orthogonalization ( double  delta = 0.0,
SharedMatrix  eigvec = SharedMatrix() 
)

Extract a conditioned orthonormal basis from this SPD matrix via canonical orthogonalization.

Parameters
deltathe relative condition to maintain
Returns
X, a SharedMatrix with m x m' dimension (m' < m if conditioning occurred)
void psi::Matrix::cholesky_factorize ( )

Computes the Cholesky factorization of a real symmetric positive definite matrix A.

This is the block version of the algorithm, calling Level 3 BLAS.

SharedMatrix psi::Matrix::clone ( ) const

Creates an exact copy of the matrix and returns it.

int psi::Matrix::coldim ( const int &  h = 0) const
inline

Returns the cols in irrep h.

SharedMatrix psi::Matrix::collapse ( int  dim = 0)

Summation collapse along either rows (0) or columns (1), always producing a column matrix

Parameters
dim0 (row sum) or 1 (col sum)
Returns
{i} M_{ij} => T_j if dim = 0 or {j} M_{ij} => T_i if dim = 1
const Dimension& psi::Matrix::colspi ( ) const
inline

Returns the columns per irrep array.

int psi::Matrix::colspi ( const int &  h) const
inline

Returns the columns per irrep array.

const double** psi::Matrix::const_pointer ( const int &  h = 0) const
inline
void psi::Matrix::copy ( const SharedMatrix cp)

Copies data onto this

Parameters
cpObject to copy from.
void psi::Matrix::copy ( const Matrix cp)
void psi::Matrix::copy ( const Matrix cp)
void psi::Matrix::copy_from ( double ***  c)
protected

Copies data from the passed matrix to this matrix_.

void psi::Matrix::copy_lower_to_upper ( )

Copy lower triangle to upper triangle

void psi::Matrix::copy_to_row ( int  h,
int  row,
double const *const  data 
)

Copies data to the row specified. Assumes data is of correct length.

void psi::Matrix::copy_upper_to_lower ( )

Copy upper triangle to lower triangle

SharedMatrix psi::Matrix::create ( const std::string &  name,
const Dimension rows,
const Dimension cols 
)
static

Convenient creation function return SharedMatrix

void psi::Matrix::diagonalize ( Matrix eigvectors,
Vector eigvalues,
diagonalize_order  nMatz = ascending 
)

Diagonalizes this, eigvectors and eigvalues must be created by caller. Only for symmetric matrices.

void psi::Matrix::diagonalize ( SharedMatrix eigvectors,
std::shared_ptr< Vector > &  eigvalues,
diagonalize_order  nMatz = ascending 
)
void psi::Matrix::diagonalize ( SharedMatrix eigvectors,
Vector eigvalues,
diagonalize_order  nMatz = ascending 
)
void psi::Matrix::diagonalize ( SharedMatrix metric,
SharedMatrix eigvectors,
std::shared_ptr< Vector > &  eigvalues,
diagonalize_order  nMatz = ascending 
)

Diagonalizes this, applying supplied metric, eigvectors and eigvalues must be created by caller. Only for symmetric matrices.

void psi::Matrix::diagonalize ( Matrix eigvectors,
Vector eigvalues,
int  nMatz = 1 
)

Diagonalize a symmetric matrix. Eigvectors and eigvalues must be created by caller.

SharedMatrix psi::Matrix::doublet ( const SharedMatrix A,
const SharedMatrix B,
bool  transA = false,
bool  transB = false 
)
static

Simple doublet GEMM with on-the-fly allocation

Parameters
AThe first matrix
BThe second matrix
transATranspose the first matrix
transBTranspose the second matrix
void psi::Matrix::eivprint ( const Vector *const  values,
std::string  out = "outfile" 
)

Print the matrix with corresponding eigenvalues below each column

Parameters
valuesEigenvalues to print associated with eigenvectors.
outWhere to print to, defaults to Psi4's outfile.
void psi::Matrix::eivprint ( const Vector values,
std::string  out = "outfile" 
)

Print the matrix with corresponding eigenvalues below each column.

void psi::Matrix::eivprint ( const std::shared_ptr< Vector > &  values,
std::string  out = "outfile" 
)

Print the matrix with corresponding eigenvalues below each column.

void psi::Matrix::element_add_mirror ( )
inline
bool psi::Matrix::equal ( const Matrix rhs)

Checks matrix equality.

Parameters
rhsMatrix to compare to.
Returns
true if equal, otherwise false.
bool psi::Matrix::equal ( const SharedMatrix rhs)
bool psi::Matrix::equal ( const Matrix rhs)
bool psi::Matrix::equal_but_for_row_order ( const Matrix rhs,
double  TOL = 1.0e-10 
)

Checks matrix equality, but allows rows to be in a different order.

Parameters
rhsMatrix to compare to.
Returns
true if equal, otherwise false.
bool psi::Matrix::equal_but_for_row_order ( const SharedMatrix rhs,
double  TOL = 1.0e-10 
)
bool psi::Matrix::equal_but_for_row_order ( const Matrix rhs,
double  TOL = 1.0e-10 
)
void psi::Matrix::expm ( int  n = 2,
bool  scale = false 
)

Computes the approximate exponential of a general real square matrix via Pade symmetric Pade approximation (orthonormality guaranteed) (defaults to a 2 x 2 Pade table, with no scaling or balancing)

void psi::Matrix::free ( double **  Block)
staticprotected

free a (block) matrix – analogous to libciomr's free_block

void psi::Matrix::gemm ( bool  transa,
bool  transb,
double  alpha,
const Matrix *const  a,
const Matrix *const  b,
double  beta 
)

General matrix multiply, saves result to this

Parameters
transaTranspose the left matrix
transbTranspose the right matrix
alphaPrefactor for the matrix multiplication
aLeft matrix
bRight matrix
betaPrefactor for the resulting matrix
void psi::Matrix::gemm ( bool  transa,
bool  transb,
double  alpha,
const SharedMatrix a,
const SharedMatrix b,
double  beta 
)
void psi::Matrix::gemm ( bool  transa,
bool  transb,
double  alpha,
const SharedMatrix a,
const Matrix b,
double  beta 
)
void psi::Matrix::gemm ( bool  transa,
bool  transb,
double  alpha,
const Matrix a,
const SharedMatrix b,
double  beta 
)
void psi::Matrix::gemm ( const char &  transa,
const char &  transb,
const std::vector< int > &  m,
const std::vector< int > &  n,
const std::vector< int > &  k,
const double &  alpha,
const SharedMatrix a,
const std::vector< int > &  lda,
const SharedMatrix b,
const std::vector< int > &  ldb,
const double &  beta,
const std::vector< int > &  ldc,
const std::vector< unsigned long > &  offset_a = std::vector<unsigned long>(),
const std::vector< unsigned long > &  offset_b = std::vector<unsigned long>(),
const std::vector< unsigned long > &  offset_c = std::vector<unsigned long>() 
)

Raw access to the underlying dgemm call. Saves result to this.

void psi::Matrix::gemm ( const char &  transa,
const char &  transb,
const int &  m,
const int &  n,
const int &  k,
const double &  alpha,
const SharedMatrix a,
const int &  lda,
const SharedMatrix b,
const int &  ldb,
const double &  beta,
const int &  ldc,
const unsigned long &  offset_a = 0,
const unsigned long &  offset_b = 0,
const unsigned long &  offset_c = 0 
)
void psi::Matrix::gemm ( bool  transa,
bool  transb,
double  alpha,
const Matrix a,
const Matrix b,
double  beta 
)

General matrix multiply, saves result to this.

void psi::Matrix::general_invert ( )

Computes the inverse of a matrix using the LU factorization. This method inverts U and then computes inv(A) by solving the system inv(A)*L = inv(U) for inv(A).

double psi::Matrix::get ( const int &  h,
const int &  m,
const int &  n 
) const
inline

Returns a single element of matrix_

Parameters
hSubblock
mRow
nColumn
Returns
value at position (h, m, n)
double psi::Matrix::get ( const int &  m,
const int &  n 
) const
inline

Returns a single element of matrix_

Parameters
mRow
nColumn
Returns
value at position (m, n)
SharedMatrix psi::Matrix::get_block ( const Slice rows,
const Slice cols 
)

Get a matrix block

Parameters
rowsRows slice
colsColumns slice
Returns
SharedMatrix object
SharedVector psi::Matrix::get_column ( int  h,
int  m 
)

Returns a single column of matrix_

Parameters
hSubblock
mColumn
Returns
SharedVector object
const double* psi::Matrix::get_const_pointer ( const int &  h = 0) const
inline
double* psi::Matrix::get_pointer ( const int &  h = 0) const
inline

Returns the double* pointer to the h-th irrep block matrix NOTE: This method is provided for convenience in advanced BLAS/LAPACK calls, and should be used with caution. In particular, operations performed with these pointers should be scoped to avoid erroneous alteration of the objects primitive data. Moreover, the memory location/size of the double* obtained with this method should NEVER be resized, moved, or freed.

Parameters
hSubblock
Returns
pointer to h-th subblock in block-matrix form
SharedVector psi::Matrix::get_row ( int  h,
int  m 
)

Returns a single row of matrix_

Parameters
hSubblock
mRow
Returns
SharedVector object
void psi::Matrix::hermitivitize ( )

Average off-diagonal elements

SharedMatrix psi::Matrix::horzcat ( const std::vector< SharedMatrix > &  mats)
static

Horizontally concatenate matrices

Parameters
matsstd::vector of Matrix objects to concatenate
void psi::Matrix::identity ( )

Set this to identity.

void psi::Matrix::init ( int  nirrep,
const int *  rowspi,
const int *  colspi,
const std::string &  name = "",
int  symmetry = 0 
)

Initializes a matrix

Parameters
nirrepNumber of blocks in this matrix.
rowspiArray of length nirreps giving row dimensionality.
colspiArray of length nirreps giving column dimensionality.
nameName of the matrix.
symmetryOverall symmetry of the data.
void psi::Matrix::init ( const Dimension rowspi,
const Dimension colspi,
const std::string &  name = "",
int  symmetry = 0 
)
void psi::Matrix::invert ( )

Computes the inverse of a real symmetric positive definite matrix A using the Cholesky factorization A = L*L**T computed by cholesky_factorize().

bool psi::Matrix::load ( psi::PSIO psio,
size_t  fileno,
const std::string &  tocentry,
int  nso 
)

Load a matrix from a PSIO object from fileno with tocentry of size nso

Parameters
psioPSIO object to read with.
filenoFile to read from.
tocentryTable of contents entry to use.
nsoNumber of orbitals to use to read in.
Returns
true if loaded, false otherwise.
bool psi::Matrix::load ( std::shared_ptr< psi::PSIO > &  psio,
size_t  fileno,
const std::string &  tocentry,
int  nso 
)
void psi::Matrix::load ( psi::PSIO *const  psio,
size_t  fileno,
SaveType  savetype = LowerTriangle 
)

Loads the block matrix from PSIO object with fileno and with the toc position of the name of the matrix The matrix must be correctly sized and named for this to work

Parameters
psioPSIO object to read with.
filenoFile to read from.
savetypeSave information suffixing point group label.
void psi::Matrix::load ( std::shared_ptr< psi::PSIO > &  psio,
size_t  fileno,
SaveType  savetype = LowerTriangle 
)
void psi::Matrix::load ( const std::string &  filename)

Loads a block matrix from an ASCII file (see tests/mints3 for file format).

Parameters
filenameName of the file to read in.
void psi::Matrix::load_mpqc ( const std::string &  filename)

Loads a matrix from an ASCII file. The matrix data resembles MPQC matrix printing with additional size data.

Parameters
filenameName of the file to read in.
double ** psi::Matrix::matrix ( int  nrow,
int  ncol 
)
staticprotected

allocate a block matrix – analogous to libciomr's block_matrix

SharedMatrix psi::Matrix::matrix_3d_rotation ( Vector3  axis,
double  phi,
bool  Sn 
)

For a matrix of 3D vectors (ncol==3), rotate a set of points around an arbitrary axis. Vectors are the rows of the matrix.

Parameters
axisVector3 : axis around which to rotate (need not be normalized)
phidouble : magnitude of rotation in rad
Snbool : if true, then also reflect in plane through origin and perpendicular to rotation
Returns
SharedMatrix with rotated points (rows)
int psi::Matrix::max_ncol ( ) const
inline

Returns the column size of the largest block.

int psi::Matrix::max_nrow ( ) const
inline

Returns the row size of the largest block.

const std::string& psi::Matrix::name ( ) const
inline

Gets the name of the matrix.

int psi::Matrix::ncol ( ) const
inline

Returns the total number of columns.

const int& psi::Matrix::nirrep ( void  ) const
inline

Returns the number of irreps.

int psi::Matrix::nrow ( ) const
inline

Returns the total number of rows.

std::vector<int> psi::Matrix::numpy_shape ( )
inline
double& psi::Matrix::operator() ( int  i,
int  j 
)
inline
const double& psi::Matrix::operator() ( int  i,
int  j 
) const
inline
double& psi::Matrix::operator() ( int  h,
int  i,
int  j 
)
inline
const double& psi::Matrix::operator() ( int  h,
int  i,
int  j 
) const
inline
double** psi::Matrix::operator[] ( int  i)
inline

Retrieves the i'th irrep

SharedMatrix psi::Matrix::partial_cholesky_factorize ( double  delta = 0.0,
bool  throw_if_negative = false 
)

Computes the fully pivoted partial Cholesky factorization of a real symmetric positive semidefinite matrix A, to numerical precision .

The results L is dimpi x sigpi, where dimpi is the dimension of the original matrix, and sigpi is the number of columns required to reach accuracy delta. Sigpi is strictly less than or equal to dimpi

The decomposition is of the form: A' LL^T, where A is the original matrix, and L is the resultant Cholesky factor. The error matrix is: D = A - A'

This function recursively computes the Schur complement to determine the optimal ordering of columns.

This algorithm requires up to 3 total core matrices of the size of the original These are 1) the original, 2) The resultant, and 3) a temporary matrix

Parameters
deltamaximum allowed error in the error matrix D, which always occurs on the diagonal. Defaults to 0.0, in which case the numerically exact factor is returned.
throw_if_negativebool, throw if pivot <= 0.0 is detected?
Returns
L, SharedMatrix, with rows of dimension dimpi and columns of dimension sigpi
std::pair< SharedMatrix, SharedMatrix > psi::Matrix::partial_square_root ( double  delta = 0.0)

Computes a low-rank factorization <P,N> such that PP'-NN' A in an optimal sense in the 2-norm. Columns of P,N are truncated after the singular values fall below delta P contains columns corresponding to positive eigenvalues, N to columns corresponding to negative eigenvalues/ This is the real Hermitian-indefinite analog of partial Cholesky factorization.

This algorithm requires memory equivalent to this matrix plus the equivalent eigendecompositon call via DSYEV

Parameters
deltamaximum allowed 2-norm of the error matrix D, Defaults to 0.0, in which case the numerically exact square root is returned.
Returns
P positive part of square root, with only significant columns included
N negative part of square root, with only significant columns included
double** psi::Matrix::pointer ( const int &  h = 0) const
inline

Returns the double** pointer to the h-th irrep block matrix NOTE: This method is provided for convenience in advanced BLAS/LAPACK calls, and should be used with caution. In particular, operations performed with these pointers should be scoped to avoid erroneous alteration of the objects primitive data. Moreover, the memory location/size of the double** obtained with this method should NEVER be resized, moved, or freed.

Parameters
hSubblock
Returns
pointer to h-th subblock in block-matrix form
Dimension psi::Matrix::power ( double  alpha,
double  cutoff = 1.0E-12 
)

Computes the pseudo power of a real symmetric matrix A using eigendecomposition. This operation is uniquely defined for all symmetric matrices for integral alpha, and for all symmetric positive definite matrices for all alpha.

A fractional power of a Hermitian non-SPD matrix is not uniquely defined due to the ambiguity of the complex roots of unity, and will often be returned as NaN due to the formation of an imaginary root of an eigenvalue. Fractional powers should only be called for SPD matrices, and integral powers should always be specified with literals.

For negative powers, this operation is very sensitive to condition, and will discard eigenvectors corresponding to small eigenvalues which contribute to a condition number smaller than cutoff. The resultant power is actually a pseudo-power

Parameters
alphaThe power to raise the matrix to
cutoffThe smallest absolute value of a condition number to allow to contribute in the formation of a negative power of A
Returns
a Dimension object with the remaining sizes. Can be used in a View.
void psi::Matrix::print ( std::string  outfile = "outfile",
const char *  extra = NULL 
) const

Print the matrix using print_mat

Parameters
outfileFile point to use, defaults to Psi4's outfile.
extraWhen printing the name of the 'extra' will be printing after the name.
void psi::Matrix::print_atom_vector ( std::string  out_fname = "outfile")

Prints the matrix with atom and xyz styling.

void psi::Matrix::print_mat ( const double *const *const  a,
int  m,
int  n,
std::string  out 
) const
protected
void psi::Matrix::print_out ( ) const
inline

Python compatible printer.

void psi::Matrix::print_to_mathematica ( )

Prints the matrix so that it can be copied and pasted into Mathematica easily.

void psi::Matrix::project_out ( Matrix v)

Project out the row vectors in the matrix provided out of this matrix. Assumes all matrices are C1 in nature. Future version will handle irreps. Note: this is destroyed.

Parameters
vMatrix to project out
SharedMatrix psi::Matrix::pseudoinverse ( double  condition,
int &  nremoved 
)

Matrix of size (m x n) which is the conditioned pseudoinverse of this (m x n)

void psi::Matrix::release ( )
protected

Release matrix_.

void psi::Matrix::remove_symmetry ( const SharedMatrix a,
const SharedMatrix transformer 
)

Special function to transform a symmetry matrix into a SimpleMatrix (no symmetry).

Parameters
asymmetry matrix to transform
transformerThe matrix returned by PetiteList::sotoao() that acts as the transformer
double psi::Matrix::rms ( )

Returns the rms of this.

void psi::Matrix::rotate_columns ( int  h,
int  i,
int  j,
double  theta 
)

Rotates columns i and j in irrep h, by an angle theta

Parameters
h- the irrep in which the rotation will be applied
i- the zero-based (within irrep) column number for i
j- the zero-based (within irrep) column number for j
theta- the angle (in radians) about which to rotate
int psi::Matrix::rowdim ( const int &  h = 0) const
inline

Returns the rows in irrep h.

const Dimension& psi::Matrix::rowspi ( ) const
inline

Returns the rows per irrep array.

int psi::Matrix::rowspi ( const int &  h) const
inline

Returns the rows per irrep array.

void psi::Matrix::save ( const std::string &  filename,
bool  append = true,
bool  saveLowerTriangle = true,
bool  saveSubBlocks = false 
)

Saves the matrix in ASCII format to filename

Parameters
filenameName of the file to write to.
appendAppend to the file?
saveLowerTriangleSave only the lower triangle?
saveSubBlocksSave three index quantities denoting symmetry block (true), or convert to a full matrix and save that (false)?
void psi::Matrix::save ( psi::PSIO *const  psio,
size_t  fileno,
SaveType  savetype = LowerTriangle 
)

Saves the block matrix to PSIO object with fileno and with the toc position of the name of the matrix

Parameters
psioPSIO object to write with.
filenoFile to write to.
savetypeSave information suffixing point group label.
void psi::Matrix::save ( std::shared_ptr< psi::PSIO > &  psio,
size_t  fileno,
SaveType  savetype = LowerTriangle 
)
void psi::Matrix::scale ( double  a)

Scales this matrix.

void psi::Matrix::scale_column ( int  h,
int  n,
double  a 
)

Scale column n of irrep h by a.

void psi::Matrix::scale_row ( int  h,
int  m,
double  a 
)

Scale row m of irrep h by a.

void psi::Matrix::schmidt ( )

Calls libqt schmidt function

bool psi::Matrix::schmidt_add_row ( int  h,
int  rows,
Vector v 
)
throw (
)

Assume this is a orthogonal matrix. This function Gram-Schmidt orthogonalizes a new vector v and adds it to matrix A. This must contain a free row pointer for a new row. Don't add orthogonalized v' if norm(v') < NORM_TOL.

Adapted from libqt's version by David Sherrill, Feb 1994

Parameters
rowscurrent number of valid rows in this (this must have space for 'rows+1' row.)
vvector to add to A after it has been made orthogonal to rest of A
Returns
true if a vector is added, false otherwise
bool psi::Matrix::schmidt_add_row ( int  h,
int  rows,
double *  v 
)
throw (
)
void psi::Matrix::schmidt_orthog ( SharedMatrix  S,
int  n 
)

Schmidt orthogonalize this. S is the overlap matrix. n is the number of columns to orthogonalize.

Dimension psi::Matrix::schmidt_orthog_columns ( SharedMatrix  S,
double  tol,
double *  res = 0 
)

Schmidt orthogonalize this. You'll likely want to View this matrix afterwards using the result to obtain a properly sized Matrix.

Parameters
Soverlap matrix.
tolis the tolerance.
Returns
A Dimension object tell you how many were removed in each irrep.
void psi::Matrix::set ( double  val)

Set every element of matrix_ to val

Parameters
valValue to apply to entire matrix.
void psi::Matrix::set ( const double *const  tri)

Copies lower triangle tri to matrix_, calls tri_to_sq

Parameters
triLower triangle matrix to set to.
void psi::Matrix::set ( const double *const *const  sq)

Copies sq to matrix_

Parameters
sqDouble matrix to copy over.
void psi::Matrix::set ( const double *const *const  sq,
int  irrep 
)

Copies sq to a specific irrep block of matrix_

Parameters
sqDouble matrix to copy
irrepirrep block into which we copy
void psi::Matrix::set ( const SimpleMatrix *const  sq)

Copies sq to matrix_

Parameters
sqSimpleMatrix object to set this matrix to.
void psi::Matrix::set ( const std::shared_ptr< SimpleMatrix > &  sq)
void psi::Matrix::set ( int  h,
int  m,
int  n,
double  val 
)
inline

Set a single element of matrix_

Parameters
hSubblock to address
mRow
nColumn
valValue
void psi::Matrix::set ( int  m,
int  n,
double  val 
)
inline

Set a single element of matrix_

Parameters
mRow
nColumn
valValue
void psi::Matrix::set_block ( const Slice rows,
const Slice cols,
SharedMatrix  block 
)

Set a matrix block

Parameters
rowsRows slice
colsColumns slice
blockthe SharedMatrix object block to set
void psi::Matrix::set_column ( int  h,
int  m,
SharedVector  vec 
)

Set a single column of matrix_

Parameters
hSubblock
mColumn
vecSharedVector object to set the column to
void psi::Matrix::set_diagonal ( const Vector *const  vec)

Set the diagonal of matrix_ to vec

Parameters
vecVector to apply to the diagonal.
void psi::Matrix::set_diagonal ( const Vector vec)
void psi::Matrix::set_diagonal ( const std::shared_ptr< Vector > &  vec)
void psi::Matrix::set_name ( const std::string &  name)
inline

Sets the name of the matrix, used in print(...) and save(...)

Parameters
nameNew name to use.
void psi::Matrix::set_numpy_shape ( std::vector< int >  shape)
inline

Adds accessability to the matrix shape for numpy

void psi::Matrix::set_row ( int  h,
int  m,
SharedVector  vec 
)

Set a single row of matrix_

Parameters
hSubblock
mRow
vecSharedVector object to set the row to
size_t psi::Matrix::size ( const int &  h = 0) const
inline
void psi::Matrix::subtract ( const Matrix * const  plus)

Subtracts a matrix from this.

void psi::Matrix::subtract ( const SharedMatrix sub)

Subtracts a matrix from this.

double psi::Matrix::sum_of_squares ( )

Returns the sum of the squares of this.

void psi::Matrix::svd ( SharedMatrix U,
SharedVector S,
SharedMatrix V 
)

General SVD, such that A = USV. U, S, and V must be allocated by the caller.

void psi::Matrix::svd_a ( SharedMatrix U,
SharedVector S,
SharedMatrix V 
)

General SVD, such that A = USV. U, S, and V must be allocated by the caller. all M columns of U and all N rows of V**T are returned in the arrays U and VT; This assumes totally symmetric quantities.

std::tuple< SharedMatrix, SharedVector, SharedMatrix > psi::Matrix::svd_a_temps ( )

Matrices/Vectors U (m x m), S (k), V (n x n) to feed to Matrix::svd_a

std::tuple< SharedMatrix, SharedVector, SharedMatrix > psi::Matrix::svd_temps ( )

Matrices/Vectors U (m x k), S (k), V (k x n) to feed to Matrix::svd

void psi::Matrix::swap_columns ( int  h,
int  i,
int  j 
)

Swap cols i and j.

void psi::Matrix::swap_rows ( int  h,
int  i,
int  j 
)

Swap rows i and j.

void psi::Matrix::symmetrize_gradient ( std::shared_ptr< Molecule mol)

Symmetrizes the a gradient like matrix (N, 3) using information from the given Molecule.

void psi::Matrix::symmetrize_hessian ( std::shared_ptr< Molecule mol)

Symmetrizes the a Hessian like matrix (3 * N, 3 * N) using information from the given Molecule.

const int& psi::Matrix::symmetry ( ) const
inline

Returns the overall symmetry of the matrix. For a totally-symmetric matrix this will be 0. The value returned is compatible with bitwise XOR (^) math.

double ** psi::Matrix::to_block_matrix ( ) const

Returns a copy of the current matrix.

Returns
the matrix
SharedMatrix psi::Matrix::to_block_sharedmatrix ( ) const

Returns a copy of the current matrix.

Returns
the SharedMatrix
double * psi::Matrix::to_lower_triangle ( ) const

Returns a copy of the current matrix in lower triangle form.

Returns
the matrix
SimpleMatrix* psi::Matrix::to_simple_matrix ( ) const

Converts this to a full non-symmetry-block matrix

Returns
The SimpleMatrix copy of the current matrix.
double psi::Matrix::trace ( )

Returns the trace of this.

void psi::Matrix::transform ( const SharedMatrix L,
const SharedMatrix F,
const SharedMatrix R 
)

Performs a the transformation L^ F R. Result goes to this.

Parameters
Lleft transformation matrix (will be transposed)
Fmatrix to apply transformation to
Rright transformation matrix (will not be transposed)
void psi::Matrix::transform ( const Matrix *const  a,
const Matrix *const  transformer 
)

Transform a by transformer save result to this

void psi::Matrix::transform ( const SharedMatrix a,
const SharedMatrix transformer 
)
void psi::Matrix::transform ( const Matrix *const  transformer)

Transform this by transformer

void psi::Matrix::transform ( const SharedMatrix transformer)
void psi::Matrix::transform ( const Matrix a,
const Matrix transformer 
)

Transform a by transformer save result to this.

void psi::Matrix::transform ( const Matrix transformer)

Transform this by transformer.

SharedMatrix psi::Matrix::transpose ( )

Creates a new matrix which is the transpose of this.

void psi::Matrix::transpose_this ( )

In place transposition.

SharedMatrix psi::Matrix::triplet ( const SharedMatrix A,
const SharedMatrix B,
const SharedMatrix C,
bool  transA = false,
bool  transB = false,
bool  transC = false 
)
static

Simple triplet GEMM with on-the-fly allocation

Parameters
AThe first matrix
BThe second matrix
CThe third matrix
transATranspose the first matrix
transBTranspose the second matrix
transCTranspose the third matrix
double psi::Matrix::vector_dot ( const Matrix *const  rhs)

Returns the vector dot product of this by rhs.

double psi::Matrix::vector_dot ( const SharedMatrix rhs)
double psi::Matrix::vector_dot ( const Matrix rhs)
SharedMatrix psi::Matrix::vertcat ( const std::vector< SharedMatrix > &  mats)
static

Vertically concatenate matrices

Parameters
matsstd::vector of Matrix objects to concatenate
void psi::Matrix::write_to_dpdfile2 ( dpdfile2 outFile)

Writes this to the dpdfile2 given.

void psi::Matrix::zero ( void  )

Zeros this out.

void psi::Matrix::zero_column ( int  h,
int  i 
)

Zero column

void psi::Matrix::zero_diagonal ( )

Zeros the diagonal.

void psi::Matrix::zero_lower ( )

Zero lower triangle

void psi::Matrix::zero_row ( int  h,
int  i 
)

Zero row

void psi::Matrix::zero_upper ( )

Zero upper triangle

Friends And Related Function Documentation

friend class Vector
friend

Member Data Documentation

Dimension psi::Matrix::colspi_
protected

Columns per irrep array.

double*** psi::Matrix::matrix_
protected

Matrix data.

std::string psi::Matrix::name_
protected

Name of the matrix.

int psi::Matrix::nirrep_
protected

Number of irreps.

std::vector<int> psi::Matrix::numpy_shape_
protected

Numpy Shape.

Dimension psi::Matrix::rowspi_
protected

Rows per irrep array.

int psi::Matrix::symmetry_
protected

Symmetry of this matrix (in most cases this will be 0 [totally symmetric])


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