Psi4
Public Member Functions | Private Attributes | List of all members
psi::MatrixFactory Class Reference

A class for creating Matrix, SimpleMatrix, Vector, and SimpleVector objects. More...

#include <factory.h>

Public Member Functions

 MatrixFactory ()
 Default constructor, does nothing. More...
 
 MatrixFactory (const MatrixFactory &copy)
 Copy constructor. More...
 
 ~MatrixFactory ()
 
bool init_with (int nirrep, int *rowspi, int *colspi)
 Manually initialize the matrix factory. More...
 
bool init_with (const Dimension &rows, const Dimension &cols)
 Manually initialize the matrix factory with Dimension objects. More...
 
bool init_with (const std::shared_ptr< SOBasisSet > &sobasis)
 Manually initialize the matrix factory with SOBasisSet object. More...
 
int nirrep () const
 Returns number of irreps. More...
 
const Dimensionrowspi () const
 Returns the rows per irrep array. More...
 
int nrow (int h) const
 Returns the number of rows in irrep h. More...
 
const Dimensioncolspi () const
 Returns the columns per irrep array. More...
 
int ncol (int h) const
 Returns the number of columns in irrep h. More...
 
int norb () const
 Returns the number of orbitals. More...
 
Matrixcreate_matrix (int symmetry=0)
 Returns a new Matrix object with default dimensions. More...
 
SharedMatrix create_shared_matrix ()
 Returns a new Matrix object with default dimensions. More...
 
void create_matrix (Matrix &mat, int symmetry=0)
 
Matrixcreate_matrix (std::string name, int symmetry=0)
 Returns a new Matrix object named name with default dimensions. More...
 
SharedMatrix create_shared_matrix (const std::string &name)
 
SharedMatrix create_shared_matrix (const std::string &name, int symmetry)
 
SharedMatrix create_shared_matrix (const std::string &name, int rows, int cols)
 
void create_matrix (Matrix &mat, std::string name, int symmetry=0)
 
Vectorcreate_vector ()
 Returns a new Vector object with default dimensions. More...
 
void create_vector (Vector &vec)
 
SharedVector create_shared_vector (const std::string &name)
 

Private Attributes

int nirrep_
 Number of irreps. More...
 
int nso_
 Number of orbitals. More...
 
Dimension rowspi_
 Number of rows per irrep. More...
 
Dimension colspi_
 Number of columns per irrep. More...
 

Detailed Description

A class for creating Matrix, SimpleMatrix, Vector, and SimpleVector objects.

The objects this factory creates can automatically be sized based on information from checkpoint.

Constructor & Destructor Documentation

MatrixFactory::MatrixFactory ( )

Default constructor, does nothing.

MatrixFactory::MatrixFactory ( const MatrixFactory copy)

Copy constructor.

MatrixFactory::~MatrixFactory ( )

Member Function Documentation

const Dimension & MatrixFactory::colspi ( ) const

Returns the columns per irrep array.

Matrix * MatrixFactory::create_matrix ( int  symmetry = 0)

Returns a new Matrix object with default dimensions.

void MatrixFactory::create_matrix ( Matrix mat,
int  symmetry = 0 
)
Matrix * MatrixFactory::create_matrix ( std::string  name,
int  symmetry = 0 
)

Returns a new Matrix object named name with default dimensions.

void MatrixFactory::create_matrix ( Matrix mat,
std::string  name,
int  symmetry = 0 
)
SharedMatrix MatrixFactory::create_shared_matrix ( )

Returns a new Matrix object with default dimensions.

SharedMatrix MatrixFactory::create_shared_matrix ( const std::string &  name)
SharedMatrix MatrixFactory::create_shared_matrix ( const std::string &  name,
int  symmetry 
)
SharedMatrix MatrixFactory::create_shared_matrix ( const std::string &  name,
int  rows,
int  cols 
)
SharedVector MatrixFactory::create_shared_vector ( const std::string &  name)
Vector * MatrixFactory::create_vector ( )

Returns a new Vector object with default dimensions.

void MatrixFactory::create_vector ( Vector vec)
bool MatrixFactory::init_with ( int  nirrep,
int *  rowspi,
int *  colspi 
)

Manually initialize the matrix factory.

bool MatrixFactory::init_with ( const Dimension rows,
const Dimension cols 
)

Manually initialize the matrix factory with Dimension objects.

bool MatrixFactory::init_with ( const std::shared_ptr< SOBasisSet > &  sobasis)

Manually initialize the matrix factory with SOBasisSet object.

int MatrixFactory::ncol ( int  h) const

Returns the number of columns in irrep h.

int MatrixFactory::nirrep ( void  ) const

Returns number of irreps.

int MatrixFactory::norb ( ) const

Returns the number of orbitals.

int MatrixFactory::nrow ( int  h) const

Returns the number of rows in irrep h.

const Dimension & MatrixFactory::rowspi ( ) const

Returns the rows per irrep array.

Member Data Documentation

Dimension psi::MatrixFactory::colspi_
private

Number of columns per irrep.

int psi::MatrixFactory::nirrep_
private

Number of irreps.

int psi::MatrixFactory::nso_
private

Number of orbitals.

Dimension psi::MatrixFactory::rowspi_
private

Number of rows per irrep.


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