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
IpDiagMatrix.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: IpDiagMatrix.hpp 1861 2010-12-21 21:34:47Z andreasw $
6
//
7
// Authors: Carl Laird, Andreas Waechter IBM 2004-08-13
8
9
#ifndef __IPDIAGMATRIX_HPP__
10
#define __IPDIAGMATRIX_HPP__
11
12
#include "
IpUtils.hpp
"
13
#include "
IpSymMatrix.hpp
"
14
15
namespace
Ipopt
16
{
17
20
class
DiagMatrix
:
public
SymMatrix
21
{
22
public
:
23
26
28
DiagMatrix
(
const
SymMatrixSpace
* owner_space);
29
31
~DiagMatrix
();
33
35
void
SetDiag
(
const
Vector
& diag)
36
{
37
diag_
= &diag;
38
}
39
41
SmartPtr<const Vector>
GetDiag
()
const
42
{
43
return
diag_
;
44
}
45
46
protected
:
49
virtual
void
MultVectorImpl
(
Number
alpha,
const
Vector
&
x
,
50
Number
beta,
Vector
& y)
const
;
51
54
virtual
bool
HasValidNumbersImpl
()
const
;
55
56
virtual
void
ComputeRowAMaxImpl
(
Vector
& rows_norms,
bool
init)
const
;
57
58
virtual
void
PrintImpl
(
const
Journalist
& jnlst,
59
EJournalLevel
level,
60
EJournalCategory
category,
61
const
std::string& name,
62
Index
indent,
63
const
std::string& prefix)
const
;
65
66
private
:
76
DiagMatrix
();
77
79
DiagMatrix
(
const
DiagMatrix
&);
80
82
void
operator=
(
const
DiagMatrix
&);
84
86
SmartPtr<const Vector>
diag_
;
87
};
88
90
class
DiagMatrixSpace
:
public
SymMatrixSpace
91
{
92
public
:
96
DiagMatrixSpace
(
Index
dim)
97
:
98
SymMatrixSpace
(dim)
99
{}
100
102
virtual
~DiagMatrixSpace
()
103
{}
105
108
virtual
SymMatrix
*
MakeNewSymMatrix
()
const
109
{
110
return
MakeNewDiagMatrix
();
111
}
112
114
DiagMatrix
*
MakeNewDiagMatrix
()
const
115
{
116
return
new
DiagMatrix
(
this
);
117
}
118
119
private
:
129
DiagMatrixSpace
();
130
132
DiagMatrixSpace
(
const
DiagMatrixSpace
&);
133
135
void
operator=
(
const
DiagMatrixSpace
&);
137
138
};
139
140
}
// namespace Ipopt
141
#endif
Generated on Mon Oct 21 2013 19:08:15 for Ipopt by
1.8.4