#include <IpSumSymMatrix.hpp>
For each term in the we store the matrix and a factor.
Public Member Functions | |
void | SetTerm (Index iterm, Number factor, const SymMatrix &matrix) |
Method for setting term iterm for the sum. | |
void | GetTerm (Index iterm, Number &factor, SmartPtr< const SymMatrix > &matrix) const |
Method for getting term iterm for the sum. | |
Index | NTerms () const |
Return the number of terms. | |
Constructors / Destructors | |
SumSymMatrix (const SumSymMatrixSpace *owner_space) | |
Constructor, initializing with dimensions of the matrix and the number of terms in the sum. | |
~SumSymMatrix () | |
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 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). |
SumSymMatrix | ( | const SumSymMatrixSpace * | owner_space | ) |
Constructor, initializing with dimensions of the matrix and the number of terms in the sum.
~SumSymMatrix | ( | ) |
Destructor.
Method for setting term iterm for the sum.
Note that counting of terms starts at 0.
References DBG_ASSERT, and SumSymMatrix::NTerms().
Method for getting term iterm for the sum.
Note that counting of terms starts at 0.
References DBG_ASSERT, and SumSymMatrix::NTerms().
Index NTerms | ( | ) | const |
Return the number of terms.
References SumSymMatrixSpace::NTerms().
Referenced by SumSymMatrix::GetTerm(), SumSymMatrix::HasValidNumbersImpl(), SumSymMatrix::MultVectorImpl(), SumSymMatrix::PrintImpl(), and SumSymMatrix::SetTerm().
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(), SymMatrix::Dim(), Ipopt::IsValid(), SumSymMatrix::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 SumSymMatrix::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 SymMatrix::Dim(), SumSymMatrix::NTerms(), Journalist::Printf(), and Journalist::PrintfIndented().