Go to the documentation of this file.
9 #ifndef __IPSCALEDMATRIX_HPP__
10 #define __IPSCALEDMATRIX_HPP__
19 class ScaledMatrixSpace;
80 const std::string& name,
82 const std::string& prefix)
const;
137 bool row_scaling_reciprocal,
140 bool column_scaling_reciprocal);
151 if (allocate_unscaled_matrix) {
virtual Matrix * MakeNew() const
Overloaded MakeNew method for the MatrixSpace base class.
ScaledMatrix * MakeNewScaledMatrix(bool allocate_unscaled_matrix=false) const
Method for creating a new matrix of this specific type.
SmartPtr< const MatrixSpace > UnscaledMatrixSpace() const
return the matrix space for the unscaled matrix
MatrixSpace base class, corresponding to the Matrix base class.
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 operator=(const ScaledMatrix &)
Overloaded Equals Operator.
SmartPtr< const MatrixSpace > unscaled_matrix_space_
unscaled matrix space
virtual void ComputeRowAMaxImpl(Vector &rows_norms, bool init) const
Compute the max-norm of the rows in the matrix.
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 Matrix > matrix_
const version of the unscaled matrix
SmartPtr< Vector > row_scaling_
Row scaling vector.
double Number
Type of all numbers.
ScaledMatrix(const ScaledMatrix &)
Copy Constructor.
virtual void ComputeColAMaxImpl(Vector &cols_norms, bool init) const
Compute the max-norm of the columns in the matrix.
void SetUnscaledMatrixNonConst(const SmartPtr< Matrix > &unscaled_matrix)
Set the unscaled matrix in a non-const version.
void ObjectChanged()
Objects derived from TaggedObject MUST call this method every time their internal state changes to up...
SmartPtr< Matrix > nonconst_matrix_
non-const version of the unscaled matrix
EJournalLevel
Print Level Enum.
ScaledMatrix(const ScaledMatrixSpace *owner_space)
Constructor, taking the owner_space.
void SetUnscaledMatrix(const SmartPtr< const Matrix > unscaled_matrix)
Set the unscaled matrix.
Number * x
Input: Starting point Output: Optimal solution.
SmartPtr< Matrix > GetUnscaledMatrixNonConst()
Return the unscaled matrix in non-const form.
int Index
Type of all indices of vectors, matrices etc.
U * GetRawPtr(const SmartPtr< U > &smart_ptr)
Template class for Smart Pointers.
SmartPtr< const Vector > ColumnScaling() const
return the vector for the column scaling
virtual void AddMSinvZImpl(Number alpha, const Vector &S, const Vector &Z, Vector &X) const
X = beta*X + alpha*(Matrix S^{-1} Z).
EJournalCategory
Category Selection Enum.
virtual bool HasValidNumbersImpl() const
Method for determining if all stored numbers are valid (i.e., no Inf or Nan).
virtual void TransMultVectorImpl(Number alpha, const Vector &x, Number beta, Vector &y) const
Matrix(transpose) vector multiply.
SmartPtr< const Vector > RowScaling() const
return the vector for the row scaling
virtual void MultVectorImpl(Number alpha, const Vector &x, Number beta, Vector &y) const
Matrix-vector multiply.
ScaledMatrixSpace()
Default constructor.
ScaledMatrix()
Default Constructor.
SmartPtr< const U > ConstPtr(const SmartPtr< U > &smart_ptr)
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).
Class responsible for all message output.
This is the matrix space for ScaledMatrix.
~ScaledMatrixSpace()
Destructor.
~ScaledMatrix()
Destructor.
ScaledMatrixSpace & operator=(const ScaledMatrixSpace &)
Overloaded Equals Operator.
ScaledMatrixSpace(const ScaledMatrixSpace &)
Copy Constructor.
SmartPtr< const ScaledMatrixSpace > owner_space_
Matrix space stored as a ScaledMatrixSpace.
bool IsValid(const SmartPtr< U > &smart_ptr)
SmartPtr< Vector > column_scaling_
column scaling vector
SmartPtr< const Matrix > GetUnscaledMatrix() const
Return the unscaled matrix in const form.
SmartPtr< const Vector > RowScaling() const
return the vector for the row scaling