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
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(
51 const Matrix& matrix,
52 Index* iRow,
53 Index* jCol,
54 Index row_offset = 0,
56 );
57
59 static void FillValues(
61 const Matrix& matrix,
63 );
64
67 Index dim,
68 const Vector& vector,
70 );
71
73 static void PutValuesInVector(
74 Index dim,
75 const Number* values,
77 );
79
80private:
83 const SumMatrix& matrix
84 );
85
88 const SumSymMatrix& matrix
89 );
90
94 );
95
99 );
100
104 );
105
109 );
110
111 static void FillRowCol_(
113 const GenTMatrix& matrix,
116 Index* iRow,
117 Index* jCol
118 );
119
120 static void FillValues_(
122 const GenTMatrix& matrix,
124 );
125
126 static void FillRowCol_(
128 const SymTMatrix& matrix,
131 Index* iRow,
132 Index* jCol
133 );
134
135 static void FillValues_(
137 const SymTMatrix& matrix,
139 );
140
141 static void FillRowCol_(
143 const DiagMatrix& matrix,
146 Index* iRow,
147 Index* jCol
148 );
149
150 static void FillValues_(
152 const DiagMatrix& matrix,
154 );
155
156 static void FillRowCol_(
158 const IdentityMatrix& matrix,
161 Index* iRow,
162 Index* jCol
163 );
164
165 static void FillValues_(
167 const IdentityMatrix& matrix,
169 );
170
171 static void FillRowCol_(
173 const ExpansionMatrix& matrix,
176 Index* iRow,
177 Index* jCol
178 );
179
180 static void FillValues_(
182 const ExpansionMatrix& matrix,
184 );
185
186 static void FillRowCol_(
188 const SumMatrix& matrix,
191 Index* iRow,
192 Index* jCol
193 );
194
195 static void FillValues_(
197 const SumMatrix& matrix,
199 );
200
201 static void FillRowCol_(
203 const SumSymMatrix& matrix,
206 Index* iRow,
207 Index* jCol
208 );
209
210 static void FillValues_(
212 const SumSymMatrix& matrix,
214 );
215
216 static void FillRowCol_(
218 const CompoundMatrix& matrix,
221 Index* iRow,
222 Index* jCol
223 );
224
225 static void FillValues_(
227 const CompoundMatrix& matrix,
229 );
230
231 static void FillRowCol_(
236 Index* iRow,
237 Index* jCol
238 );
239
240 static void FillValues_(
244 );
245
246 static void FillRowCol_(
248 const ScaledMatrix& matrix,
251 Index* iRow,
252 Index* jCol
253 );
254
255 static void FillValues_(
257 const ScaledMatrix& matrix,
259 );
260
261 static void FillRowCol_(
263 const SymScaledMatrix& matrix,
266 Index* iRow,
267 Index* jCol
268 );
269
270 static void FillValues_(
272 const SymScaledMatrix& matrix,
274 );
275
276 static void FillRowCol_(
278 const TransposeMatrix& matrix,
281 Index* iRow,
282 Index* jCol
283 );
284
285 static void FillValues_(
287 const TransposeMatrix& matrix,
289 );
290
291 static void FillRowCol_(
296 Index* iRow,
297 Index* jCol
298 );
299
300 static void FillValues_(
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.
Templated class which stores one entry for the CachedResult class.
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
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