MatrixRow< T > Class Template Reference

#include <matrix.h>

Public Member Functions

T & operator[] (int i)
 
const T & operator[] (int i) const
 
int size () const
 
void print (ostream &os) const
 
bool is_zero (int from=0) const
 
int size_nz () const
 
void fill (long value)
 
void add (const MatrixRow< T > &v)
 
void add (const MatrixRow< T > &v, int n)
 
void sub (const MatrixRow< T > &v)
 
void sub (const MatrixRow< T > &v, int n)
 
void mul (const MatrixRow< T > &v, int b, int n, T x)
 
void div (const MatrixRow< T > &v, int b, int n, T x)
 
void addmul (const MatrixRow< T > &v, T x)
 
void addmul (const MatrixRow< T > &v, T x, int n)
 
void addmul (const MatrixRow< T > &v, T x, int b, int n)
 
void addmul_2exp (const MatrixRow< T > &v, const T &x, long expo, T &tmp)
 
void addmul_2exp (const MatrixRow< T > &v, const T &x, long expo, int, T &tmp)
 
void addmul_si (const MatrixRow< T > &v, long x)
 
void addmul_si (const MatrixRow< T > &v, long x, int n)
 
void addmul_si_2exp (const MatrixRow< T > &v, long x, long expo, T &tmp)
 
void addmul_si_2exp (const MatrixRow< T > &v, long x, long expo, int n, T &tmp)
 
void dot_product (T &result, const MatrixRow< T > &v0, int beg, int n) const
 
void dot_product (T &result, const MatrixRow< T > &v0, int n) const
 
void dot_product (T &result, const MatrixRow< T > &v0) const
 

Friends

class Matrix< T >
 

Detailed Description

template<class T>
class MatrixRow< T >

MatrixRow stores a reference to a row of a Matrix. It supports a subset of operations available on vectors.

Member Function Documentation

◆ add() [1/2]

template<class T >
void MatrixRow< T >::add ( const MatrixRow< T > &  v)
inline

◆ add() [2/2]

template<class T >
void MatrixRow< T >::add ( const MatrixRow< T > &  v,
int  n 
)
inline

◆ addmul() [1/3]

template<class T >
void MatrixRow< T >::addmul ( const MatrixRow< T > &  v,
x 
)
inline

◆ addmul() [2/3]

template<class T >
void MatrixRow< T >::addmul ( const MatrixRow< T > &  v,
x,
int  b,
int  n 
)
inline

◆ addmul() [3/3]

template<class T >
void MatrixRow< T >::addmul ( const MatrixRow< T > &  v,
x,
int  n 
)
inline

◆ addmul_2exp() [1/2]

template<class T >
void MatrixRow< T >::addmul_2exp ( const MatrixRow< T > &  v,
const T &  x,
long  expo,
int  ,
T &  tmp 
)
inline

◆ addmul_2exp() [2/2]

template<class T >
void MatrixRow< T >::addmul_2exp ( const MatrixRow< T > &  v,
const T &  x,
long  expo,
T &  tmp 
)
inline

◆ addmul_si() [1/2]

template<class T >
void MatrixRow< T >::addmul_si ( const MatrixRow< T > &  v,
long  x 
)
inline

◆ addmul_si() [2/2]

template<class T >
void MatrixRow< T >::addmul_si ( const MatrixRow< T > &  v,
long  x,
int  n 
)
inline

◆ addmul_si_2exp() [1/2]

template<class T >
void MatrixRow< T >::addmul_si_2exp ( const MatrixRow< T > &  v,
long  x,
long  expo,
int  n,
T &  tmp 
)
inline

◆ addmul_si_2exp() [2/2]

template<class T >
void MatrixRow< T >::addmul_si_2exp ( const MatrixRow< T > &  v,
long  x,
long  expo,
T &  tmp 
)
inline

◆ div()

template<class T >
void MatrixRow< T >::div ( const MatrixRow< T > &  v,
int  b,
int  n,
x 
)
inline

◆ dot_product() [1/3]

template<class T >
void MatrixRow< T >::dot_product ( T &  result,
const MatrixRow< T > &  v0 
) const
inline

Computes the truncated dot product between two rows of a Matrix

◆ dot_product() [2/3]

template<class T >
void MatrixRow< T >::dot_product ( T &  result,
const MatrixRow< T > &  v0,
int  beg,
int  n 
) const
inline

Computes the truncated dot product between two rows of a Matrix. Constraint: n > beg.

◆ dot_product() [3/3]

template<class T >
void MatrixRow< T >::dot_product ( T &  result,
const MatrixRow< T > &  v0,
int  n 
) const
inline

Computes the dot product between two rows of a Matrix

◆ fill()

template<class T >
void MatrixRow< T >::fill ( long  value)
inline

◆ is_zero()

template<class T >
bool MatrixRow< T >::is_zero ( int  from = 0) const
inline

◆ mul()

template<class T >
void MatrixRow< T >::mul ( const MatrixRow< T > &  v,
int  b,
int  n,
x 
)
inline

◆ operator[]() [1/2]

template<class T >
T & MatrixRow< T >::operator[] ( int  i)
inline

Returns a reference to the i-th element of this row.

◆ operator[]() [2/2]

template<class T >
const T & MatrixRow< T >::operator[] ( int  i) const
inline

Returns a const reference to the i-th element of this row on constant objects.

◆ print()

template<class T >
void MatrixRow< T >::print ( ostream &  os) const
inline

Prints this object on stream os.

◆ size()

template<class T >
int MatrixRow< T >::size ( ) const
inline

Returns the number of columns.

◆ size_nz()

template<class T >
int MatrixRow< T >::size_nz ( ) const
inline

◆ sub() [1/2]

template<class T >
void MatrixRow< T >::sub ( const MatrixRow< T > &  v)
inline

◆ sub() [2/2]

template<class T >
void MatrixRow< T >::sub ( const MatrixRow< T > &  v,
int  n 
)
inline

Friends And Related Function Documentation

◆ Matrix< T >

template<class T >
friend class Matrix< T >
friend

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