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