#include <IpSumMatrix.hpp>
For each term in the we store the matrix and a factor.
Public Member Functions | |
void | SetTerm (Index iterm, Number factor, const Matrix &matrix) |
Method for setting term iterm for the sum. | |
void | GetTerm (Index iterm, Number &factor, SmartPtr< const Matrix > &matrix) const |
Method for getting term iterm for the sum. | |
Index | NTerms () const |
Return the number of terms. | |
Constructors / Destructors | |
SumMatrix (const SumMatrixSpace *owner_space) | |
Constructor, taking the owner_space. | |
virtual | ~SumMatrix () |
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). |
SumMatrix | ( | const SumMatrixSpace * | owner_space | ) |
Constructor, taking the owner_space.
~SumMatrix | ( | ) | [virtual] |
Destructor.
Method for getting term iterm for the sum.
Note that counting of terms starts at 0.
References DBG_ASSERT, and SumMatrix::NTerms().
Index NTerms | ( | ) | const |
Return the number of terms.
References SumMatrixSpace::NTerms().
Referenced by SumMatrix::GetTerm(), SumMatrix::HasValidNumbersImpl(), SumMatrix::MultVectorImpl(), SumMatrix::PrintImpl(), SumMatrix::SetTerm(), and SumMatrix::TransMultVectorImpl().
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 DBG_ASSERT, Vector::Dim(), Ipopt::IsValid(), Matrix::NCols(), Matrix::NRows(), SumMatrix::NTerms(), 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).
Implements Matrix.
References DBG_ASSERT, Vector::Dim(), Ipopt::IsValid(), Matrix::NCols(), Matrix::NRows(), SumMatrix::NTerms(), 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).
Reimplemented from Matrix.
References DBG_ASSERT, Matrix::HasValidNumbers(), Ipopt::IsValid(), and SumMatrix::NTerms().
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 Matrix::NCols(), Matrix::NRows(), SumMatrix::NTerms(), Journalist::Printf(), and Journalist::PrintfIndented().