7#ifndef __IPSCALEDMATRIX_HPP__
8#define __IPSCALEDMATRIX_HPP__
17class ScaledMatrixSpace;
42 void SetUnscaledMatrix(
47 void SetUnscaledMatrixNonConst(
96 const std::string&
name,
194 return MakeNewScaledMatrix();
206 return unscaled_matrix_space_;
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.
This is the matrix space for ScaledMatrix.
SmartPtr< const Vector > RowScaling() const
return the vector for the row scaling
ScaledMatrixSpace()
Default constructor.
SmartPtr< Vector > column_scaling_
column scaling vector
SmartPtr< const Vector > ColumnScaling() const
return the vector for the column scaling
SmartPtr< const MatrixSpace > UnscaledMatrixSpace() const
return the matrix space for the unscaled matrix
SmartPtr< Vector > row_scaling_
Row scaling vector.
ScaledMatrix * MakeNewScaledMatrix(bool allocate_unscaled_matrix=false) const
Method for creating a new matrix of this specific type.
ScaledMatrixSpace(const ScaledMatrixSpace &)
Copy Constructor.
SmartPtr< const MatrixSpace > unscaled_matrix_space_
unscaled matrix space
virtual Matrix * MakeNew() const
Pure virtual method for creating a new Matrix of the corresponding type.
~ScaledMatrixSpace()
Destructor.
ScaledMatrixSpace & operator=(const ScaledMatrixSpace &)
Default Assignment Operator.
ScaledMatrixSpace(const SmartPtr< const Vector > &row_scaling, bool row_scaling_reciprocal, const SmartPtr< const MatrixSpace > &unscaled_matrix_space, const SmartPtr< const Vector > &column_scaling, bool column_scaling_reciprocal)
Constructor, given the number of row and columns blocks, as well as the totel number of rows and colu...
Class for a Matrix in conjunction with its scaling factors for row and column scaling.
SmartPtr< const Vector > ColumnScaling() const
return the vector for the column scaling
void SetUnscaledMatrixNonConst(const SmartPtr< Matrix > &unscaled_matrix)
Set the unscaled matrix in a non-const version.
virtual void ComputeRowAMaxImpl(Vector &rows_norms, bool init) const
Compute the max-norm of the rows in the matrix.
ScaledMatrix(const ScaledMatrixSpace *owner_space)
Constructor, taking the owner_space.
SmartPtr< Matrix > GetUnscaledMatrixNonConst()
Return the unscaled matrix in non-const form.
virtual void ComputeColAMaxImpl(Vector &cols_norms, bool init) const
Compute the max-norm of the columns in the matrix.
void operator=(const ScaledMatrix &)
Default Assignment Operator.
SmartPtr< const Matrix > GetUnscaledMatrix() const
Return the unscaled matrix in const form.
virtual void SinvBlrmZMTdBrImpl(Number alpha, const Vector &S, const Vector &R, const Vector &Z, const Vector &D, Vector &X) const
X = S^{-1} (r + alpha*Z*M^Td).
ScaledMatrix(const ScaledMatrix &)
Copy Constructor.
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.
SmartPtr< const Vector > RowScaling() const
return the vector for the row scaling
~ScaledMatrix()
Destructor.
virtual void MultVectorImpl(Number alpha, const Vector &x, Number beta, Vector &y) const
Matrix-vector multiply.
SmartPtr< Matrix > nonconst_matrix_
non-const version of the unscaled matrix
virtual bool HasValidNumbersImpl() const
Method for determining if all stored numbers are valid (i.e., no Inf or Nan).
ScaledMatrix()
Default Constructor.
virtual void TransMultVectorImpl(Number alpha, const Vector &x, Number beta, Vector &y) const
Matrix(transpose) vector multiply.
virtual void AddMSinvZImpl(Number alpha, const Vector &S, const Vector &Z, Vector &X) const
X = beta*X + alpha*(Matrix S^{-1} Z).
void SetUnscaledMatrix(const SmartPtr< const Matrix > unscaled_matrix)
Set the unscaled matrix.
SmartPtr< const Matrix > matrix_
const version of the unscaled matrix
SmartPtr< const ScaledMatrixSpace > owner_space_
Matrix space stored as a ScaledMatrixSpace.
void ObjectChanged()
Objects derived from TaggedObject MUST call this method every time their internal state changes to up...
This file contains a base class for all exceptions and a set of macros to help with exceptions.
SmartPtr< const U > ConstPtr(const SmartPtr< U > &smart_ptr)
bool IsValid(const SmartPtr< U > &smart_ptr)
U * GetRawPtr(const SmartPtr< U > &smart_ptr)
ipindex Index
Type of all indices of vectors, matrices etc.
EJournalCategory
Category Selection Enum.
EJournalLevel
Print Level Enum.
ipnumber Number
Type of all numbers.