ScaledMatrix Class Reference

#include <IpScaledMatrix.hpp>

Inheritance diagram for ScaledMatrix:

Matrix TaggedObject ReferencedObject Subject

List of all members.


Detailed Description

Class for a Matrix in conjunction with its scaling factors for row and column scaling.

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 MatrixGetUnscaledMatrix () const
 Return the unscaled matrix in const form.
SmartPtr< MatrixGetUnscaledMatrixNonConst ()
 Return the unscaled matrix in non-const form.
SmartPtr< const VectorRowScaling () const
 return the vector for the row scaling
SmartPtr< const VectorColumnScaling () 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).


Constructor & Destructor Documentation

ScaledMatrix ( const ScaledMatrixSpace owner_space  ) 

Constructor, taking the owner_space.

~ScaledMatrix (  ) 

Destructor.


Member Function Documentation

void SetUnscaledMatrix ( const SmartPtr< const Matrix unscaled_matrix  )  [inline]

Set the unscaled matrix.

References TaggedObject::ObjectChanged().

void SetUnscaledMatrixNonConst ( const SmartPtr< Matrix > &  unscaled_matrix  )  [inline]

Set the unscaled matrix in a non-const version.

References Ipopt::GetRawPtr(), and TaggedObject::ObjectChanged().

Referenced by ScaledMatrixSpace::MakeNewScaledMatrix().

SmartPtr< const Matrix > GetUnscaledMatrix (  )  const [inline]

Return the unscaled matrix in const form.

Referenced by TripletHelper::GetNumberEntries().

SmartPtr< Matrix > GetUnscaledMatrixNonConst (  )  [inline]

Return the unscaled matrix in non-const form.

References DBG_ASSERT, Ipopt::IsValid(), and TaggedObject::ObjectChanged().

SmartPtr< const Vector > RowScaling (  )  const [inline]

return the vector for the row scaling

References Ipopt::ConstPtr().

SmartPtr< const Vector > ColumnScaling (  )  const [inline]

return the vector for the column scaling

References Ipopt::ConstPtr().

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().


The documentation for this class was generated from the following files:

Generated on Fri Sep 26 07:44:27 2008 for SimTKcore by  doxygen 1.5.6