Ipopt Documentation  
IpZeroSymMatrix.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 // Authors: Carl Laird, Andreas Waechter IBM 2004-08-13
6 
7 #ifndef __IPZEROSYMMATRIX_HPP__
8 #define __IPZEROSYMMATRIX_HPP__
9 
10 #include "IpUtils.hpp"
11 #include "IpSymMatrix.hpp"
12 
13 namespace Ipopt
14 {
15 
18 {
19 public:
24  const SymMatrixSpace* owner_space
25  );
26 
30 
31 protected:
34  virtual void MultVectorImpl(
35  Number alpha,
36  const Vector& x,
37  Number beta,
38  Vector& y
39  ) const;
40 
41  virtual void TransMultVectorImpl(
42  Number alpha,
43  const Vector& x,
44  Number beta,
45  Vector& y
46  ) const;
47 
48  virtual void ComputeRowAMaxImpl(
49  Vector& /*rows_norms*/,
50  bool /*init*/
51  ) const
52  { }
53 
54  virtual void ComputeColAMaxImpl(
55  Vector& /*cols_norms*/,
56  bool /*init*/
57  ) const
58  { }
59 
60  virtual void PrintImpl(
61  const Journalist& jnlst,
62  EJournalLevel level,
63  EJournalCategory category,
64  const std::string& name,
65  Index indent,
66  const std::string& prefix
67  ) const;
69 
70 private:
82 
85  const ZeroSymMatrix&
86  );
87 
89  void operator=(
90  const ZeroSymMatrix&
91  );
93 };
94 
97 {
98 public:
103  Index dim
104  )
105  : SymMatrixSpace(dim)
106  { }
107 
110  { }
112 
113  virtual Matrix* MakeNew() const
114  {
115  return MakeNewZeroSymMatrix();
116  }
117 
118  virtual SymMatrix* MakeNewSymMatrix() const
119  {
120  return MakeNewZeroSymMatrix();
121  }
122 
125  {
126  return new ZeroSymMatrix(this);
127  }
128 
129 private:
141 
144  const ZeroSymMatrixSpace&
145  );
146 
148  void operator=(
149  const ZeroSymMatrixSpace&
150  );
152 };
153 
154 } // namespace Ipopt
155 #endif
IpUtils.hpp
Ipopt::ZeroSymMatrixSpace::MakeNewZeroSymMatrix
ZeroSymMatrix * MakeNewZeroSymMatrix() const
Method for creating a new matrix of this specific type.
Definition: IpZeroSymMatrix.hpp:124
Ipopt::ZeroSymMatrixSpace
Class for matrix space for ZeroSymMatrix.
Definition: IpZeroSymMatrix.hpp:97
Ipopt::ZeroSymMatrix
Class for Symmetric Matrices with only zero entries.
Definition: IpZeroSymMatrix.hpp:18
Ipopt
This file contains a base class for all exceptions and a set of macros to help with exceptions.
Definition: IpInexactAlgBuilder.hpp:14
Ipopt::Number
double Number
Type of all numbers.
Definition: IpTypes.hpp:15
Ipopt::Matrix
Matrix Base Class.
Definition: IpMatrix.hpp:28
Ipopt::ZeroSymMatrix::~ZeroSymMatrix
~ZeroSymMatrix()
Destructor.
Ipopt::ZeroSymMatrix::ZeroSymMatrix
ZeroSymMatrix(const ZeroSymMatrix &)
Copy Constructor.
Ipopt::EJournalLevel
EJournalLevel
Print Level Enum.
Definition: IpJournalist.hpp:32
IPOPTLIB_EXPORT
#define IPOPTLIB_EXPORT
Definition: config_default.h:16
Ipopt::ZeroSymMatrixSpace::MakeNewSymMatrix
virtual SymMatrix * MakeNewSymMatrix() const
Pure virtual method for creating a new matrix of this specific type.
Definition: IpZeroSymMatrix.hpp:118
Ipopt::ZeroSymMatrixSpace::MakeNew
virtual Matrix * MakeNew() const
Pure virtual method for creating a new Matrix of the corresponding type.
Definition: IpZeroSymMatrix.hpp:113
Ipopt::Index
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:17
Ipopt::ZeroSymMatrix::MultVectorImpl
virtual void MultVectorImpl(Number alpha, const Vector &x, Number beta, Vector &y) const
Matrix-vector multiply.
Ipopt::EJournalCategory
EJournalCategory
Category Selection Enum.
Definition: IpJournalist.hpp:52
Ipopt::ZeroSymMatrixSpace::ZeroSymMatrixSpace
ZeroSymMatrixSpace(Index dim)
Constructor, given the number of row and columns.
Definition: IpZeroSymMatrix.hpp:102
Ipopt::ZeroSymMatrix::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.
IpSymMatrix.hpp
Ipopt::ZeroSymMatrix::ZeroSymMatrix
ZeroSymMatrix()
Default Constructor.
Ipopt::Journalist
Class responsible for all message output.
Definition: IpJournalist.hpp:117
Ipopt::ZeroSymMatrix::operator=
void operator=(const ZeroSymMatrix &)
Default Assignment Operator.
Ipopt::ZeroSymMatrix::ComputeRowAMaxImpl
virtual void ComputeRowAMaxImpl(Vector &, bool) const
Compute the max-norm of the rows in the matrix.
Definition: IpZeroSymMatrix.hpp:48
Ipopt::SymMatrix
This is the base class for all derived symmetric matrix types.
Definition: IpSymMatrix.hpp:21
Ipopt::ZeroSymMatrix::TransMultVectorImpl
virtual void TransMultVectorImpl(Number alpha, const Vector &x, Number beta, Vector &y) const
Implementation of TransMultVectorImpl, which calls MultVectorImpl.
Ipopt::SymMatrixSpace
SymMatrixSpace base class, corresponding to the SymMatrix base class.
Definition: IpSymMatrix.hpp:86
Ipopt::ZeroSymMatrixSpace::ZeroSymMatrixSpace
ZeroSymMatrixSpace(const ZeroSymMatrixSpace &)
Copy Constructor.
Ipopt::ZeroSymMatrixSpace::~ZeroSymMatrixSpace
virtual ~ZeroSymMatrixSpace()
Destructor.
Definition: IpZeroSymMatrix.hpp:109
Ipopt::ZeroSymMatrixSpace::operator=
void operator=(const ZeroSymMatrixSpace &)
Default Assignment Operator.
Ipopt::ZeroSymMatrix::ZeroSymMatrix
ZeroSymMatrix(const SymMatrixSpace *owner_space)
Constructor, taking the corresponding matrix space.
Ipopt::ZeroSymMatrix::ComputeColAMaxImpl
virtual void ComputeColAMaxImpl(Vector &, bool) const
Implementation of ComputeColAMaxImpl, which calls ComputeRowAMaxImpl.
Definition: IpZeroSymMatrix.hpp:54
Ipopt::ZeroSymMatrixSpace::ZeroSymMatrixSpace
ZeroSymMatrixSpace()
Default Constructor.
Ipopt::Vector
Vector Base Class.
Definition: IpVector.hpp:48