7#ifndef __IPMATRIX_HPP__
8#define __IPMATRIX_HPP__
121 inline Index NRows()
const;
124 inline Index NCols()
const;
175 const std::string&
name,
177 const std::string&
prefix =
""
184 const std::string&
name,
186 const std::string&
prefix =
""
278 const std::string&
name,
366 return (
matrix.OwnerSpace() ==
this);
419#if IPOPT_VERBOSITY == 0
420# define DBG_PRINT_MATRIX(__verbose_level, __mat_name, __mat)
422# define DBG_PRINT_MATRIX(__verbose_level, __mat_name, __mat) \
423 if (dbg_jrnl.Verbosity() >= (__verbose_level)) { \
424 if (dbg_jrnl.Jnlst()!=NULL) { \
425 (__mat).Print(dbg_jrnl.Jnlst(), \
428 dbg_jrnl.IndentationLevel()*2, \
Templated class which stores one entry for the CachedResult class.
Class responsible for all message output.
MatrixSpace base class, corresponding to the Matrix base class.
const Index nRows_
Number of rows for all matrices of this type.
MatrixSpace(const MatrixSpace &)
Copy constructor.
virtual ~MatrixSpace()
Destructor.
const Index nCols_
Number of columns for all matrices of this type.
MatrixSpace & operator=(const MatrixSpace &)
Default Assignment Operator.
MatrixSpace(Index nRows, Index nCols)
Constructor, given the number rows and columns of all matrices generated by this MatrixSpace.
Index NCols() const
Accessor function for the number of columns.
bool IsMatrixFromSpace(const Matrix &matrix) const
Method to test if a given matrix belongs to a particular matrix space.
virtual Matrix * MakeNew() const =0
Pure virtual method for creating a new Matrix of the corresponding type.
Index NRows() const
Accessor function for the number of rows.
MatrixSpace()
Default constructor.
void ComputeColAMax(Vector &cols_norms, bool init=true) const
Compute the max-norm of the columns in the matrix.
const SmartPtr< const MatrixSpace > owner_space_
bool HasValidNumbers() const
Method for determining if all stored numbers are valid (i.e., no Inf or Nan).
Matrix & operator=(const Matrix &)
Default Assignment Operator.
Index NRows() const
Number of rows.
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.
void TransMultVector(Number alpha, const Vector &x, Number beta, Vector &y) const
Matrix(transpose) vector multiply.
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.
TaggedObject::Tag valid_cache_tag_
virtual ~Matrix()
Destructor.
SmartPtr< const MatrixSpace > OwnerSpace() const
Return the owner MatrixSpace.
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).
Matrix(const Matrix &)
Copy constructor.
virtual void AddMSinvZImpl(Number alpha, const Vector &S, const Vector &Z, Vector &X) const
X = X + alpha*(Matrix S^{-1} Z).
virtual void ComputeRowAMaxImpl(Vector &rows_norms, bool init) const =0
Compute the max-norm of the rows in the matrix.
Matrix(const MatrixSpace *owner_space)
Constructor.
virtual void Print(const Journalist &jnlst, EJournalLevel level, EJournalCategory category, const std::string &name, Index indent=0, const std::string &prefix="") const
void MultVector(Number alpha, const Vector &x, Number beta, Vector &y) const
Matrix-vector multiply.
Matrix()
Default constructor.
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.
virtual bool HasValidNumbersImpl() const
Method for determining if all stored numbers are valid (i.e., no Inf or Nan).
void ComputeRowAMax(Vector &rows_norms, bool init=true) const
Compute the max-norm of the rows in the matrix.
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 void ComputeColAMaxImpl(Vector &cols_norms, bool init) const =0
Compute the max-norm of the columns in the matrix.
void AddMSinvZ(Number alpha, const Vector &S, const Vector &Z, Vector &X) const
X = X + alpha*(Matrix S^{-1} Z).
Index NCols() const
Number of columns.
Storing the reference count of all the smart pointers that currently reference it.
This file contains a base class for all exceptions and a set of macros to help with exceptions.
ipindex Index
Type of all indices of vectors, matrices etc.
EJournalCategory
Category Selection Enum.
EJournalLevel
Print Level Enum.
ipnumber Number
Type of all numbers.