9 #ifndef __IPMATRIX_HPP__
10 #define __IPMATRIX_HPP__
111 if (init) rows_norms.
Set(0.);
120 if (init) cols_norms.
Set(0.);
132 const std::string& name,
134 const std::string& prefix=
"")
const;
138 const std::string& name,
140 const std::string& prefix=
"")
const;
197 const std::string& name,
199 const std::string& prefix)
const =0;
330 #if COIN_IPOPT_VERBOSITY == 0
331 # define DBG_PRINT_MATRIX(__verbose_level, __mat_name, __mat)
333 # define DBG_PRINT_MATRIX(__verbose_level, __mat_name, __mat) \
334 if (dbg_jrnl.Verbosity() >= (__verbose_level)) { \
335 if (dbg_jrnl.Jnlst()!=NULL) { \
336 (__mat).Print(dbg_jrnl.Jnlst(), \
339 dbg_jrnl.IndentationLevel()*2, \
343 #endif // #if COIN_IPOPT_VERBOSITY == 0
Number * x
Input: Starting point Output: Optimal solution.
const SmartPtr< const MatrixSpace > owner_space_
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 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 ~MatrixSpace()
Destructor.
Matrix(const MatrixSpace *owner_space)
Constructor.
virtual void ComputeRowAMaxImpl(Vector &rows_norms, bool init) const =0
Compute the max-norm of the rows in the matrix.
MatrixSpace(Index nRows, Index nCols)
Constructor, given the number rows and columns of all matrices generated by this MatrixSpace.
const Index nRows_
Number of rows for all matrices of this type.
Index NRows() const
Accessor function for the number of rows.
double Number
Type of all numbers.
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).
Index NRows() const
Number of rows.
virtual bool HasValidNumbersImpl() const
Method for determining if all stored numbers are valid (i.e., no Inf or Nan).
EJournalLevel
Print Level Enum.
SmartPtr< const MatrixSpace > OwnerSpace() const
Return the owner MatrixSpace.
virtual void ComputeColAMaxImpl(Vector &cols_norms, bool init) const =0
Compute the max-norm of the columns in the matrix.
Template class for Smart Pointers.
bool IsMatrixFromSpace(const Matrix &matrix) const
Method to test if a given matrix belongs to a particular matrix space.
void Set(Number alpha)
Set each element in the vector to the scalar alpha.
Matrix & operator=(const Matrix &)
Overloaded Equals Operator.
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).
TaggedObject::Tag valid_cache_tag_
void ComputeRowAMax(Vector &rows_norms, bool init=true) const
Compute the max-norm of the rows in the matrix.
MatrixSpace base class, corresponding to the Matrix base class.
void TransMultVector(Number alpha, const Vector &x, Number beta, Vector &y) const
Matrix(transpose) vector multiply.
int Index
Type of all indices of vectors, matrices etc.
bool HasValidNumbers() 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 =0
Matrix(transpose) vector multiply.
Index NCols() const
Number of columns.
unsigned int Tag
Type for the Tag values.
const Index nCols_
Number of columns for all matrices of this type.
Class responsible for all message output.
void MultVector(Number alpha, const Vector &x, Number beta, Vector &y) const
Matrix-vector multiply.
Matrix()
default constructor
void ComputeColAMax(Vector &cols_norms, bool init=true) const
Compute the max-norm of the columns in the matrix.
Index Dim() const
Dimension of the Vector.
virtual Matrix * MakeNew() const =0
Pure virtual method for creating a new Matrix of the corresponding type.
void AddMSinvZ(Number alpha, const Vector &S, const Vector &Z, Vector &X) const
X = X + alpha*(Matrix S^{-1} Z).
EJournalCategory
Category Selection Enum.
virtual void AddMSinvZImpl(Number alpha, const Vector &S, const Vector &Z, Vector &X) const
X = X + alpha*(Matrix S^{-1} Z).
MatrixSpace()
default constructor
MatrixSpace & operator=(const MatrixSpace &)
Overloaded Equals Operator.
virtual void MultVectorImpl(Number alpha, const Vector &x, Number beta, Vector &y) const =0
Matrix-vector multiply.
Index NCols() const
Accessor function for the number of columns.
virtual ~Matrix()
Destructor.