Ipopt Documentation  
 
Loading...
Searching...
No Matches
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// Authors: Carl Laird, Andreas Waechter IBM 2004-08-13
6
7#ifndef __IPZEROMATRIX_HPP__
8#define __IPZEROMATRIX_HPP__
9
10#include "IpUtils.hpp"
11#include "IpMatrix.hpp"
12
13namespace Ipopt
14{
15
18class ZeroMatrix: public Matrix
19{
20public:
23
26 );
27
31
32protected:
35 virtual void MultVectorImpl(
37 const Vector& x,
39 Vector& y
40 ) const;
41
42 virtual void TransMultVectorImpl(
44 const Vector& x,
46 Vector& y
47 ) const;
48
49 virtual void ComputeRowAMaxImpl(
50 Vector& /*rows_norms*/,
51 bool /*init*/
52 ) const
53 { }
54
55 virtual void ComputeColAMaxImpl(
56 Vector& /*cols_norms*/,
57 bool /*init*/
58 ) const
59 { }
60
61 virtual void PrintImpl(
62 const Journalist& jnlst,
65 const std::string& name,
67 const std::string& prefix
68 ) const;
70
71private:
81
83
86 const ZeroMatrix&
87 );
88
91 const ZeroMatrix&
92 );
94};
95
98{
99public:
102
104 Index nrows,
106 )
108 { }
109
112 { }
114
115 virtual Matrix* MakeNew() const
116 {
117 return MakeNewZeroMatrix();
118 }
119
122 {
123 return new ZeroMatrix(this);
124 }
125
126private:
136
138
141 const ZeroMatrixSpace&
142 );
143
146 const ZeroMatrixSpace&
147 );
149};
150} // namespace Ipopt
151#endif
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.
Definition IpMatrix.hpp:327
Matrix Base Class.
Definition IpMatrix.hpp:28
Vector Base Class.
Definition IpVector.hpp:48
Class for matrix space for ZeroMatrix.
virtual Matrix * MakeNew() const
Pure virtual method for creating a new Matrix of the corresponding type.
void operator=(const ZeroMatrixSpace &)
Default Assignment Operator.
ZeroMatrixSpace(const ZeroMatrixSpace &)
Copy Constructor.
ZeroMatrixSpace(Index nrows, Index ncols)
Constructor, given the number of row and columns.
ZeroMatrixSpace()
Default Constructor.
ZeroMatrix * MakeNewZeroMatrix() const
Method for creating a new matrix of this specific type.
virtual ~ZeroMatrixSpace()
Destructor.
Class for Matrices with only zero entries.
virtual void ComputeRowAMaxImpl(Vector &, bool) const
Compute the max-norm of the rows in the matrix.
virtual void TransMultVectorImpl(Number alpha, const Vector &x, Number beta, Vector &y) const
Matrix(transpose) vector multiply.
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.
ZeroMatrix()
Default Constructor.
~ZeroMatrix()
Destructor.
void operator=(const ZeroMatrix &)
Default Assignment Operator.
virtual void MultVectorImpl(Number alpha, const Vector &x, Number beta, Vector &y) const
Matrix-vector multiply.
ZeroMatrix(const ZeroMatrix &)
Copy Constructor.
ZeroMatrix(const MatrixSpace *owner_space)
Constructor, taking the corresponding matrix space.
virtual void ComputeColAMaxImpl(Vector &, bool) const
Compute the max-norm of the columns in the matrix.
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.
Definition IpTypes.hpp:20
EJournalCategory
Category Selection Enum.
EJournalLevel
Print Level Enum.
ipnumber Number
Type of all numbers.
Definition IpTypes.hpp:17