Orfeo Toolbox  3.16
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 
38 {
39 public:
40 
42  typedef long integer;
43  typedef double doublereal;
44 
47 
53 
54 
61  ItpackSparseMatrix(integer order, integer maxNonZeroValues);
62 
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 
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 
178 
180  void Initialize();
181 
183  void UnFinalize();
184 
186  void Finalize();
187 
190 
193 
196 
199 
202 
205 
208 
211 
219 
222 
231 
239  //integer m_IER;
240 };
241 
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 
265 
268 
269 };
270 
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 
293 
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