DMRITool  v0.1.1-139-g860d86b4
Diffusion MRI Tool
Public Member Functions | Private Member Functions | Private Attributes | List of all members
spams::ShiftMatrix< T > Class Template Reference

#include <linalg.h>

+ Inheritance diagram for spams::ShiftMatrix< T >:
+ Collaboration diagram for spams::ShiftMatrix< T >:

Detailed Description

template<typename T>
class spams::ShiftMatrix< T >

Matrix with shifts.

Definition at line 5248 of file linalg.h.

Public Member Functions

virtual void copyRow (const int i, Vector< T > &x) const
 
virtual void copyTo (Matrix< T > &copy) const
 
virtual T dot (const Matrix< T > &x) const
 
int m () const
 
virtual void mult (const SpVector< T > &x, Vector< T > &b, const T alpha=1.0, const T beta=0.0) const
 
virtual void mult (const Vector< T > &x, Vector< T > &b, const T alpha=1.0, const T beta=0.0) const
 
virtual void mult (const Matrix< T > &B, Matrix< T > &C, const bool transA=false, const bool transB=false, const T a=1.0, const T b=0.0) const
 
virtual void mult (const SpMatrix< T > &B, Matrix< T > &C, const bool transA=false, const bool transB=false, const T a=1.0, const T b=0.0) const
 
virtual void multSwitch (const Matrix< T > &B, Matrix< T > &C, const bool transA=false, const bool transB=false, const T a=1.0, const T b=0.0) const
 
void multTrans (const Vector< T > &x, Vector< T > &b, const T alpha=1.0, const T beta=0.0) const
 
int n () const
 
virtual void print (const string &name) const
 
 ShiftMatrix (const AbstractMatrixB< T > &inputmatrix, const int shifts, const bool center=false)
 
virtual void XtX (Matrix< T > &XtX) const
 
virtual ~ShiftMatrix ()
 
- Public Member Functions inherited from spams::AbstractMatrixB< T >
virtual ~AbstractMatrixB ()
 

Private Member Functions

void center ()
 

Private Attributes

bool _centered
 
const AbstractMatrixB< T > * _inputmatrix
 
int _m
 
Vector< T > _means
 
int _n
 
int _shifts
 

Constructor & Destructor Documentation

template<typename T >
spams::ShiftMatrix< T >::ShiftMatrix ( const AbstractMatrixB< T > &  inputmatrix,
const int  shifts,
const bool  center = false 
)
inline

Definition at line 5250 of file linalg.h.

template<typename T >
virtual spams::ShiftMatrix< T >::~ShiftMatrix ( )
inlinevirtual

Definition at line 5293 of file linalg.h.

Member Function Documentation

template<typename T >
void spams::ShiftMatrix< T >::center ( )
inlineprivate

Definition at line 5296 of file linalg.h.

References spams::Vector< T >::set().

+ Here is the call graph for this function:

template<typename T >
void spams::ShiftMatrix< T >::copyRow ( const int  i,
Vector< T > &  x 
) const
virtual

Implements spams::AbstractMatrixB< T >.

Definition at line 5406 of file linalg.h.

References spams::Vector< T >::rawX(), spams::Vector< T >::setData(), and spams::Vector< T >::sub().

+ Here is the call graph for this function:

template<typename T >
void spams::ShiftMatrix< T >::copyTo ( Matrix< T > &  copy) const
virtual

Implements spams::AbstractMatrixB< T >.

Definition at line 5416 of file linalg.h.

template<typename T >
T spams::ShiftMatrix< T >::dot ( const Matrix< T > &  x) const
virtual

Implements spams::AbstractMatrixB< T >.

Definition at line 5421 of file linalg.h.

template<typename T >
int spams::ShiftMatrix< T >::m ( ) const
inlinevirtual

Implements spams::AbstractMatrixB< T >.

Definition at line 5256 of file linalg.h.

References spams::SpVector< T >::dot(), and spams::SpVector< T >::print().

+ Here is the call graph for this function:

template<typename T >
void spams::ShiftMatrix< T >::mult ( const SpVector< T > &  x,
Vector< T > &  b,
const T  alpha = 1.0,
const T  beta = 0.0 
) const
virtual
template<typename T >
void spams::ShiftMatrix< T >::mult ( const Vector< T > &  x,
Vector< T > &  b,
const T  alpha = 1.0,
const T  beta = 0.0 
) const
virtual

perform b = alpha*A*x + beta*b, when x is sparse

Implements spams::AbstractMatrixB< T >.

Definition at line 5360 of file linalg.h.

References spams::Vector< T >::add(), spams::Vector< T >::rawX(), spams::Vector< T >::resize(), spams::Vector< T >::scal(), spams::Vector< T >::setData(), and spams::Vector< T >::setZeros().

+ Here is the call graph for this function:

template<typename T >
void spams::ShiftMatrix< T >::mult ( const Matrix< T > &  B,
Matrix< T > &  C,
const bool  transA = false,
const bool  transB = false,
const T  a = 1.0,
const T  b = 0.0 
) const
virtual

perform C = a*A*B + b*C, possibly transposing A or B.

Implements spams::AbstractMatrixB< T >.

Definition at line 5384 of file linalg.h.

template<typename T >
void spams::ShiftMatrix< T >::mult ( const SpMatrix< T > &  B,
Matrix< T > &  C,
const bool  transA = false,
const bool  transB = false,
const T  a = 1.0,
const T  b = 0.0 
) const
virtual

Implements spams::AbstractMatrixB< T >.

Definition at line 5390 of file linalg.h.

template<typename T >
void spams::ShiftMatrix< T >::multSwitch ( const Matrix< T > &  B,
Matrix< T > &  C,
const bool  transA = false,
const bool  transB = false,
const T  a = 1.0,
const T  b = 0.0 
) const
virtual

perform C = a*B*A + b*C, possibly transposing A or B.

Implements spams::AbstractMatrixB< T >.

Definition at line 5396 of file linalg.h.

template<typename T >
void spams::ShiftMatrix< T >::multTrans ( const Vector< T > &  x,
Vector< T > &  b,
const T  alpha = 1.0,
const T  beta = 0.0 
) const
virtual
template<typename T >
int spams::ShiftMatrix< T >::n ( ) const
inlinevirtual

Implements spams::AbstractMatrixB< T >.

Definition at line 5255 of file linalg.h.

template<typename T >
void spams::ShiftMatrix< T >::print ( const string &  name) const
virtual

Implements spams::AbstractMatrixB< T >.

Definition at line 5426 of file linalg.h.

template<typename T >
void spams::ShiftMatrix< T >::XtX ( Matrix< T > &  XtX) const
virtual

XtX = A'*A.

Implements spams::AbstractMatrixB< T >.

Definition at line 5402 of file linalg.h.

Member Data Documentation

template<typename T >
bool spams::ShiftMatrix< T >::_centered
private

Definition at line 5305 of file linalg.h.

template<typename T >
const AbstractMatrixB<T>* spams::ShiftMatrix< T >::_inputmatrix
private

Definition at line 5307 of file linalg.h.

template<typename T >
int spams::ShiftMatrix< T >::_m
private

Definition at line 5300 of file linalg.h.

template<typename T >
Vector<T> spams::ShiftMatrix< T >::_means
private

Definition at line 5306 of file linalg.h.

template<typename T >
int spams::ShiftMatrix< T >::_n
private

Definition at line 5303 of file linalg.h.

template<typename T >
int spams::ShiftMatrix< T >::_shifts
private

Definition at line 5304 of file linalg.h.


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