Ipopt Documentation  
 
Loading...
Searching...
No Matches
IpTripletHelper.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// Authors: Carl Laird, Andreas Waechter IBM 2004-08-13
6
7#ifndef __IPTRIPLETHELPER_HPP__
8#define __IPTRIPLETHELPER_HPP__
9
10#include "IpTypes.hpp"
11#include "IpException.hpp"
12
13namespace Ipopt
14{
15
16DECLARE_STD_EXCEPTION(UNKNOWN_MATRIX_TYPE);
17DECLARE_STD_EXCEPTION(UNKNOWN_VECTOR_TYPE);
18
20class Matrix;
21class GenTMatrix;
22class SymTMatrix;
23class DiagMatrix;
24class IdentityMatrix;
25class ExpansionMatrix;
26class ScaledMatrix;
27class SymScaledMatrix;
28class SumMatrix;
29class SumSymMatrix;
30class ZeroMatrix;
31class ZeroSymMatrix;
32class CompoundMatrix;
34class TransposeMatrix;
36class Vector;
37
39{
40public:
43
45 const Matrix& matrix
46 );
47
49 static void FillRowCol(
50 Index n_entries,
51 const Matrix& matrix,
52 Index* iRow,
53 Index* jCol,
54 Index row_offset = 0,
55 Index col_offset = 0
56 );
57
59 static void FillValues(
60 Index n_entries,
61 const Matrix& matrix,
62 Number* values
63 );
64
67 Index dim,
68 const Vector& vector,
69 Number* values
70 );
71
73 static void PutValuesInVector(
74 Index dim,
75 const Number* values,
76 Vector& vector
77 );
79
80private:
83 const SumMatrix& matrix
84 );
85
88 const SumSymMatrix& matrix
89 );
90
93 const CompoundMatrix& matrix
94 );
95
98 const CompoundSymMatrix& matrix
99 );
100
103 const TransposeMatrix& matrix
104 );
105
108 const ExpandedMultiVectorMatrix& matrix
109 );
110
111 static void FillRowCol_(
112 Index n_entries,
113 const GenTMatrix& matrix,
114 Index row_offset,
115 Index col_offset,
116 Index* iRow,
117 Index* jCol
118 );
119
120 static void FillValues_(
121 Index n_entries,
122 const GenTMatrix& matrix,
123 Number* values
124 );
125
126 static void FillRowCol_(
127 Index n_entries,
128 const SymTMatrix& matrix,
129 Index row_offset,
130 Index col_offset,
131 Index* iRow,
132 Index* jCol
133 );
134
135 static void FillValues_(
136 Index n_entries,
137 const SymTMatrix& matrix,
138 Number* values
139 );
140
141 static void FillRowCol_(
142 Index n_entries,
143 const DiagMatrix& matrix,
144 Index row_offset,
145 Index col_offset,
146 Index* iRow,
147 Index* jCol
148 );
149
150 static void FillValues_(
151 Index n_entries,
152 const DiagMatrix& matrix,
153 Number* values
154 );
155
156 static void FillRowCol_(
157 Index n_entries,
158 const IdentityMatrix& matrix,
159 Index row_offset,
160 Index col_offset,
161 Index* iRow,
162 Index* jCol
163 );
164
165 static void FillValues_(
166 Index n_entries,
167 const IdentityMatrix& matrix,
168 Number* values
169 );
170
171 static void FillRowCol_(
172 Index n_entries,
173 const ExpansionMatrix& matrix,
174 Index row_offset,
175 Index col_offset,
176 Index* iRow,
177 Index* jCol
178 );
179
180 static void FillValues_(
181 Index n_entries,
182 const ExpansionMatrix& matrix,
183 Number* values
184 );
185
186 static void FillRowCol_(
187 Index n_entries,
188 const SumMatrix& matrix,
189 Index row_offset,
190 Index col_offset,
191 Index* iRow,
192 Index* jCol
193 );
194
195 static void FillValues_(
196 Index n_entries,
197 const SumMatrix& matrix,
198 Number* values
199 );
200
201 static void FillRowCol_(
202 Index n_entries,
203 const SumSymMatrix& matrix,
204 Index row_offset,
205 Index col_offset,
206 Index* iRow,
207 Index* jCol
208 );
209
210 static void FillValues_(
211 Index n_entries,
212 const SumSymMatrix& matrix,
213 Number* values
214 );
215
216 static void FillRowCol_(
217 Index n_entries,
218 const CompoundMatrix& matrix,
219 Index row_offset,
220 Index col_offset,
221 Index* iRow,
222 Index* jCol
223 );
224
225 static void FillValues_(
226 Index n_entries,
227 const CompoundMatrix& matrix,
228 Number* values
229 );
230
231 static void FillRowCol_(
232 Index n_entries,
233 const CompoundSymMatrix& matrix,
234 Index row_offset,
235 Index col_offset,
236 Index* iRow,
237 Index* jCol
238 );
239
240 static void FillValues_(
241 Index n_entries,
242 const CompoundSymMatrix& matrix,
243 Number* values
244 );
245
246 static void FillRowCol_(
247 Index n_entries,
248 const ScaledMatrix& matrix,
249 Index row_offset,
250 Index col_offset,
251 Index* iRow,
252 Index* jCol
253 );
254
255 static void FillValues_(
256 Index n_entries,
257 const ScaledMatrix& matrix,
258 Number* values
259 );
260
261 static void FillRowCol_(
262 Index n_entries,
263 const SymScaledMatrix& matrix,
264 Index row_offset,
265 Index col_offset,
266 Index* iRow,
267 Index* jCol
268 );
269
270 static void FillValues_(
271 Index n_entries,
272 const SymScaledMatrix& matrix,
273 Number* values
274 );
275
276 static void FillRowCol_(
277 Index n_entries,
278 const TransposeMatrix& matrix,
279 Index row_offset,
280 Index col_offset,
281 Index* iRow,
282 Index* jCol
283 );
284
285 static void FillValues_(
286 Index n_entries,
287 const TransposeMatrix& matrix,
288 Number* values
289 );
290
291 static void FillRowCol_(
292 Index n_entries,
293 const ExpandedMultiVectorMatrix& matrix,
294 Index row_offset,
295 Index col_offset,
296 Index* iRow,
297 Index* jCol
298 );
299
300 static void FillValues_(
301 Index n_entries,
302 const ExpandedMultiVectorMatrix& matrix,
303 Number* values
304 );
305};
306
307} // namespace Ipopt
308#endif
#define DECLARE_STD_EXCEPTION(__except_type)
Class for Matrices consisting of other matrices.
Class for symmetric matrices consisting of other matrices.
Class for diagonal matrices.
Class for Matrices with few rows that consists of Vectors, together with a premultiplied Expansion ma...
Class for expansion/projection matrices.
Class for general matrices stored in triplet format.
Class for Matrices which are multiples of the identity matrix.
Matrix Base Class.
Definition IpMatrix.hpp:28
Class for a Matrix in conjunction with its scaling factors for row and column scaling.
Class for Matrices which are sum of matrices.
Class for Matrices which are sum of symmetric matrices.
Class for a Matrix in conjunction with its scaling factors for row and column scaling.
Class for symmetric matrices stored in triplet format.
Class for Matrices which are the transpose of another matrix.
static void FillRowCol_(Index n_entries, const ExpandedMultiVectorMatrix &matrix, Index row_offset, Index col_offset, Index *iRow, Index *jCol)
static Index GetNumberEntries_(const SumMatrix &matrix)
find the total number of triplet entries for the SumMatrix
static void FillRowCol_(Index n_entries, const SymScaledMatrix &matrix, Index row_offset, Index col_offset, Index *iRow, Index *jCol)
static void FillRowCol_(Index n_entries, const DiagMatrix &matrix, Index row_offset, Index col_offset, Index *iRow, Index *jCol)
static void FillValues_(Index n_entries, const CompoundSymMatrix &matrix, Number *values)
static void FillRowCol_(Index n_entries, const SumMatrix &matrix, Index row_offset, Index col_offset, Index *iRow, Index *jCol)
static void FillValues_(Index n_entries, const TransposeMatrix &matrix, Number *values)
static Index GetNumberEntries_(const ExpandedMultiVectorMatrix &matrix)
find the total number of triplet entries for the TransposeMatrix
static void FillValues_(Index n_entries, const SumSymMatrix &matrix, Number *values)
static Index GetNumberEntries_(const TransposeMatrix &matrix)
find the total number of triplet entries for the TransposeMatrix
static void FillRowCol_(Index n_entries, const ExpansionMatrix &matrix, Index row_offset, Index col_offset, Index *iRow, Index *jCol)
static void FillRowCol_(Index n_entries, const TransposeMatrix &matrix, Index row_offset, Index col_offset, Index *iRow, Index *jCol)
static void FillValues_(Index n_entries, const IdentityMatrix &matrix, Number *values)
static Index GetNumberEntries_(const SumSymMatrix &matrix)
find the total number of triplet entries for the SumSymMatrix
static void FillRowCol_(Index n_entries, const SymTMatrix &matrix, Index row_offset, Index col_offset, Index *iRow, Index *jCol)
static Index GetNumberEntries(const Matrix &matrix)
find the total number of triplet entries of a Matrix
static void FillValues_(Index n_entries, const CompoundMatrix &matrix, Number *values)
static void FillRowCol_(Index n_entries, const CompoundMatrix &matrix, Index row_offset, Index col_offset, Index *iRow, Index *jCol)
static void FillValues_(Index n_entries, const ExpansionMatrix &matrix, Number *values)
static void FillValues_(Index n_entries, const GenTMatrix &matrix, Number *values)
static void FillValues_(Index n_entries, const DiagMatrix &matrix, Number *values)
static Index GetNumberEntries_(const CompoundMatrix &matrix)
find the total number of triplet entries for the CompoundMatrix
static void FillValuesFromVector(Index dim, const Vector &vector, Number *values)
fill the values from the vector into a dense double* structure
static void PutValuesInVector(Index dim, const Number *values, Vector &vector)
put the values from the double* back into the vector
static void FillValues(Index n_entries, const Matrix &matrix, Number *values)
fill the values for the triplet format from the matrix
static void FillValues_(Index n_entries, const SymScaledMatrix &matrix, Number *values)
static void FillValues_(Index n_entries, const ExpandedMultiVectorMatrix &matrix, Number *values)
static void FillValues_(Index n_entries, const ScaledMatrix &matrix, Number *values)
static void FillRowCol_(Index n_entries, const CompoundSymMatrix &matrix, Index row_offset, Index col_offset, Index *iRow, Index *jCol)
static void FillValues_(Index n_entries, const SymTMatrix &matrix, Number *values)
static void FillRowCol(Index n_entries, const Matrix &matrix, Index *iRow, Index *jCol, Index row_offset=0, Index col_offset=0)
fill the irows, jcols structure for the triplet format from the matrix
static void FillRowCol_(Index n_entries, const IdentityMatrix &matrix, Index row_offset, Index col_offset, Index *iRow, Index *jCol)
static void FillValues_(Index n_entries, const SumMatrix &matrix, Number *values)
static Index GetNumberEntries_(const CompoundSymMatrix &matrix)
find the total number of triplet entries for the CompoundSymMatrix
static void FillRowCol_(Index n_entries, const GenTMatrix &matrix, Index row_offset, Index col_offset, Index *iRow, Index *jCol)
static void FillRowCol_(Index n_entries, const SumSymMatrix &matrix, Index row_offset, Index col_offset, Index *iRow, Index *jCol)
static void FillRowCol_(Index n_entries, const ScaledMatrix &matrix, Index row_offset, Index col_offset, Index *iRow, Index *jCol)
Vector Base Class.
Definition IpVector.hpp:48
Class for Matrices with only zero entries.
Class for Symmetric Matrices with only zero entries.
#define IPOPTLIB_EXPORT
Definition config.h:94
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
ipnumber Number
Type of all numbers.
Definition IpTypes.hpp:17