Ipopt  3.11.9
IpZeroMatrix.hpp
Go to the documentation of this file.
1 // Copyright (C) 2004, 2008 International Business Machines and others.
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // $Id: IpZeroMatrix.hpp 1861 2010-12-21 21:34:47Z andreasw $
6 //
7 // Authors: Carl Laird, Andreas Waechter IBM 2004-08-13
8 
9 #ifndef __IPZEROMATRIX_HPP__
10 #define __IPZEROMATRIX_HPP__
11 
12 #include "IpUtils.hpp"
13 #include "IpMatrix.hpp"
14 
15 namespace Ipopt
16 {
17 
20  class ZeroMatrix : public Matrix
21  {
22  public:
23 
26 
29  ZeroMatrix(const MatrixSpace* owner_space);
30 
34 
35  protected:
38  virtual void MultVectorImpl(Number alpha, const Vector& x,
39  Number beta, Vector& y) const;
40 
41  virtual void TransMultVectorImpl(Number alpha, const Vector& x,
42  Number beta, Vector& y) const;
43 
44  virtual void ComputeRowAMaxImpl(Vector& rows_norms, bool init) const
45  {}
46 
47  virtual void ComputeColAMaxImpl(Vector& cols_norms, bool init) const
48  {}
49 
50  virtual void PrintImpl(const Journalist& jnlst,
51  EJournalLevel level,
52  EJournalCategory category,
53  const std::string& name,
54  Index indent,
55  const std::string& prefix) const;
57 
58  private:
69 
72 
74  void operator=(const ZeroMatrix&);
76  };
77 
80  {
81  public:
86  ZeroMatrixSpace(Index nrows, Index ncols)
87  :
88  MatrixSpace(nrows, ncols)
89  {}
90 
92  virtual ~ZeroMatrixSpace()
93  {}
95 
98  virtual Matrix* MakeNew() const
99  {
100  return MakeNewZeroMatrix();
101  }
102 
105  {
106  return new ZeroMatrix(this);
107  }
108  private:
119 
122 
126  };
127 } // namespace Ipopt
128 #endif
IpUtils.hpp
Ipopt::MatrixSpace
MatrixSpace base class, corresponding to the Matrix base class.
Definition: IpMatrix.hpp:240
Ipopt::ZeroMatrixSpace::ZeroMatrixSpace
ZeroMatrixSpace()
Default Constructor.
Ipopt::ZeroMatrixSpace::ZeroMatrixSpace
ZeroMatrixSpace(const ZeroMatrixSpace &)
Copy Constructor.
Ipopt::ZeroMatrix::operator=
void operator=(const ZeroMatrix &)
Overloaded Equals Operator.
Ipopt::ZeroMatrix::ComputeRowAMaxImpl
virtual void ComputeRowAMaxImpl(Vector &rows_norms, bool init) const
Compute the max-norm of the rows in the matrix.
Definition: IpZeroMatrix.hpp:44
Ipopt
Definition: matlabjournal.hpp:14
Ipopt::Number
double Number
Type of all numbers.
Definition: IpTypes.hpp:17
Ipopt::Matrix
Matrix Base Class.
Definition: IpMatrix.hpp:28
Ipopt::EJournalLevel
EJournalLevel
Print Level Enum.
Definition: IpJournalist.hpp:51
x
Number * x
Input: Starting point Output: Optimal solution.
Definition: IpStdCInterface.h:238
Ipopt::Index
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:19
Ipopt::ZeroMatrix::TransMultVectorImpl
virtual void TransMultVectorImpl(Number alpha, const Vector &x, Number beta, Vector &y) const
Matrix(transpose) vector multiply.
Ipopt::ZeroMatrix
Class for Matrices with only zero entries.
Definition: IpZeroMatrix.hpp:21
Ipopt::ZeroMatrix::PrintImpl
virtual void PrintImpl(const Journalist &jnlst, EJournalLevel level, EJournalCategory category, const std::string &name, Index indent, const std::string &prefix) const
Print detailed information about the matrix.
Ipopt::EJournalCategory
EJournalCategory
Category Selection Enum.
Definition: IpJournalist.hpp:70
Ipopt::ZeroMatrix::ComputeColAMaxImpl
virtual void ComputeColAMaxImpl(Vector &cols_norms, bool init) const
Compute the max-norm of the columns in the matrix.
Definition: IpZeroMatrix.hpp:47
Ipopt::ZeroMatrix::ZeroMatrix
ZeroMatrix(const MatrixSpace *owner_space)
Constructor, taking the corresponding matrix space.
Ipopt::ZeroMatrix::ZeroMatrix
ZeroMatrix(const ZeroMatrix &)
Copy Constructor.
Ipopt::ZeroMatrixSpace::ZeroMatrixSpace
ZeroMatrixSpace(Index nrows, Index ncols)
Constructor, given the number of row and columns.
Definition: IpZeroMatrix.hpp:86
Ipopt::ZeroMatrixSpace::MakeNew
virtual Matrix * MakeNew() const
Overloaded MakeNew method for the MatrixSpace base class.
Definition: IpZeroMatrix.hpp:98
Ipopt::ZeroMatrix::ZeroMatrix
ZeroMatrix()
Default Constructor.
Ipopt::Journalist
Class responsible for all message output.
Definition: IpJournalist.hpp:135
Ipopt::ZeroMatrixSpace::MakeNewZeroMatrix
ZeroMatrix * MakeNewZeroMatrix() const
Method for creating a new matrix of this specific type.
Definition: IpZeroMatrix.hpp:104
Ipopt::ZeroMatrix::MultVectorImpl
virtual void MultVectorImpl(Number alpha, const Vector &x, Number beta, Vector &y) const
Matrix-vector multiply.
IpMatrix.hpp
Ipopt::ZeroMatrixSpace::operator=
void operator=(const ZeroMatrixSpace &)
Overloaded Equals Operator.
Ipopt::ZeroMatrixSpace::~ZeroMatrixSpace
virtual ~ZeroMatrixSpace()
Destructor.
Definition: IpZeroMatrix.hpp:92
Ipopt::ZeroMatrixSpace
Class for matrix space for ZeroMatrix.
Definition: IpZeroMatrix.hpp:80
Ipopt::ZeroMatrix::~ZeroMatrix
~ZeroMatrix()
Destructor.
Ipopt::Vector
Vector Base Class.
Definition: IpVector.hpp:48