Orfeo Toolbox  3.16
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
itk::fem::ItpackSparseMatrix Class Reference

a compressed row sparse matrix representation that makes use of itpack to dynamically assemble the matrix More...

#include <itkFEMItpackSparseMatrix.h>

List of all members.

Public Types

typedef double doublereal
typedef long integer

Public Member Functions

 ItpackSparseMatrix ()
 ItpackSparseMatrix (integer order)
 ItpackSparseMatrix (integer order, integer maxNonZeroValues)
 ~ItpackSparseMatrix ()
void Add (integer i, integer j, doublereal value)
void Clear ()
doublereal Get (integer i, integer j)
doublerealGetA ()
integerGetColumnArray ()
integerGetIA ()
integerGetJA ()
integer GetMaxNonZeroValues () const
integerGetN ()
integer GetOrder () const
integerGetRowArray ()
doublerealGetValueArray ()
void mult (doublereal *vector, doublereal *result)
void mult (ItpackSparseMatrix *rightMatrix, ItpackSparseMatrix *resultMatrix)
void PrintCompressedRow ()
void Set (integer i, integer j, doublereal value)
void SetCompressedRow (integer *ia, integer *ja, doublereal *a)
void SetMaxNonZeroValues (integer maxNonZeroValues)
void SetOrder (integer order)

Private Member Functions

void Finalize ()
void Initialize ()
void UnFinalize ()

Private Attributes

doublerealm_A
integerm_IA
integerm_IWORK
integerm_JA
integer m_LEVEL
integer m_MatrixFinalized
integer m_MatrixInitialized
integer m_MODE
integer m_N
integer m_NOUT
integer m_NZ

Friends

class LinearSystemWrapperItpack

Detailed Description

a compressed row sparse matrix representation that makes use of itpack to dynamically assemble the matrix

See also:
ItpackLinearSystemWrapper

Definition at line 37 of file itkFEMItpackSparseMatrix.h.


Member Typedef Documentation

Definition at line 43 of file itkFEMItpackSparseMatrix.h.

typedefs from f2c.h

Definition at line 42 of file itkFEMItpackSparseMatrix.h.


Constructor & Destructor Documentation

itk::fem::ItpackSparseMatrix::ItpackSparseMatrix ( )

Constructor

Definition at line 24 of file itkFEMItpackSparseMatrix.cxx.

References m_A, m_IA, m_IWORK, m_JA, m_LEVEL, m_MatrixFinalized, m_MatrixInitialized, m_MODE, m_N, m_NOUT, and m_NZ.

itk::fem::ItpackSparseMatrix::ItpackSparseMatrix ( integer  order)

Constructor with single parameter

Parameters:
orderthe order of the matrix to be created

Definition at line 41 of file itkFEMItpackSparseMatrix.cxx.

References m_A, m_IA, m_IWORK, m_JA, m_LEVEL, m_MatrixFinalized, m_MatrixInitialized, m_MODE, m_N, m_NOUT, and m_NZ.

itk::fem::ItpackSparseMatrix::ItpackSparseMatrix ( integer  order,
integer  maxNonZeroValues 
)

Constructor with two parameters

Parameters:
orderthe order of the matrix to be created
maxNonZeroValuesthe maximum number of non-zero values that may appear in the matrix

Definition at line 59 of file itkFEMItpackSparseMatrix.cxx.

References m_A, m_IA, m_IWORK, m_JA, m_LEVEL, m_MatrixFinalized, m_MatrixInitialized, m_MODE, m_N, m_NOUT, and m_NZ.

itk::fem::ItpackSparseMatrix::~ItpackSparseMatrix ( )

Destructor

Definition at line 477 of file itkFEMItpackSparseMatrix.cxx.

References m_A, m_IA, m_IWORK, and m_JA.


Member Function Documentation

void itk::fem::ItpackSparseMatrix::Add ( integer  i,
integer  j,
doublereal  value 
)

Add to existing entry of matrix

Parameters:
irow index
jcolumn index
valuevalue to add to current value at (i,j)

Definition at line 266 of file itkFEMItpackSparseMatrix.cxx.

References Initialize(), m_A, m_IA, m_IWORK, m_JA, m_LEVEL, m_MatrixFinalized, m_MatrixInitialized, m_MODE, m_N, m_NOUT, m_NZ, sbsij_(), and UnFinalize().

void itk::fem::ItpackSparseMatrix::Clear ( void  )

Clear the memory

Definition at line 138 of file itkFEMItpackSparseMatrix.cxx.

References m_A, m_IA, m_IWORK, m_JA, m_LEVEL, m_MatrixFinalized, m_MatrixInitialized, m_MODE, m_N, m_NOUT, and m_NZ.

void itk::fem::ItpackSparseMatrix::Finalize ( )
private

finalize matrix form

Definition at line 174 of file itkFEMItpackSparseMatrix.cxx.

References m_A, m_IA, m_IWORK, m_JA, m_MatrixFinalized, m_MatrixInitialized, m_N, m_NZ, and sbend_().

Referenced by Get(), GetA(), GetIA(), GetJA(), and mult().

ItpackSparseMatrix::doublereal itk::fem::ItpackSparseMatrix::Get ( integer  i,
integer  j 
)

Get a value from the matrix

Parameters:
irow index
jcolumn index

Definition at line 311 of file itkFEMItpackSparseMatrix.cxx.

References Finalize(), m_A, m_IA, m_JA, m_MatrixFinalized, and m_MatrixInitialized.

Referenced by mult().

ItpackSparseMatrix::doublereal * itk::fem::ItpackSparseMatrix::GetA ( void  )

Get the values of the matrix (via "itpack-like" naming scheme)

Definition at line 347 of file itkFEMItpackSparseMatrix.cxx.

References Finalize(), m_A, m_MatrixFinalized, and m_MatrixInitialized.

Referenced by GetValueArray().

integer* itk::fem::ItpackSparseMatrix::GetColumnArray ( )
inline

Get the column indices

Definition at line 139 of file itkFEMItpackSparseMatrix.h.

References GetJA().

ItpackSparseMatrix::integer * itk::fem::ItpackSparseMatrix::GetIA ( )

Get the row indices of the matrix (via "itpack-like" naming scheme)

Definition at line 356 of file itkFEMItpackSparseMatrix.cxx.

References Finalize(), m_IA, m_MatrixFinalized, and m_MatrixInitialized.

Referenced by GetRowArray().

ItpackSparseMatrix::integer * itk::fem::ItpackSparseMatrix::GetJA ( )

Get the column indices of the matrix (via "itpack-like" naming scheme)

Definition at line 365 of file itkFEMItpackSparseMatrix.cxx.

References Finalize(), m_JA, m_MatrixFinalized, and m_MatrixInitialized.

Referenced by GetColumnArray().

integer itk::fem::ItpackSparseMatrix::GetMaxNonZeroValues ( ) const
inline

Get the maximum number of non-zero values allowed in the matrix

Definition at line 154 of file itkFEMItpackSparseMatrix.h.

References m_NZ.

integer* itk::fem::ItpackSparseMatrix::GetN ( )
inline

Get the order of the matrix (via "itpack-like" naming scheme)

Definition at line 107 of file itkFEMItpackSparseMatrix.h.

References m_N.

integer itk::fem::ItpackSparseMatrix::GetOrder ( ) const
inline

Get the order of the matrix

Definition at line 149 of file itkFEMItpackSparseMatrix.h.

References m_N.

Referenced by mult().

integer* itk::fem::ItpackSparseMatrix::GetRowArray ( )
inline

Get the row indices

Definition at line 144 of file itkFEMItpackSparseMatrix.h.

References GetIA().

doublereal* itk::fem::ItpackSparseMatrix::GetValueArray ( )
inline

Get the values of the matrix

Definition at line 134 of file itkFEMItpackSparseMatrix.h.

References GetA().

void itk::fem::ItpackSparseMatrix::Initialize ( void  )
private

initialize matrix

Definition at line 78 of file itkFEMItpackSparseMatrix.cxx.

References m_A, m_IA, m_IWORK, m_JA, m_MatrixFinalized, m_MatrixInitialized, m_N, m_NZ, sbini_(), and Set().

Referenced by Add(), and Set().

void itk::fem::ItpackSparseMatrix::mult ( doublereal vector,
doublereal result 
)

Multiply the matrix by a vector

Definition at line 374 of file itkFEMItpackSparseMatrix.cxx.

References Finalize(), m_A, m_IA, m_JA, m_MatrixFinalized, and m_N.

void itk::fem::ItpackSparseMatrix::mult ( ItpackSparseMatrix rightMatrix,
ItpackSparseMatrix resultMatrix 
)

Multiply the matrix by another ItpackSparseMatrix

Definition at line 414 of file itkFEMItpackSparseMatrix.cxx.

References Finalize(), Get(), GetOrder(), m_A, m_IA, m_JA, m_MatrixFinalized, m_N, and Set().

void itk::fem::ItpackSparseMatrix::PrintCompressedRow ( )

output compressed row vectors: IA, JA, A

void itk::fem::ItpackSparseMatrix::Set ( integer  i,
integer  j,
doublereal  value 
)

Insert a value into the matrix

Parameters:
irow index
jcolumn index
valuevalue to be added at (i,j)

Definition at line 224 of file itkFEMItpackSparseMatrix.cxx.

References Initialize(), m_A, m_IA, m_IWORK, m_JA, m_LEVEL, m_MatrixFinalized, m_MatrixInitialized, m_MODE, m_N, m_NOUT, m_NZ, sbsij_(), and UnFinalize().

Referenced by Initialize(), and mult().

void itk::fem::ItpackSparseMatrix::SetCompressedRow ( integer ia,
integer ja,
doublereal a 
)

Pass pointers to compressed row format arrays

Parameters:
iarow indices
jacolumn indices
amatrix values

Definition at line 467 of file itkFEMItpackSparseMatrix.cxx.

References m_A, m_IA, m_JA, m_MatrixFinalized, and m_MatrixInitialized.

void itk::fem::ItpackSparseMatrix::SetMaxNonZeroValues ( integer  maxNonZeroValues)
inline

Set the maximum number of non-zero values that may appear in the matrix

Parameters:
maxNonZeroValuesmaximum number of non-zero values that may appear in matrix
Note:
the maxNonZeroValues must be set before any values are entered

Definition at line 80 of file itkFEMItpackSparseMatrix.h.

References m_NZ.

void itk::fem::ItpackSparseMatrix::SetOrder ( integer  order)
inline

Set the order of the matrix

Parameters:
orderthe order of the matrix
Note:
the order must be set before any values are entered

Definition at line 73 of file itkFEMItpackSparseMatrix.h.

References m_N.

void itk::fem::ItpackSparseMatrix::UnFinalize ( )
private

unfinalize matrix

Definition at line 199 of file itkFEMItpackSparseMatrix.cxx.

References m_A, m_IA, m_IWORK, m_JA, m_LEVEL, m_MatrixFinalized, m_MatrixInitialized, m_N, m_NOUT, m_NZ, and sbagn_().

Referenced by Add(), and Set().


Friends And Related Function Documentation

friend class LinearSystemWrapperItpack
friend

friend class

Definition at line 177 of file itkFEMItpackSparseMatrix.h.


Member Data Documentation

doublereal* itk::fem::ItpackSparseMatrix::m_A
private

nonzero entries in compressed row storage format

Definition at line 207 of file itkFEMItpackSparseMatrix.h.

Referenced by Add(), Clear(), Finalize(), Get(), GetA(), Initialize(), ItpackSparseMatrix(), mult(), Set(), SetCompressedRow(), UnFinalize(), and ~ItpackSparseMatrix().

integer* itk::fem::ItpackSparseMatrix::m_IA
private
integer* itk::fem::ItpackSparseMatrix::m_IWORK
private
integer* itk::fem::ItpackSparseMatrix::m_JA
private
integer itk::fem::ItpackSparseMatrix::m_LEVEL
private

flag indicating desired level of error reporting during matrix building m_LEVEL < 0 - no printing = 0 - fatal error messages written to m_NOUT > 0 - messages printed when repeat entries are encountered

Note:
must be set to less than 0

Definition at line 230 of file itkFEMItpackSparseMatrix.h.

Referenced by Add(), Clear(), ItpackSparseMatrix(), Set(), and UnFinalize().

integer itk::fem::ItpackSparseMatrix::m_MatrixFinalized
private
integer itk::fem::ItpackSparseMatrix::m_MatrixInitialized
private

flag indicating variables have been initialized

Definition at line 192 of file itkFEMItpackSparseMatrix.h.

Referenced by Add(), Clear(), Finalize(), Get(), GetA(), GetIA(), GetJA(), Initialize(), ItpackSparseMatrix(), Set(), SetCompressedRow(), and UnFinalize().

integer itk::fem::ItpackSparseMatrix::m_MODE
private

flag indicating mode of matrix building for repeat entries m_MODE < 0 - current entry left as is = 0 - current entry reset > 0 - value is added to current entry

Definition at line 218 of file itkFEMItpackSparseMatrix.h.

Referenced by Add(), Clear(), ItpackSparseMatrix(), and Set().

integer itk::fem::ItpackSparseMatrix::m_N
private
integer itk::fem::ItpackSparseMatrix::m_NOUT
private

unit number that error messages are written to during matrix building

Definition at line 221 of file itkFEMItpackSparseMatrix.h.

Referenced by Add(), Clear(), ItpackSparseMatrix(), Set(), and UnFinalize().

integer itk::fem::ItpackSparseMatrix::m_NZ
private

Maximum number of non-zero elements in master stiffness matrix

Definition at line 198 of file itkFEMItpackSparseMatrix.h.

Referenced by Add(), Clear(), Finalize(), GetMaxNonZeroValues(), Initialize(), ItpackSparseMatrix(), Set(), SetMaxNonZeroValues(), and UnFinalize().


The documentation for this class was generated from the following files:

Generated at Sun Feb 3 2013 02:59:07 for Orfeo Toolbox with doxygen 1.8.1.1