Go to the documentation of this file.
7 #ifndef __IPGENTMATRIX_HPP__
8 #define __IPGENTMATRIX_HPP__
17 class GenTMatrixSpace;
66 Index Nonzeros()
const;
69 const Index* Irows()
const;
72 const Index* Jcols()
const;
126 const std::string& name,
128 const std::string& prefix
131 PrintImplOffset(jnlst, level, category, name, indent, prefix, 0);
139 const std::string& name,
141 const std::string& prefix,
145 friend class ParGenMatrix;
226 return MakeNewGenTMatrix();
MatrixSpace base class, corresponding to the Matrix base class.
void operator=(const GenTMatrix &)
Default Assignment Operator.
virtual void TransMultVectorImpl(Number alpha, const Vector &x, Number beta, Vector &y) const
Matrix(transpose) vector multiply.
bool initialized_
Flag for Initialization.
const Index * Irows() const
Array with Row indices (counting starts at 1)
GenTMatrix(const GenTMatrixSpace *owner_space)
Constructor, taking the owner_space.
This file contains a base class for all exceptions and a set of macros to help with exceptions.
double Number
Type of all numbers.
Number * AllocateInternalStorage() const
This method is only for the GenTMatrix to call in order to allocate internal storage.
virtual Matrix * MakeNew() const
Pure virtual method for creating a new Matrix of the corresponding type.
Index Nonzeros() const
Number of non-zeros in the sparse matrix.
EJournalLevel
Print Level Enum.
virtual void ComputeColAMaxImpl(Vector &cols_norms, bool init) const
Compute the max-norm of the columns in the matrix.
GenTMatrixSpace(Index nRows, Index nCols, Index nonZeros, const Index *iRows, const Index *jCols)
Constructor, given the number of rows and columns, as well as the number of nonzeros and the position...
This is the matrix space for a GenTMatrix with fixed sparsity structure.
virtual void MultVectorImpl(Number alpha, const Vector &x, Number beta, Vector &y) const
Matrix-vector multiply.
const Index * Jcols() const
Column index of each non-zero element (counting starts at 1)
int Index
Type of all indices of vectors, matrices etc.
GenTMatrix(const GenTMatrix &)
Copy Constructor.
const GenTMatrixSpace * owner_space_
Copy of the owner space as a GenTMatrixSpace instead of a MatrixSpace.
GenTMatrix * MakeNewGenTMatrix() const
Method for creating a new matrix of this specific type.
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.
EJournalCategory
Category Selection Enum.
void FreeInternalStorage(Number *values) const
This method is only for the GenTMatrix to call in order to de-allocate internal storage.
void SetValues(const Number *Values)
Set values of nonzero elements.
Index Nonzeros() const
Number of nonzero entries.
Class for general matrices stored in triplet format.
Class responsible for all message output.
const Index * Jcols() const
Array with Column indices (counting starts at 1)
void PrintImplOffset(const Journalist &jnlst, EJournalLevel level, EJournalCategory category, const std::string &name, Index indent, const std::string &prefix, Index offset) const
const Number * Values() const
Array with nonzero values (const version).
GenTMatrix()
Default Constructor.
virtual bool HasValidNumbersImpl() const
Method for determining if all stored numbers are valid (i.e., no Inf or Nan).
const Index * Irows() const
Row index of each non-zero element (counting starts at 1)
virtual void ComputeRowAMaxImpl(Vector &rows_norms, bool init) const
Compute the max-norm of the rows in the matrix.
Number * Values()
Array with the nonzero values of this matrix (non-const version).
Number * values_
Values of nonzeros.
~GenTMatrixSpace()
Destructor.