#include <IpScaledMatrix.hpp>
Operations on the matrix are performed using the scaled matrix. You can pull out the pointer to the unscaled matrix for unscaled calculations.
Public Member Functions | |
void | SetUnscaledMatrix (const SmartPtr< const Matrix > unscaled_matrix) |
Set the unscaled matrix. | |
void | SetUnscaledMatrixNonConst (const SmartPtr< Matrix > &unscaled_matrix) |
Set the unscaled matrix in a non-const version. | |
SmartPtr< const Matrix > | GetUnscaledMatrix () const |
Return the unscaled matrix in const form. | |
SmartPtr< Matrix > | GetUnscaledMatrixNonConst () |
Return the unscaled matrix in non-const form. | |
SmartPtr< const Vector > | RowScaling () const |
return the vector for the row scaling | |
SmartPtr< const Vector > | ColumnScaling () const |
return the vector for the column scaling | |
Constructors / Destructors | |
ScaledMatrix (const ScaledMatrixSpace *owner_space) | |
Constructor, taking the owner_space. | |
~ScaledMatrix () | |
Destructor. | |
Protected Member Functions | |
Methods overloaded from Matrix | |
virtual void | MultVectorImpl (Number alpha, const Vector &x, Number beta, Vector &y) 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 |
Method for determining if all stored numbers are valid (i.e., no Inf or Nan). | |
virtual bool | HasValidNumbersImpl () const |
Method for determining if all stored numbers are valid (i.e., no Inf or Nan). | |
virtual void | PrintImpl (const Journalist &jnlst, EJournalLevel level, EJournalCategory category, const std::string &name, Index indent, const std::string &prefix) const |
Method for determining if all stored numbers are valid (i.e., no Inf or Nan). | |
virtual void | AddMSinvZImpl (Number alpha, const Vector &S, const Vector &Z, Vector &X) const |
X = beta*X + alpha*(Matrix S^{-1} Z). | |
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 ScaledMatrixSpace * | owner_space | ) |
Constructor, taking the owner_space.
~ScaledMatrix | ( | ) |
Destructor.
Set the unscaled matrix in a non-const version.
References Ipopt::GetRawPtr(), and TaggedObject::ObjectChanged().
Referenced by ScaledMatrixSpace::MakeNewScaledMatrix().
Return the unscaled matrix in non-const form.
References DBG_ASSERT, Ipopt::IsValid(), and TaggedObject::ObjectChanged().
void MultVectorImpl | ( | Number | alpha, | |
const Vector & | x, | |||
Number | beta, | |||
Vector & | y | |||
) | const [protected, virtual] |
Method for determining if all stored numbers are valid (i.e., no Inf or Nan).
It is assumed that the scaling factors are valid.
Implements Matrix.
References Vector::Axpy(), DBG_ASSERT, Ipopt::IsValid(), Vector::MakeNew(), Vector::MakeNewCopy(), Vector::Scal(), and Vector::Set().
void TransMultVectorImpl | ( | Number | alpha, | |
const Vector & | x, | |||
Number | beta, | |||
Vector & | y | |||
) | const [protected, virtual] |
Method for determining if all stored numbers are valid (i.e., no Inf or Nan).
It is assumed that the scaling factors are valid.
Implements Matrix.
References Vector::Axpy(), DBG_ASSERT, Ipopt::IsValid(), Vector::MakeNew(), Vector::MakeNewCopy(), Vector::Scal(), and Vector::Set().
bool HasValidNumbersImpl | ( | ) | const [protected, virtual] |
Method for determining if all stored numbers are valid (i.e., no Inf or Nan).
It is assumed that the scaling factors are valid.
Reimplemented from Matrix.
References DBG_ASSERT, and Ipopt::IsValid().
void PrintImpl | ( | const Journalist & | jnlst, | |
EJournalLevel | level, | |||
EJournalCategory | category, | |||
const std::string & | name, | |||
Index | indent, | |||
const std::string & | prefix | |||
) | const [protected, virtual] |
Method for determining if all stored numbers are valid (i.e., no Inf or Nan).
It is assumed that the scaling factors are valid.
Implements Matrix.
References Ipopt::IsValid(), Matrix::NCols(), Matrix::NRows(), Journalist::Printf(), and Journalist::PrintfIndented().
void AddMSinvZImpl | ( | Number | alpha, | |
const Vector & | S, | |||
const Vector & | Z, | |||
Vector & | X | |||
) | const [protected, virtual] |
X = beta*X + alpha*(Matrix S^{-1} Z).
Specialized implementation missing so far!
Reimplemented from Matrix.
References DBG_ASSERT, Vector::MakeNew(), and Matrix::MultVector().
void SinvBlrmZMTdBrImpl | ( | Number | alpha, | |
const Vector & | S, | |||
const Vector & | R, | |||
const Vector & | Z, | |||
const Vector & | D, | |||
Vector & | X | |||
) | const [protected, virtual] |
X = S^{-1} (r + alpha*Z*M^Td).
Specialized implementation missing so far!
Reimplemented from Matrix.
References Vector::Axpy(), DBG_ASSERT, Vector::ElementWiseDivide(), Vector::ElementWiseMultiply(), and Matrix::TransMultVector().