Go to the documentation of this file.
7 #ifndef __IPSUMSYMMATRIX_HPP__
8 #define __IPSUMSYMMATRIX_HPP__
17 class SumSymMatrixSpace;
88 const std::string& name,
90 const std::string& prefix
SmartPtr< const SymMatrixSpace > GetTermSpace(Index term_idx) const
Get the matrix space for a particular term.
SumSymMatrix()
Default Constructor.
virtual void MultVectorImpl(Number alpha, const Vector &x, Number beta, Vector &y) const
Matrix-vector multiply.
void SetTermSpace(Index term_idx, const SymMatrixSpace &space)
Use this method to set the matrix spaces for the various terms.
virtual void ComputeColAMaxImpl(Vector &cols_norms, bool init) const
Implementation of ComputeColAMaxImpl, which calls ComputeRowAMaxImpl.
Index NTerms() const
Number of terms in the sum.
void GetTerm(Index iterm, Number &factor, SmartPtr< const SymMatrix > &matrix) const
Method for getting term iterm for the sum.
std::vector< SmartPtr< const SymMatrix > > matrices_
std::vector storing the matrices for each term.
This file contains a base class for all exceptions and a set of macros to help with exceptions.
double Number
Type of all numbers.
virtual bool HasValidNumbersImpl() const
Method for determining if all stored numbers are valid (i.e., no Inf or Nan).
virtual void PrintImpl(const Journalist &jnlst, EJournalLevel level, EJournalCategory category, const std::string &name, Index indent, const std::string &prefix) const
Print detailed information about the matrix.
EJournalLevel
Print Level Enum.
Class for Matrices which are sum of symmetric matrices.
void operator=(const SumSymMatrix &)
Default Assignment Operator.
int Index
Type of all indices of vectors, matrices etc.
Template class for Smart Pointers.
EJournalCategory
Category Selection Enum.
std::vector< Number > factors_
std::vector storing the factors for each term.
Class for matrix space for SumSymMatrix.
SumSymMatrix(const SumSymMatrixSpace *owner_space)
Constructor, initializing with dimensions of the matrix and the number of terms in the sum.
virtual void ComputeRowAMaxImpl(Vector &rows_norms, bool init) const
Compute the max-norm of the rows in the matrix.
~SumSymMatrixSpace()
Destructor.
SumSymMatrixSpace(Index ndim, Index nterms)
Constructor, given the dimension of the matrix and the number of terms in the sum.
SumSymMatrix(const SumSymMatrix &)
Copy Constructor.
Class responsible for all message output.
SumSymMatrix * MakeNewSumSymMatrix() const
Method for creating a new matrix of this specific type.
This is the base class for all derived symmetric matrix types.
void SetTerm(Index iterm, Number factor, const SymMatrix &matrix)
Method for setting term iterm for the sum.
SymMatrixSpace base class, corresponding to the SymMatrix base class.
const SumSymMatrixSpace * owner_space_
Copy of the owner_space as a SumSymMatrixSpace.
std::vector< SmartPtr< const SymMatrixSpace > > term_spaces_
Index NTerms() const
Return the number of terms.
~SumSymMatrix()
Destructor.
virtual SymMatrix * MakeNewSymMatrix() const
Pure virtual method for creating a new matrix of this specific type.