Ipopt
3.11.4
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
src
LinAlg
IpIdentityMatrix.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: IpIdentityMatrix.hpp 1861 2010-12-21 21:34:47Z andreasw $
6
//
7
// Authors: Carl Laird, Andreas Waechter IBM 2004-08-13
8
9
#ifndef __IPIDENTITYMATRIX_HPP__
10
#define __IPIDENTITYMATRIX_HPP__
11
12
#include "
IpUtils.hpp
"
13
#include "
IpSymMatrix.hpp
"
14
15
namespace
Ipopt
16
{
17
21
class
IdentityMatrix
:
public
SymMatrix
22
{
23
public
:
24
27
31
IdentityMatrix
(
const
SymMatrixSpace
* owner_space);
32
34
~IdentityMatrix
();
36
38
void
SetFactor
(
Number
factor)
39
{
40
factor_
= factor;
41
}
42
44
Number
GetFactor
()
const
45
{
46
return
factor_
;
47
}
48
50
Index
Dim
()
const
;
51
52
protected
:
55
virtual
void
MultVectorImpl
(
Number
alpha,
const
Vector
&
x
,
56
Number
beta,
Vector
& y)
const
;
57
58
virtual
void
AddMSinvZImpl
(
Number
alpha,
const
Vector
& S,
59
const
Vector
& Z,
Vector
& X)
const
;
60
63
virtual
bool
HasValidNumbersImpl
()
const
;
64
65
virtual
void
ComputeRowAMaxImpl
(
Vector
& rows_norms,
bool
init)
const
;
66
67
virtual
void
PrintImpl
(
const
Journalist
& jnlst,
68
EJournalLevel
level,
69
EJournalCategory
category,
70
const
std::string& name,
71
Index
indent,
72
const
std::string& prefix)
const
;
74
75
private
:
85
IdentityMatrix
();
86
88
IdentityMatrix
(
const
IdentityMatrix
&);
89
91
void
operator=
(
const
IdentityMatrix
&);
93
95
Number
factor_
;
96
};
97
99
class
IdentityMatrixSpace
:
public
SymMatrixSpace
100
{
101
public
:
105
IdentityMatrixSpace
(
Index
dim)
106
:
107
SymMatrixSpace
(dim)
108
{}
109
111
virtual
~IdentityMatrixSpace
()
112
{}
114
117
virtual
SymMatrix
*
MakeNewSymMatrix
()
const
118
{
119
return
MakeNewIdentityMatrix
();
120
}
121
123
IdentityMatrix
*
MakeNewIdentityMatrix
()
const
124
{
125
return
new
IdentityMatrix
(
this
);
126
}
127
128
private
:
138
IdentityMatrixSpace
();
139
141
IdentityMatrixSpace
(
const
IdentityMatrixSpace
&);
142
144
void
operator=
(
const
IdentityMatrixSpace
&);
146
};
147
148
}
// namespace Ipopt
149
#endif
Generated on Mon Oct 21 2013 19:08:15 for Ipopt by
1.8.4