Orfeo Toolbox
3.16
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
OTB
Utilities
ITK
Code
Numerics
FEM
itkFEMItpackSparseMatrix.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Insight Segmentation & Registration Toolkit
4
Module: $RCSfile: itkFEMItpackSparseMatrix.h,v $
5
Language: C++
6
Date: $Date: 2009-01-29 21:55:13 $
7
Version: $Revision: 1.14 $
8
9
Copyright (c) Insight Software Consortium. All rights reserved.
10
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11
12
This software is distributed WITHOUT ANY WARRANTY; without even
13
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14
PURPOSE. See the above copyright notices for more information.
15
16
=========================================================================*/
17
18
#ifndef __itkFEMItpackSparseMatrix_h
19
#define __itkFEMItpackSparseMatrix_h
20
21
#include "
itkFEMException.h
"
22
23
24
namespace
itk {
25
namespace
fem {
26
34
// Forward declaration of friend class
35
class
ItpackLinearSystemWrapper;
36
37
class
ItpackSparseMatrix
38
{
39
public
:
40
42
typedef
long
integer
;
43
typedef
double
doublereal
;
44
46
ItpackSparseMatrix
();
47
52
ItpackSparseMatrix
(
integer
order);
53
54
61
ItpackSparseMatrix
(
integer
order,
integer
maxNonZeroValues);
62
66
~ItpackSparseMatrix
();
67
73
void
SetOrder
(
integer
order) {
m_N
= order; }
74
80
void
SetMaxNonZeroValues
(
integer
maxNonZeroValues) {
m_NZ
= maxNonZeroValues; }
81
88
void
Set
(
integer
i,
integer
j,
doublereal
value);
89
96
void
Add
(
integer
i,
integer
j,
doublereal
value);
97
102
doublereal
Get
(
integer
i,
integer
j);
103
107
integer
*
GetN
() {
return
&
m_N
; }
108
112
integer
*
GetIA
();
113
120
void
SetCompressedRow
(
integer
*ia,
integer
*ja,
doublereal
*a);
124
integer
*
GetJA
();
125
129
doublereal
*
GetA
();
130
134
doublereal
*
GetValueArray
() {
return
GetA
(); }
135
139
integer
*
GetColumnArray
() {
return
GetJA
(); }
140
144
integer
*
GetRowArray
() {
return
GetIA
(); }
145
149
integer
GetOrder
()
const
{
return
m_N
; }
150
154
integer
GetMaxNonZeroValues
()
const
{
return
m_NZ
; }
155
159
void
Clear
();
160
164
void
mult
(
doublereal
* vector,
doublereal
* result);
165
169
void
mult
(
ItpackSparseMatrix
* rightMatrix,
ItpackSparseMatrix
* resultMatrix);
170
172
void
PrintCompressedRow
();
173
174
private
:
175
177
friend
class
LinearSystemWrapperItpack
;
178
180
void
Initialize
();
181
183
void
UnFinalize
();
184
186
void
Finalize
();
187
189
integer
m_MatrixFinalized
;
190
192
integer
m_MatrixInitialized
;
193
195
integer
m_N
;
196
198
integer
m_NZ
;
199
201
integer
*
m_IA
;
202
204
integer
*
m_JA
;
205
207
doublereal
*
m_A
;
208
210
integer
*
m_IWORK
;
211
218
integer
m_MODE
;
219
221
integer
m_NOUT
;
222
230
integer
m_LEVEL
;
231
239
//integer m_IER;
240
};
241
248
class
FEMExceptionItpackSparseMatrixSbagn
:
public
FEMException
249
{
250
public
:
251
253
typedef
long
integer
;
254
typedef
double
doublereal
;
255
261
FEMExceptionItpackSparseMatrixSbagn
(
const
char
*file,
unsigned
int
lineNumber, std::string location,
integer
errorCode);
262
264
virtual
~FEMExceptionItpackSparseMatrixSbagn
() throw() {}
265
267
itkTypeMacro(
FEMExceptionItpackSparseMatrixSbagn
,
FEMException
);
268
269
};
270
277
class
FEMExceptionItpackSparseMatrixSbsij
:
public
FEMException
278
{
279
public
:
281
typedef
long
integer
;
282
typedef
double
doublereal
;
283
289
FEMExceptionItpackSparseMatrixSbsij
(
const
char
*file,
unsigned
int
lineNumber, std::string location,
integer
errorCode);
290
292
virtual
~FEMExceptionItpackSparseMatrixSbsij
() throw() {}
293
295
itkTypeMacro(
FEMExceptionItpackSparseMatrixSbsij
,
FEMException
);
296
297
};
298
299
}}
// end namespace itk::fem
300
301
#endif
Generated at Sat Feb 2 2013 23:36:46 for
Orfeo Toolbox
with
doxygen 1.8.1.1