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) {
162 return MakeNewScaledMatrix();
174 return unscaled_matrix_space_;
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.
ScaledMatrix * MakeNewScaledMatrix(bool allocate_unscaled_matrix=false) const
Method for creating a new matrix of this specific type.
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.
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.
double Number
Type of all numbers.
void ObjectChanged()
Objects derived from TaggedObject MUST call this method every time their internal state changes to up...
SmartPtr< const Vector > ColumnScaling() const
return the vector for the column scaling
EJournalLevel
Print Level Enum.
~ScaledMatrixSpace()
Destructor.
This is the matrix space for ScaledMatrix.
Template class for Smart Pointers.
SmartPtr< const Vector > ColumnScaling() const
return the vector for the column scaling
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 MultVectorImpl(Number alpha, const Vector &x, Number beta, Vector &y) const
Matrix-vector multiply.
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.
SmartPtr< const Vector > RowScaling() const
return the vector for the row scaling
MatrixSpace base class, corresponding to the Matrix base class.
SmartPtr< const MatrixSpace > UnscaledMatrixSpace() const
return the matrix space for the unscaled matrix
SmartPtr< const Vector > RowScaling() const
return the vector for the row scaling
virtual void ComputeRowAMaxImpl(Vector &rows_norms, bool init) const
Compute the max-norm of the rows in the matrix.
virtual bool HasValidNumbersImpl() const
Method for determining if all stored numbers are valid (i.e., no Inf or Nan).
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)
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).
virtual void ComputeColAMaxImpl(Vector &cols_norms, bool init) const
Compute the max-norm of the columns in the matrix.
Class responsible for all message output.
SmartPtr< Matrix > nonconst_matrix_
non-const version of the unscaled matrix
SmartPtr< const Matrix > GetUnscaledMatrix() const
Return the unscaled matrix in const form.
~ScaledMatrix()
Destructor.
void SetUnscaledMatrix(const SmartPtr< const Matrix > unscaled_matrix)
Set the unscaled matrix.
SmartPtr< const Matrix > matrix_
const version of the unscaled matrix
EJournalCategory
Category Selection Enum.
SmartPtr< Vector > column_scaling_
column scaling vector
virtual Matrix * MakeNew() const
Overloaded MakeNew method for the MatrixSpace base class.
virtual void TransMultVectorImpl(Number alpha, const Vector &x, Number beta, Vector &y) const
Matrix(transpose) vector multiply.