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) {
Number * x
Input: Starting point Output: Optimal solution.
Class responsible for all message output.
MatrixSpace base class, corresponding to the Matrix base class.
This is the matrix space for ScaledMatrix.
ScaledMatrixSpace & operator=(const ScaledMatrixSpace &)
Overloaded Equals Operator.
ScaledMatrixSpace()
Default constructor.
SmartPtr< Vector > column_scaling_
column scaling vector
ScaledMatrix * MakeNewScaledMatrix(bool allocate_unscaled_matrix=false) const
Method for creating a new matrix of this specific type.
SmartPtr< const Vector > RowScaling() const
return the vector for the row scaling
virtual Matrix * MakeNew() const
Overloaded MakeNew method for the MatrixSpace base class.
SmartPtr< Vector > row_scaling_
Row scaling vector.
ScaledMatrixSpace(const ScaledMatrixSpace &)
Copy Constructor.
SmartPtr< const MatrixSpace > unscaled_matrix_space_
unscaled matrix space
~ScaledMatrixSpace()
Destructor.
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
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 &)
Overloaded Equals 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.
Template class for Smart Pointers.
void ObjectChanged()
Objects derived from TaggedObject MUST call this method every time their internal state changes to up...
SmartPtr< const U > ConstPtr(const SmartPtr< U > &smart_ptr)
bool IsValid(const SmartPtr< U > &smart_ptr)
U * GetRawPtr(const SmartPtr< U > &smart_ptr)
EJournalCategory
Category Selection Enum.
int Index
Type of all indices of vectors, matrices etc.
EJournalLevel
Print Level Enum.
double Number
Type of all numbers.