NCBI C++ ToolKit
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
Matrix< T > Class Template Reference

Search Toolkit Book for Matrix

#include "njn_matrix.hpp"
(Private to src/algo/blast/gumbel_params.)

+ Collaboration diagram for Matrix< T >:

Public Types

typedef vector< CellResidueRow
 
typedef vector< ResidueRowGrid
 

Public Member Functions

 Matrix ()
 
 Matrix (const Matrix &matrix_)
 
 Matrix (size_t m_, size_t n_, const T *vector_)
 
 Matrix (size_t m_, size_t n_, T a_=static_cast< T >(0))
 
virtual ~Matrix ()
 
Matrixoperator= (const Matrix &matrix_)
 
virtual void * create (bool isCopy_=false) const
 
virtual void copy (size_t m_, size_t n_, const T *const *matrix_)
 
virtual void copy (size_t m_, size_t n_, const T *vector_)
 
virtual void copy (size_t m_, size_t n_, T a_=static_cast< T >(0))
 
virtual operator bool () const
 
virtual std::ostream & out (std::ostream &ostr_) const
 
virtual std::istream & in (std::istream &istr_)
 
virtual Matrixoperator= (const T &a_)
 
virtual Toperator[] (size_t i_)
 
virtual const Toperator[] (size_t i_) const
 
virtual TsetValue ()
 
virtual size_t getM () const
 
virtual size_t getN () const
 
virtual const T *constgetMatrix () const
 
virtual const T getValue () const
 
 Matrix (unsigned int nBlocks, unsigned int nResidues)
 
ResidueRowoperator[] (unsigned int block)
 
const ResidueRowoperator[] (unsigned int block) const
 
 Matrix (double m0=1, double m1=0, double m2=0, double m3=0, double m4=0, double m5=1, double m6=0, double m7=0, double m8=0, double m9=0, double m10=1, double m11=0, double m12=0, double m13=0, double m14=0, double m15=1)
 
 Matrix (const Matrix &o)
 
void SetToIdentity (void)
 
Matrixoperator= (const Matrix &o)
 
double & operator[] (unsigned int i)
 
double operator[] (unsigned int i) const
 

Static Public Member Functions

static Matrix< T > * matrix (size_t k_, size_t m_, size_t n_, T a_=static_cast< T >(0))
 
static bool approx (const Matrix< T > &x_, const Matrix< T > &y_, T eps_)
 
static bool relApprox (const Matrix< T > &x_, const Matrix< T > &y_, T eps_)
 
static bool absRelApprox (const Matrix< T > &x_, const Matrix< T > &y_, T tol_, T rtol_)
 
static bool isSymmetric (const Matrix< T > &x_)
 

Public Attributes

Grid grid
 
double m [16]
 

Private Member Functions

virtual void init (size_t m_, size_t n_)
 
virtual void free ()
 

Private Attributes

size_t d_m
 
size_t d_n
 
T ** d_matrix_p
 
T d_value
 

Detailed Description

template<typename T>
class Matrix< T >

Definition at line 56 of file njn_matrix.hpp.

Member Typedef Documentation

◆ Grid

template<typename T >
typedef vector< ResidueRow > Matrix< T >::Grid

Definition at line 67 of file block_align.cpp.

◆ ResidueRow

template<typename T >
typedef vector< Cell > Matrix< T >::ResidueRow

Definition at line 66 of file block_align.cpp.

Constructor & Destructor Documentation

◆ Matrix() [1/7]

template<typename T >
Matrix< T >::Matrix
inline

Definition at line 223 of file njn_matrix.hpp.

◆ Matrix() [2/7]

template<typename T >
Matrix< T >::Matrix ( const Matrix< T > &  matrix_)
inline

Definition at line 228 of file njn_matrix.hpp.

◆ Matrix() [3/7]

template<typename T >
Matrix< T >::Matrix ( size_t  m_,
size_t  n_,
const T vector_ 
)
inline

Definition at line 235 of file njn_matrix.hpp.

References copy().

◆ Matrix() [4/7]

template<typename T >
Matrix< T >::Matrix ( size_t  m_,
size_t  n_,
T  a_ = static_cast <T> (0) 
)
inline

Definition at line 245 of file njn_matrix.hpp.

References copy().

◆ ~Matrix()

template<typename T >
Matrix< T >::~Matrix
inlinevirtual

Definition at line 255 of file njn_matrix.hpp.

References free().

◆ Matrix() [5/7]

template<typename T >
Matrix< T >::Matrix ( unsigned int  nBlocks,
unsigned int  nResidues 
)
inline

Definition at line 69 of file block_align.cpp.

References i, and pythonpp::resize().

◆ Matrix() [6/7]

template<typename T >
Matrix< T >::Matrix ( double  m0 = 1,
double  m1 = 0,
double  m2 = 0,
double  m3 = 0,
double  m4 = 0,
double  m5 = 1,
double  m6 = 0,
double  m7 = 0,
double  m8 = 0,
double  m9 = 0,
double  m10 = 1,
double  m11 = 0,
double  m12 = 0,
double  m13 = 0,
double  m14 = 0,
double  m15 = 1 
)
inline

Definition at line 169 of file vector_math.hpp.

References Matrix< T >::m.

◆ Matrix() [7/7]

template<typename T >
Matrix< T >::Matrix ( const Matrix< T > &  o)
inline

Definition at line 178 of file vector_math.hpp.

References i, and Matrix< T >::m.

Member Function Documentation

◆ absRelApprox()

template<typename T >
bool Matrix< T >::absRelApprox ( const Matrix< T > &  x_,
const Matrix< T > &  y_,
T  tol_,
T  rtol_ 
)
inlinestatic

Definition at line 194 of file njn_matrix.hpp.

References absRelApprox(), assert, and i.

◆ approx()

template<typename T >
bool Matrix< T >::approx ( const Matrix< T > &  x_,
const Matrix< T > &  y_,
T  eps_ 
)
inlinestatic

Definition at line 164 of file njn_matrix.hpp.

References approx(), assert, and i.

◆ copy() [1/3]

template<typename T >
void Matrix< T >::copy ( size_t  m_,
size_t  n_,
const T *const matrix_ 
)
inlinevirtual

Definition at line 522 of file njn_matrix.hpp.

References free(), i, and init().

◆ copy() [2/3]

template<typename T >
void Matrix< T >::copy ( size_t  m_,
size_t  n_,
const T vector_ 
)
inlinevirtual

Definition at line 542 of file njn_matrix.hpp.

References free(), i, and init().

◆ copy() [3/3]

template<typename T >
void Matrix< T >::copy ( size_t  m_,
size_t  n_,
T  a_ = static_cast <T> (0) 
)
inlinevirtual

Definition at line 563 of file njn_matrix.hpp.

References free(), i, and init().

◆ create()

template<typename T >
void * Matrix< T >::create ( bool  isCopy_ = false) const
inlinevirtual

Definition at line 269 of file njn_matrix.hpp.

◆ free()

template<typename T >
void Matrix< T >::free
inlineprivatevirtual

Definition at line 598 of file njn_matrix.hpp.

References i.

◆ getM()

template<typename T >
virtual size_t Matrix< T >::getM ( ) const
inlinevirtual

Definition at line 94 of file njn_matrix.hpp.

References Matrix< T >::d_m.

◆ getMatrix()

template<typename T >
virtual const T* const* Matrix< T >::getMatrix ( ) const
inlinevirtual

Definition at line 96 of file njn_matrix.hpp.

References Matrix< T >::d_matrix_p.

◆ getN()

template<typename T >
virtual size_t Matrix< T >::getN ( ) const
inlinevirtual

Definition at line 95 of file njn_matrix.hpp.

References Matrix< T >::d_n.

◆ getValue()

template<typename T >
virtual const T Matrix< T >::getValue ( ) const
inlinevirtual

Definition at line 97 of file njn_matrix.hpp.

References Matrix< T >::d_value.

◆ in()

template<typename T >
std::istream & Matrix< T >::in ( std::istream &  istr_)
inlinevirtual

◆ init()

template<typename T >
void Matrix< T >::init ( size_t  m_,
size_t  n_ 
)
inlineprivatevirtual

Definition at line 584 of file njn_matrix.hpp.

References i, and T.

◆ isSymmetric()

template<typename T >
bool Matrix< T >::isSymmetric ( const Matrix< T > &  x_)
inlinestatic

Definition at line 209 of file njn_matrix.hpp.

References i.

◆ matrix()

template<typename T >
Matrix< T > * Matrix< T >::matrix ( size_t  k_,
size_t  m_,
size_t  n_,
T  a_ = static_cast <T> (0) 
)
inlinestatic

Definition at line 150 of file njn_matrix.hpp.

References copy(), and i.

◆ operator bool()

template<typename T >
Matrix< T >::operator bool ( void  ) const
inlinevirtual

Definition at line 277 of file njn_matrix.hpp.

◆ operator=() [1/3]

template<typename T >
Matrix< T > & Matrix< T >::operator= ( const Matrix< T > &  matrix_)
inline

Definition at line 258 of file njn_matrix.hpp.

References copy().

◆ operator=() [2/3]

template<typename T >
Matrix& Matrix< T >::operator= ( const Matrix< T > &  o)
inline

Definition at line 186 of file vector_math.hpp.

References i, and Matrix< T >::m.

◆ operator=() [3/3]

template<typename T >
Matrix< T > & Matrix< T >::operator= ( const T a_)
inlinevirtual

Definition at line 503 of file njn_matrix.hpp.

References copy().

◆ operator[]() [1/6]

template<typename T >
T * Matrix< T >::operator[] ( size_t  i_)
inlinevirtual

Definition at line 510 of file njn_matrix.hpp.

◆ operator[]() [2/6]

template<typename T >
const T * Matrix< T >::operator[] ( size_t  i_) const
inlinevirtual

Definition at line 516 of file njn_matrix.hpp.

◆ operator[]() [3/6]

template<typename T >
ResidueRow& Matrix< T >::operator[] ( unsigned int  block)
inline

Definition at line 71 of file block_align.cpp.

◆ operator[]() [4/6]

template<typename T >
const ResidueRow& Matrix< T >::operator[] ( unsigned int  block) const
inline

Definition at line 72 of file block_align.cpp.

◆ operator[]() [5/6]

template<typename T >
double& Matrix< T >::operator[] ( unsigned int  i)
inline

Definition at line 190 of file vector_math.hpp.

References ERR_POST, Error(), i, and Matrix< T >::m.

◆ operator[]() [6/6]

template<typename T >
double Matrix< T >::operator[] ( unsigned int  i) const
inline

Definition at line 199 of file vector_math.hpp.

References ERR_POST, Error(), i, and Matrix< T >::m.

◆ out()

template<typename T >
std::ostream & Matrix< T >::out ( std::ostream &  ostr_) const
inlinevirtual

Definition at line 280 of file njn_matrix.hpp.

References abort(), assert, clearFormat(), GENERAL, getFormat(), HUMAN, i, MACHINE, SYMMETRIC, and USING_SCOPE.

◆ relApprox()

template<typename T >
bool Matrix< T >::relApprox ( const Matrix< T > &  x_,
const Matrix< T > &  y_,
T  eps_ 
)
inlinestatic

Definition at line 179 of file njn_matrix.hpp.

References assert, i, and relApprox().

◆ SetToIdentity()

template<typename T >
void Matrix< T >::SetToIdentity ( void  )
inline

Definition at line 181 of file vector_math.hpp.

References Matrix< T >::m.

Referenced by RigidBodyFit().

◆ setValue()

template<typename T >
virtual T& Matrix< T >::setValue ( )
inlinevirtual

Definition at line 92 of file njn_matrix.hpp.

References Matrix< T >::d_value.

Member Data Documentation

◆ d_m

template<typename T >
size_t Matrix< T >::d_m
private

Definition at line 101 of file njn_matrix.hpp.

Referenced by Matrix< T >::getM().

◆ d_matrix_p

template<typename T >
T** Matrix< T >::d_matrix_p
private

Definition at line 103 of file njn_matrix.hpp.

Referenced by Matrix< T >::getMatrix().

◆ d_n

template<typename T >
size_t Matrix< T >::d_n
private

Definition at line 102 of file njn_matrix.hpp.

Referenced by Matrix< T >::getN().

◆ d_value

template<typename T >
T Matrix< T >::d_value
private

Definition at line 104 of file njn_matrix.hpp.

Referenced by Matrix< T >::getValue(), and Matrix< T >::setValue().

◆ grid

template<typename T >
Grid Matrix< T >::grid

Definition at line 68 of file block_align.cpp.

◆ m

template<typename T >
double Matrix< T >::m[16]

The documentation for this class was generated from the following files:
Modified on Fri Apr 26 16:22:29 2024 by modify_doxy.py rev. 669887