7#ifndef __IPDENSEGENMATRIX_HPP__
8#define __IPDENSEGENMATRIX_HPP__
19class DenseGenMatrixSpace;
224 const std::string&
name,
305 return MakeNewDenseGenMatrix();
This is the matrix space for DenseGenMatrix.
virtual Matrix * MakeNew() const
Pure virtual method for creating a new Matrix of the corresponding type.
DenseGenMatrixSpace(Index nRows, Index nCols)
Constructor for matrix space for DenseGenMatrices.
~DenseGenMatrixSpace()
Destructor.
DenseGenMatrix * MakeNewDenseGenMatrix() const
Method for creating a new matrix of this specific type.
Class for dense general matrices.
DenseGenMatrix()
Default Constructor.
const Number * Values() const
Retrieve the array that stores the matrix elements.
DenseGenMatrix(const DenseGenMatrixSpace *owner_space)
Constructor, taking the owner_space.
void AddMatrixProduct(Number alpha, const DenseGenMatrix &A, bool transA, const DenseGenMatrix &B, bool transB, Number beta)
Method for adding the product of two matrices to this matrix.
void FillIdentity(Number factor=1.)
Set this matrix to be a multiple of the identity matrix.
DenseGenMatrix(const DenseGenMatrix &)
Copy Constructor.
void CholeskySolveMatrix(DenseGenMatrix &B) const
Method for performing a solve of a linear system for one right-hand-side matrix, assuming that this m...
bool ComputeCholeskyFactor(const DenseSymMatrix &M)
Method for computing the Cholesky factorization of a positive definite matrix.
bool ComputeEigenVectors(const DenseSymMatrix &M, DenseVector &Evalues)
Method for computing an eigenvalue decomposition of the given symmetrix matrix M.
void CholeskySolveVector(DenseVector &b) const
Method for performing a solve of a linear system for one vector, assuming that this matrix contains t...
SmartPtr< DenseGenMatrix > MakeNewDenseGenMatrix() const
Create a new DenseGenMatrix from same MatrixSpace.
virtual void ComputeColAMaxImpl(Vector &cols_norms, bool init) const
Compute the max-norm of the columns in the matrix.
Factorization factorization_
Flag indicating if and which factorization has been applied.
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.
Factorization
Enum for factorization type.
void LUSolveVector(DenseVector &b) const
Method for using a previously computed LU fatorization for a backsolve with a single vector.
const DenseGenMatrixSpace * owner_space_
Number * values_
Array for storing the matrix elements (one columns after each other)
virtual void ComputeRowAMaxImpl(Vector &rows_norms, bool init) const
Compute the max-norm of the rows in the matrix.
void operator=(const DenseGenMatrix &)
Default Assignment Operator.
void Copy(const DenseGenMatrix &M)
Method for copying the content of another matrix into this matrix.
~DenseGenMatrix()
Destructor.
virtual void TransMultVectorImpl(Number alpha, const Vector &x, Number beta, Vector &y) const
Matrix(transpose) vector multiply.
void HighRankUpdateTranspose(Number alpha, const MultiVectorMatrix &V1, const MultiVectorMatrix &V2, Number beta)
Method for adding a high-rank update to this matrix.
void CholeskyBackSolveMatrix(bool trans, Number alpha, DenseGenMatrix &B) const
Method for performing one backsolve with an entire matrix on the right hand side, assuming that the t...
bool ComputeLUFactorInPlace()
Method for computing the LU factorization of an unsymmetric matrix.
void LUSolveMatrix(DenseGenMatrix &B) const
Method for using a previously computed LU factorization for a backsolve with a matrix on the rhs.
Number * Values()
Retrieve the array for storing the matrix elements.
Index * pivot_
Array for storing the pivot sequences if the matrix has been LU-factorized.
virtual void MultVectorImpl(Number alpha, const Vector &x, Number beta, Vector &y) const
Matrix-vector multiply.
bool initialized_
Flag indicating whether the values_ array has been initialized.
virtual bool HasValidNumbersImpl() const
Method for determining if all stored numbers are valid (i.e., no Inf or Nan).
void ScaleColumns(const DenseVector &scal_vec)
Method for scaling the columns of the matrix.
Class for dense symmetric matrices.
Dense Vector Implementation.
Templated class which stores one entry for the CachedResult class.
Class responsible for all message output.
MatrixSpace base class, corresponding to the Matrix base class.
Class for Matrices with few columns that consists of Vectors.
This file contains a base class for all exceptions and a set of macros to help with exceptions.
ipindex Index
Type of all indices of vectors, matrices etc.
EJournalCategory
Category Selection Enum.
EJournalLevel
Print Level Enum.
ipnumber Number
Type of all numbers.