ITK
4.4.0
Insight Segmentation and Registration Toolkit
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
ITK
Modules
Numerics
FEM
include
itkFEMItpackSparseMatrix.h
Go to the documentation of this file.
1
/*=========================================================================
2
*
3
* Copyright Insight Software Consortium
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0.txt
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*
17
*=========================================================================*/
18
19
#ifndef __itkFEMItpackSparseMatrix_h
20
#define __itkFEMItpackSparseMatrix_h
21
22
#include "
itkFEMException.h
"
23
24
namespace
itk
25
{
26
namespace
fem
27
{
36
// Forward declaration of friend class
37
class
ItpackLinearSystemWrapper;
38
39
class
ItpackSparseMatrix
40
{
41
public
:
42
44
typedef
long
integer
;
45
typedef
double
doublereal
;
46
48
ItpackSparseMatrix
();
49
54
ItpackSparseMatrix
(
integer
order);
55
62
ItpackSparseMatrix
(
integer
order,
integer
maxNonZeroValues);
63
67
~ItpackSparseMatrix
();
68
74
void
SetOrder
(
integer
order)
75
{
76
m_N
= order;
77
}
78
84
void
SetMaxNonZeroValues
(
integer
maxNonZeroValues)
85
{
86
m_NZ
= maxNonZeroValues;
87
}
88
95
void
Set
(
integer
i,
integer
j,
doublereal
value);
96
103
void
Add
(
integer
i,
integer
j,
doublereal
value);
104
109
doublereal
Get
(
integer
i,
integer
j);
110
114
integer
*
GetN
()
115
{
116
return
&
m_N
;
117
}
118
122
integer
*
GetIA
();
123
130
void
SetCompressedRow
(
integer
*ia,
integer
*ja,
doublereal
*a);
131
135
integer
*
GetJA
();
136
140
doublereal
*
GetA
();
141
145
doublereal
*
GetValueArray
()
146
{
147
return
GetA
();
148
}
149
153
integer
*
GetColumnArray
()
154
{
155
return
GetJA
();
156
}
157
161
integer
*
GetRowArray
()
162
{
163
return
GetIA
();
164
}
165
169
integer
GetOrder
()
const
170
{
171
return
m_N
;
172
}
173
177
integer
GetMaxNonZeroValues
()
const
178
{
179
return
m_NZ
;
180
}
181
185
void
Clear
();
186
190
void
mult
(
doublereal
*vector,
doublereal
*result);
191
195
void
mult
(
ItpackSparseMatrix
*rightMatrix,
ItpackSparseMatrix
*resultMatrix);
196
198
void
PrintCompressedRow
();
199
200
private
:
201
203
friend
class
LinearSystemWrapperItpack
;
204
206
void
Initialize
();
207
209
void
UnFinalize
();
210
212
void
Finalize
();
213
215
integer
m_MatrixFinalized
;
216
218
integer
m_MatrixInitialized
;
219
221
integer
m_N
;
222
224
integer
m_NZ
;
225
227
integer
*
m_IA
;
228
230
integer
*
m_JA
;
231
233
doublereal
*
m_A
;
234
236
integer
*
m_IWORK
;
237
244
integer
m_MODE
;
245
247
integer
m_NOUT
;
248
256
integer
m_LEVEL
;
257
265
// integer m_IER;
266
};
267
275
class
ITK_ABI_EXPORT
FEMExceptionItpackSparseMatrixSbagn
:
public
FEMException
276
{
277
public
:
278
280
typedef
long
integer
;
281
typedef
double
doublereal
;
282
288
FEMExceptionItpackSparseMatrixSbagn
(
const
char
*file,
unsigned
int
lineNumber, std::string location,
289
integer
errorCode);
290
292
virtual
~
FEMExceptionItpackSparseMatrixSbagn
()
293
throw ( )
294
{
295
}
296
298
itkTypeMacro(
FEMExceptionItpackSparseMatrixSbagn
,
FEMException
);
299
};
300
308
class
ITK_ABI_EXPORT
FEMExceptionItpackSparseMatrixSbsij
:
public
FEMException
309
{
310
public
:
311
313
typedef
long
integer
;
314
typedef
double
doublereal
;
315
321
FEMExceptionItpackSparseMatrixSbsij
(
const
char
*file,
unsigned
int
lineNumber, std::string location,
322
integer
errorCode);
323
325
virtual
~
FEMExceptionItpackSparseMatrixSbsij
()
326
throw ( )
327
{
328
}
329
331
itkTypeMacro(
FEMExceptionItpackSparseMatrixSbsij
,
FEMException
);
332
};
333
}
334
}
// end namespace itk::fem
335
336
#endif
337
Generated on Mon May 13 2013 00:49:46 for ITK by
1.8.3.1