HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_SparseMatrixRowT< T > Class Template Reference

#include <UT_SparseMatrix.h>

Public Member Functions

 UT_SparseMatrixRowT ()
 
 ~UT_SparseMatrixRowT ()
 
void buildFrom (UT_SparseMatrixT< T, false > &m, bool invertdiag=false, T tol=1e-5f)
 
int getNumRows () const
 
int getNumCols () const
 
int64 getMemoryUsage () const
 Return the amount of memory used by this array. More...
 
bool shouldMultiThread () const
 
int findCellFromRow (int row) const
 
void getDiagonalInv (UT_VectorT< T > &out) const
 
 THREADED_METHOD2_CONST (UT_SparseMatrixRowT, shouldMultiThread(), multVec, const UT_VectorT< T > &, v, UT_VectorT< T > &, result) void multVecPartial(const UT_VectorT< T > &v
 
void multVecAndDot (const UT_VectorT< T > &v, UT_VectorT< T > &result, fpreal64 *dotpq) const
 
int solveUpperTriangular (UT_VectorT< T > &x, const UT_VectorT< T > &b, T tol=1e-5) const
 
int solveLowerTriangularTransposeNegate (UT_VectorT< T > &x, const UT_VectorT< T > &b, T tol=1e-5) const
 
float solveConjugateGradient (UT_VectorT< T > &x, const UT_VectorT< T > &b, const UT_SparseMatrixRowT< T > *GT, T tol2=1e-5, int max_iters=-1, int *iterout=NULL) const
 

Public Attributes

UT_VectorT< T > & result
 
UT_VectorT< T > const
UT_JobInfo &info 
const
 

Detailed Description

template<typename T>
class UT_SparseMatrixRowT< T >

This is a highly specialized varient of the SparseMatrix which does not let you change the number or position of cells It has, however, compiled fixed row offsets to make it fast to look up specific rows in the matrix.

Definition at line 391 of file UT_SparseMatrix.h.

Constructor & Destructor Documentation

template<typename T >
UT_SparseMatrixRowT< T >::UT_SparseMatrixRowT ( )
template<typename T >
UT_SparseMatrixRowT< T >::~UT_SparseMatrixRowT ( )

Member Function Documentation

template<typename T >
void UT_SparseMatrixRowT< T >::buildFrom ( UT_SparseMatrixT< T, false > &  m,
bool  invertdiag = false,
T  tol = 1e-5f 
)
template<typename T >
int UT_SparseMatrixRowT< T >::findCellFromRow ( int  row) const
inline

Definition at line 429 of file UT_SparseMatrix.h.

template<typename T >
void UT_SparseMatrixRowT< T >::getDiagonalInv ( UT_VectorT< T > &  out) const
template<typename T >
int64 UT_SparseMatrixRowT< T >::getMemoryUsage ( ) const

Return the amount of memory used by this array.

template<typename T >
int UT_SparseMatrixRowT< T >::getNumCols ( ) const
inline

Definition at line 414 of file UT_SparseMatrix.h.

template<typename T >
int UT_SparseMatrixRowT< T >::getNumRows ( ) const
inline

Definition at line 413 of file UT_SparseMatrix.h.

template<typename T >
void UT_SparseMatrixRowT< T >::multVecAndDot ( const UT_VectorT< T > &  v,
UT_VectorT< T > &  result,
fpreal64 dotpq 
) const
template<typename T >
bool UT_SparseMatrixRowT< T >::shouldMultiThread ( ) const
inline

Definition at line 420 of file UT_SparseMatrix.h.

template<typename T >
float UT_SparseMatrixRowT< T >::solveConjugateGradient ( UT_VectorT< T > &  x,
const UT_VectorT< T > &  b,
const UT_SparseMatrixRowT< T > *  GT,
T  tol2 = 1e-5,
int  max_iters = -1,
int iterout = NULL 
) const

Solves conjugate gradient using our specialized functions. These allow us to perform some normal and dot operations while the cache is still hot. This matrix is the matrix to solve. The provided GT matrix is the upper triangular result of cholesky factoriziation. Norm is hardcoded to 2. If the GT matrix is null, no preconditioner will be used.

template<typename T >
int UT_SparseMatrixRowT< T >::solveLowerTriangularTransposeNegate ( UT_VectorT< T > &  x,
const UT_VectorT< T > &  b,
T  tol = 1e-5 
) const

Given an upper triangular matrix, solves the lower triangular transposed of it and negates the result.

template<typename T >
int UT_SparseMatrixRowT< T >::solveUpperTriangular ( UT_VectorT< T > &  x,
const UT_VectorT< T > &  b,
T  tol = 1e-5 
) const

Assumes this is a lower triangular matrix. Solves the equation A x = b If the diagonal of A is zero within tolerance, the corresponding x coordinate is zero. Returned is the number of artifical zeros places into x. 0 means the solution encountered no singularities, 10 would mean 10 singularities.

template<typename T >
UT_SparseMatrixRowT< T >::THREADED_METHOD2_CONST ( UT_SparseMatrixRowT< T ,
shouldMultiThread()  ,
multVec  ,
const UT_VectorT< T > &  ,
v  ,
UT_VectorT< T > &  ,
result   
) const

Member Data Documentation

template<typename T >
UT_VectorT<T> const UT_JobInfo& info UT_SparseMatrixRowT< T >::const

Definition at line 439 of file UT_SparseMatrix.h.

template<typename T >
UT_VectorT< T > & UT_SparseMatrixRowT< T >::result

Definition at line 439 of file UT_SparseMatrix.h.


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