Matrix Class Reference

#include <IpMatrix.hpp>

Inheritance diagram for Matrix:

TaggedObject ReferencedObject Subject CompoundMatrix DenseGenMatrix ExpansionMatrix GenTMatrix MultiVectorMatrix ScaledMatrix SumMatrix SymMatrix ZeroMatrix

List of all members.


Detailed Description

Matrix Base Class.

This is the base class for all derived matrix types. All Matrices, such as Jacobian and Hessian matrices, as well as possibly the iteration matrices needed for the step computation, are of this type.

Deriving from Matrix: Overload the protected XXX_Impl method.

Public Member Functions

bool HasValidNumbers () const
 Method for determining if all stored numbers are valid (i.e., no Inf or Nan).
SmartPtr< const MatrixSpaceOwnerSpace () const
 Return the owner MatrixSpace.
Constructor/Destructor
 Matrix (const MatrixSpace *owner_space)
 Constructor.
virtual ~Matrix ()
 Destructor.
Operations of the Matrix on a Vector
void MultVector (Number alpha, const Vector &x, Number beta, Vector &y) const
 Matrix-vector multiply.
void TransMultVector (Number alpha, const Vector &x, Number beta, Vector &y) const
 Matrix(transpose) vector multiply.
Methods for specialized operations. A prototype
implementation is provided, but for efficient implementation those should be specially implemented.

void AddMSinvZ (Number alpha, const Vector &S, const Vector &Z, Vector &X) const
 X = X + alpha*(Matrix S^{-1} Z).
void SinvBlrmZMTdBr (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).
Index NRows () const
 Number of rows.
Index NCols () const
 Number of columns.
virtual void Print (SmartPtr< const Journalist > jnlst, EJournalLevel level, EJournalCategory category, const std::string &name, Index indent=0, const std::string &prefix="") const
 Print detailed information about the matrix.
virtual void Print (const Journalist &jnlst, EJournalLevel level, EJournalCategory category, const std::string &name, Index indent=0, const std::string &prefix="") const
 Print detailed information about the matrix.

Protected Member Functions

implementation methods (derived classes MUST
overload these pure virtual protected methods.

virtual void MultVectorImpl (Number alpha, const Vector &x, Number beta, Vector &y) const =0
 Matrix-vector multiply.
virtual void TransMultVectorImpl (Number alpha, const Vector &x, Number beta, Vector &y) const =0
 Matrix(transpose) vector multiply.
virtual void AddMSinvZImpl (Number alpha, const Vector &S, const Vector &Z, Vector &X) const
 X = 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).
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 =0
 Print detailed information about the matrix.


Constructor & Destructor Documentation

Matrix ( const MatrixSpace owner_space  )  [inline]

Constructor.

It has to be given a pointer to the corresponding MatrixSpace.

~Matrix (  )  [inline, virtual]

Destructor.


Member Function Documentation

void MultVector ( Number  alpha,
const Vector x,
Number  beta,
Vector y 
) const

void TransMultVector ( Number  alpha,
const Vector x,
Number  beta,
Vector y 
) const

void AddMSinvZ ( Number  alpha,
const Vector S,
const Vector Z,
Vector X 
) const

X = X + alpha*(Matrix S^{-1} Z).

Should be implemented efficiently for the ExansionMatrix

References Matrix::AddMSinvZImpl().

Referenced by CompoundMatrix::AddMSinvZImpl().

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

Should be implemented efficiently for the ExansionMatrix

References Matrix::SinvBlrmZMTdBrImpl().

Referenced by CompoundMatrix::SinvBlrmZMTdBrImpl().

bool HasValidNumbers (  )  const

Index NRows (  )  const [inline]

Number of rows.

Referenced by DenseGenMatrix::AddMatrixProduct(), IdentityMatrix::AddMSinvZImpl(), ExpansionMatrix::AddMSinvZImpl(), MultiVectorMatrix::AddOneMultiVectorMatrix(), MultiVectorMatrix::AddRightMultMatrix(), DenseGenMatrix::CholeskyBackSolveMatrix(), DenseGenMatrix::CholeskySolveMatrix(), DenseGenMatrix::CholeskySolveVector(), DenseGenMatrix::ComputeCholeskyFactor(), DenseGenMatrix::ComputeEigenVectors(), DenseGenMatrix::Copy(), IdentityMatrix::Dim(), DenseGenMatrix::FillIdentity(), DenseGenMatrix::HasValidNumbersImpl(), DenseSymMatrix::HighRankUpdate(), DenseGenMatrix::HighRankUpdateTranspose(), MultiVectorMatrix::LRMultVector(), StdAugSystemSolver::MultiSolve(), ZeroMatrix::MultVectorImpl(), SumMatrix::MultVectorImpl(), MultiVectorMatrix::MultVectorImpl(), IdentityMatrix::MultVectorImpl(), GenTMatrix::MultVectorImpl(), ExpansionMatrix::MultVectorImpl(), DenseSymMatrix::MultVectorImpl(), DenseGenMatrix::MultVectorImpl(), ZeroMatrix::PrintImpl(), SymScaledMatrix::PrintImpl(), SumMatrix::PrintImpl(), ScaledMatrix::PrintImpl(), IdentityMatrix::PrintImpl(), DenseSymMatrix::PrintImpl(), DenseGenMatrix::PrintImpl(), DenseGenMatrix::ScaleColumns(), MultiVectorMatrix::ScaleRows(), ExpansionMatrix::SinvBlrmZMTdBrImpl(), DenseSymMatrix::SpecialAddForLMSR1(), ZeroMatrix::TransMultVectorImpl(), SumMatrix::TransMultVectorImpl(), MultiVectorMatrix::TransMultVectorImpl(), GenTMatrix::TransMultVectorImpl(), ExpansionMatrix::TransMultVectorImpl(), and DenseGenMatrix::TransMultVectorImpl().

Index NCols (  )  const [inline]

Number of columns.

Referenced by DenseGenMatrix::AddMatrixProduct(), IdentityMatrix::AddMSinvZImpl(), ExpansionMatrix::AddMSinvZImpl(), MultiVectorMatrix::AddOneMultiVectorMatrix(), MultiVectorMatrix::AddRightMultMatrix(), DenseGenMatrix::CholeskyBackSolveMatrix(), DenseGenMatrix::CholeskySolveMatrix(), DenseGenMatrix::CholeskySolveVector(), DenseGenMatrix::ComputeCholeskyFactor(), DenseGenMatrix::ComputeEigenVectors(), DenseGenMatrix::Copy(), IdentityMatrix::Dim(), DenseGenMatrix::FillIdentity(), MultiVectorMatrix::FillWithNewVectors(), TNLPAdapter::GetBoundsInformation(), TripletHelper::GetNumberEntries(), MultiVectorMatrix::HasValidNumbersImpl(), DenseGenMatrix::HasValidNumbersImpl(), DenseSymMatrix::HighRankUpdate(), DenseSymMatrix::HighRankUpdateTranspose(), DenseGenMatrix::HighRankUpdateTranspose(), MultiVectorMatrix::LRMultVector(), StdAugSystemSolver::MultiSolve(), ZeroMatrix::MultVectorImpl(), SumMatrix::MultVectorImpl(), MultiVectorMatrix::MultVectorImpl(), IdentityMatrix::MultVectorImpl(), GenTMatrix::MultVectorImpl(), ExpansionMatrix::MultVectorImpl(), DenseSymMatrix::MultVectorImpl(), DenseGenMatrix::MultVectorImpl(), ZeroMatrix::PrintImpl(), SymScaledMatrix::PrintImpl(), SumMatrix::PrintImpl(), ScaledMatrix::PrintImpl(), MultiVectorMatrix::PrintImpl(), IdentityMatrix::PrintImpl(), ExpansionMatrix::PrintImpl(), DenseSymMatrix::PrintImpl(), DenseGenMatrix::PrintImpl(), MultiVectorMatrix::ScaleColumns(), DenseGenMatrix::ScaleColumns(), MultiVectorMatrix::ScaleRows(), MultiVectorMatrix::SetVector(), MultiVectorMatrix::SetVectorNonConst(), ExpansionMatrix::SinvBlrmZMTdBrImpl(), DenseSymMatrix::SpecialAddForLMSR1(), ZeroMatrix::TransMultVectorImpl(), SumMatrix::TransMultVectorImpl(), MultiVectorMatrix::TransMultVectorImpl(), GenTMatrix::TransMultVectorImpl(), ExpansionMatrix::TransMultVectorImpl(), and DenseGenMatrix::TransMultVectorImpl().

void Print ( SmartPtr< const Journalist jnlst,
EJournalLevel  level,
EJournalCategory  category,
const std::string &  name,
Index  indent = 0,
const std::string &  prefix = "" 
) const [virtual]

Print detailed information about the matrix.

Do not overload. Overload PrintImpl instead.

References Ipopt::IsValid(), and Matrix::PrintImpl().

Referenced by CompoundSymMatrix::PrintImpl(), and CompoundMatrix::PrintImpl().

void Print ( const Journalist jnlst,
EJournalLevel  level,
EJournalCategory  category,
const std::string &  name,
Index  indent = 0,
const std::string &  prefix = "" 
) const [virtual]

Print detailed information about the matrix.

Do not overload. Overload PrintImpl instead.

References Matrix::PrintImpl(), and Journalist::ProduceOutput().

SmartPtr< const MatrixSpace > OwnerSpace (  )  const [inline]

virtual void MultVectorImpl ( Number  alpha,
const Vector x,
Number  beta,
Vector y 
) const [protected, pure virtual]

virtual void TransMultVectorImpl ( Number  alpha,
const Vector x,
Number  beta,
Vector y 
) const [protected, pure virtual]

Matrix(transpose) vector multiply.

Computes y = alpha * Matrix^T * x + beta * y

Implemented in CompoundMatrix, DenseGenMatrix, ExpansionMatrix, GenTMatrix, MultiVectorMatrix, ScaledMatrix, SumMatrix, SymMatrix, and ZeroMatrix.

Referenced by Matrix::TransMultVector().

void AddMSinvZImpl ( Number  alpha,
const Vector S,
const Vector Z,
Vector X 
) const [protected, virtual]

X = X + alpha*(Matrix S^{-1} Z).

Prototype for this specialize method is provided, but for efficient implementation it should be overloaded for the expansion matrix.

Reimplemented in CompoundMatrix, ExpansionMatrix, IdentityMatrix, and ScaledMatrix.

References Vector::MakeNew(), and Matrix::MultVector().

Referenced by Matrix::AddMSinvZ(), and ExpansionMatrix::AddMSinvZImpl().

void SinvBlrmZMTdBrImpl ( Number  alpha,
const Vector S,
const Vector R,
const Vector Z,
const Vector D,
Vector X 
) const [protected, virtual]

virtual bool HasValidNumbersImpl (  )  const [inline, protected, virtual]

Method for determining if all stored numbers are valid (i.e., no Inf or Nan).

A default implementation always returning true is provided, but if possible it should be implemented.

Reimplemented in CompoundMatrix, CompoundSymMatrix, DenseGenMatrix, DenseSymMatrix, DiagMatrix, GenTMatrix, IdentityMatrix, LowRankUpdateSymMatrix, MultiVectorMatrix, ScaledMatrix, SumMatrix, SumSymMatrix, SymScaledMatrix, and SymTMatrix.

Referenced by Matrix::HasValidNumbers().

virtual void PrintImpl ( const Journalist jnlst,
EJournalLevel  level,
EJournalCategory  category,
const std::string &  name,
Index  indent,
const std::string &  prefix 
) const [protected, pure virtual]


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

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