MultiVectorMatrix Class Reference

#include <IpMultiVectorMatrix.hpp>

Inheritance diagram for MultiVectorMatrix:

Matrix TaggedObject ReferencedObject Subject

List of all members.


Detailed Description

Class for Matrices with few columns that consists of Vectors.

Those matrices are for example useful in the implementation of limited memory quasi-Newton methods.

Public Member Functions

SmartPtr< MultiVectorMatrixMakeNewMultiVectorMatrix () const
 Create a new MultiVectorMatrix from same MatrixSpace.
SmartPtr< const VectorGetVector (Index i) const
 Get a Vector in a particular column as a const Vector.
SmartPtr< VectorGetVectorNonConst (Index i)
 Get a Vector in a particular column as a non-const Vector.
void ScaleRows (const Vector &scal_vec)
 Method for scaling the rows of the matrix, using the ElementWiseMultiply method for each column vector.
void ScaleColumns (const Vector &scal_vec)
 Method for scaling the columns of the matrix, using the Scal method for each column vector.
void AddOneMultiVectorMatrix (Number a, const MultiVectorMatrix &mv1, Number c)
 Adding another MultiVectorMatrix, using the AddOneVector methods for the individual column vectors.
void AddRightMultMatrix (Number a, const MultiVectorMatrix &U, const Matrix &C, Number b)
 Multiplying a Matrix C (for now assumed to be a DenseGenMatrix) from the right to a MultiVectorMatrix U and adding the result to this MultiVectorMatrix V.
void FillWithNewVectors ()
 Method for initializing all Vectors with new (uninitialized) Vectors.
void LRMultVector (Number alpha, const Vector &x, Number beta, Vector &y) const
 Method for adding the low-rank update matrix corresponding to this matrix to a vector.
SmartPtr< const VectorSpaceColVectorSpace () const
 Vector space for the columns.
SmartPtr< const
MultiVectorMatrixSpace
MultiVectorMatrixOwnerSpace () const
 Return the MultiVectorMatrixSpace.
Constructors / Destructors
 MultiVectorMatrix (const MultiVectorMatrixSpace *owner_space)
 Constructor, taking the owner_space.
 ~MultiVectorMatrix ()
 Destructor.
void SetVector (Index i, const Vector &vec)
 Set a particular Vector at a given column position, replacing another vector if there has been one.
void SetVectorNonConst (Index i, Vector &vec)
 Set a particular Vector at a given column position, replacing another vector if there has been one.

Protected Member Functions

Overloaded methods from Matrix base class
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).


Constructor & Destructor Documentation

MultiVectorMatrix ( const MultiVectorMatrixSpace owner_space  ) 

Constructor, taking the owner_space.

~MultiVectorMatrix (  )  [inline]

Destructor.


Member Function Documentation

SmartPtr< MultiVectorMatrix > MakeNewMultiVectorMatrix (  )  const [inline]

void SetVector ( Index  i,
const Vector vec 
)

Set a particular Vector at a given column position, replacing another vector if there has been one.

Depending on whether the Vector is const or not, it is stored in the const or non-const internal column.

References DBG_ASSERT, Matrix::NCols(), and TaggedObject::ObjectChanged().

void SetVectorNonConst ( Index  i,
Vector vec 
)

Set a particular Vector at a given column position, replacing another vector if there has been one.

Depending on whether the Vector is const or not, it is stored in the const or non-const internal column.

References DBG_ASSERT, Matrix::NCols(), and TaggedObject::ObjectChanged().

SmartPtr<const Vector> GetVector ( Index  i  )  const [inline]

SmartPtr<Vector> GetVectorNonConst ( Index  i  )  [inline]

Get a Vector in a particular column as a non-const Vector.

This is fail if the column has currently only a non-const Vector stored.

References TaggedObject::ObjectChanged().

void ScaleRows ( const Vector scal_vec  ) 

Method for scaling the rows of the matrix, using the ElementWiseMultiply method for each column vector.

References DBG_ASSERT, Vector::Dim(), Vector::ElementWiseMultiply(), fkinkryx::i, Matrix::NCols(), Matrix::NRows(), and TaggedObject::ObjectChanged().

void ScaleColumns ( const Vector scal_vec  ) 

Method for scaling the columns of the matrix, using the Scal method for each column vector.

References DBG_ASSERT, Vector::Dim(), fkinkryx::i, Matrix::NCols(), TaggedObject::ObjectChanged(), and Vector::Scal().

void AddOneMultiVectorMatrix ( Number  a,
const MultiVectorMatrix mv1,
Number  c 
)

void AddRightMultMatrix ( Number  a,
const MultiVectorMatrix U,
const Matrix C,
Number  b 
)

Multiplying a Matrix C (for now assumed to be a DenseGenMatrix) from the right to a MultiVectorMatrix U and adding the result to this MultiVectorMatrix V.

V = a * U * C + b * V.

References DBG_ASSERT, MultiVectorMatrix::FillWithNewVectors(), fkinkryx::i, Matrix::MultVector(), Matrix::NCols(), Matrix::NRows(), TaggedObject::ObjectChanged(), and DenseGenMatrix::Values().

void FillWithNewVectors (  ) 

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

Method for adding the low-rank update matrix corresponding to this matrix to a vector.

If V is this MultiVectorMatrix, the operation is y = beta*y + alpha*V*V^T*x.

References Vector::AddOneVector(), DBG_ASSERT, DBG_PRINT, DBG_PRINT_VECTOR, DBG_START_METH, Vector::Dim(), fkinkryx::i, Matrix::NCols(), Matrix::NRows(), Vector::Scal(), and Vector::Set().

SmartPtr< const VectorSpace > ColVectorSpace (  )  const [inline]

Vector space for the columns.

References MultiVectorMatrixSpace::ColVectorSpace().

SmartPtr< const MultiVectorMatrixSpace > MultiVectorMatrixOwnerSpace (  )  const [inline]

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

Implements Matrix.

References Vector::AddOneVector(), DBG_ASSERT, Vector::Dim(), fkinkryx::i, DenseVector::IsHomogeneous(), Matrix::NCols(), Matrix::NRows(), Vector::Scal(), DenseVector::Scalar(), Vector::Set(), and DenseVector::Values().

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

Implements Matrix.

References DBG_ASSERT, Vector::Dim(), Vector::Dot(), fkinkryx::i, Matrix::NCols(), and Matrix::NRows().

bool HasValidNumbersImpl (  )  const [protected, virtual]

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

Reimplemented from Matrix.

References Vector::HasValidNumbers(), fkinkryx::i, and Matrix::NCols().

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

Implements Matrix.

References DBG_ASSERT, fkinkryx::i, Matrix::NCols(), Vector::Print(), Journalist::Printf(), and Journalist::PrintfIndented().


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