Main Page
Namespaces
Classes
Files
File List
File Members
build
buildd
coinor-ipopt-3.10.2
Ipopt
src
LinAlg
IpExpansionMatrix.hpp
Go to the documentation of this file.
1
// Copyright (C) 2004, 2009 International Business Machines and others.
2
// All Rights Reserved.
3
// This code is published under the Eclipse Public License.
4
//
5
// $Id: IpExpansionMatrix.hpp 1861 2010-12-21 21:34:47Z andreasw $
6
//
7
// Authors: Carl Laird, Andreas Waechter IBM 2004-08-13
8
9
#ifndef __IPEXPANSIONMATRIX_HPP__
10
#define __IPEXPANSIONMATRIX_HPP__
11
12
#include "
IpUtils.hpp
"
13
#include "
IpMatrix.hpp
"
14
15
namespace
Ipopt
16
{
17
19
class
ExpansionMatrixSpace;
20
27
class
ExpansionMatrix
:
public
Matrix
28
{
29
public
:
30
33
36
ExpansionMatrix
(
const
ExpansionMatrixSpace
* owner_space);
37
39
~ExpansionMatrix
();
41
49
const
Index
*
ExpandedPosIndices
()
const
;
50
59
const
Index
*
CompressedPosIndices
()
const
;
60
61
protected
:
64
virtual
void
MultVectorImpl
(
Number
alpha,
const
Vector
&
x
,
Number
beta,
65
Vector
&y)
const
;
66
67
virtual
void
TransMultVectorImpl
(
Number
alpha,
const
Vector
& x,
68
Number
beta,
Vector
& y)
const
;
69
72
virtual
void
AddMSinvZImpl
(
Number
alpha,
const
Vector
& S,
const
Vector
& Z,
73
Vector
& X)
const
;
74
77
virtual
void
SinvBlrmZMTdBrImpl
(
Number
alpha,
const
Vector
& S,
78
const
Vector
& R,
const
Vector
& Z,
79
const
Vector
& D,
Vector
& X)
const
;
80
81
virtual
void
ComputeRowAMaxImpl
(
Vector
& rows_norms,
bool
init)
const
;
82
83
virtual
void
ComputeColAMaxImpl
(
Vector
& cols_norms,
bool
init)
const
;
84
85
virtual
void
PrintImpl
(
const
Journalist
& jnlst,
86
EJournalLevel
level,
87
EJournalCategory
category,
88
const
std::string& name,
89
Index
indent,
90
const
std::string& prefix)
const
91
{
92
PrintImplOffset
(jnlst, level, category, name, indent, prefix, 1, 1);
93
}
95
96
void
PrintImplOffset
(
const
Journalist
& jnlst,
97
EJournalLevel
level,
98
EJournalCategory
category,
99
const
std::string& name,
100
Index
indent,
101
const
std::string& prefix,
102
Index
row_offset,
103
Index
col_offset)
const
;
104
105
friend
class
ParExpansionMatrix
;
106
107
private
:
117
ExpansionMatrix
();
118
120
ExpansionMatrix
(
const
ExpansionMatrix
&);
121
123
void
operator=
(
const
ExpansionMatrix
&);
125
126
const
ExpansionMatrixSpace
*
owner_space_
;
127
128
};
129
132
class
ExpansionMatrixSpace
:
public
MatrixSpace
133
{
134
public
:
144
ExpansionMatrixSpace
(
Index
NLargeVec,
145
Index
NSmallVec,
146
const
Index
*ExpPos,
147
const
int
offset = 0);
148
150
~ExpansionMatrixSpace
()
151
{
152
delete
[]
compressed_pos_
;
153
delete
[]
expanded_pos_
;
154
}
156
158
ExpansionMatrix
*
MakeNewExpansionMatrix
()
const
159
{
160
return
new
ExpansionMatrix
(
this
);
161
}
162
165
virtual
Matrix
*
MakeNew
()
const
166
{
167
return
MakeNewExpansionMatrix
();
168
}
169
176
const
Index
*
ExpandedPosIndices
()
const
177
{
178
return
expanded_pos_
;
179
}
180
188
const
Index
*
CompressedPosIndices
()
const
189
{
190
return
compressed_pos_
;
191
}
192
193
private
:
194
Index
*
expanded_pos_
;
195
Index
*
compressed_pos_
;
196
};
197
198
/* inline methods */
199
inline
200
const
Index
*
ExpansionMatrix::ExpandedPosIndices
()
const
201
{
202
return
owner_space_
->
ExpandedPosIndices
();
203
}
204
205
inline
206
const
Index
*
ExpansionMatrix::CompressedPosIndices
()
const
207
{
208
return
owner_space_
->
CompressedPosIndices
();
209
}
210
211
}
// namespace Ipopt
212
#endif
Generated on Fri Jun 29 2012 06:35:13 by
1.8.1.1