finitediff
Public Member Functions | Private Attributes | Friends | List of all members
SNline< T, tp_size > Class Template Reference

#include <SNline.h>

Public Member Functions

 SNline (unsigned int line, SNmatrix< T, tp_size > &snmatrix)
 
 SNline (const std::array< T, tp_size > &)
 
T & at (const unsigned int i)
 
get (const unsigned int i) const
 
unsigned int firstNonZeroColumn () const
 
void makeUnit ()
 

Private Attributes

std::array< T, tp_size > data
 
unsigned int line
 

Friends

template<class U , class V , unsigned int s>
bool operator== (const SNline< U, s > &, const SNline< V, s > &)
 
template<class U , unsigned int s>
SNline< U, s > operator* (const U m, const SNline< U, s > &)
 
template<class V , unsigned int s>
std::ostream & operator<< (std::ostream &, const SNline< V, s > &)
 

Constructor & Destructor Documentation

template<class T , unsigned int tp_size>
SNline< T, tp_size >::SNline ( unsigned int  line,
SNmatrix< T, tp_size > &  snmatrix 
)
template<class T , unsigned int tp_size>
SNline< T, tp_size >::SNline ( const std::array< T, tp_size > &  ar)

Member Function Documentation

template<class T , unsigned int tp_size>
T & SNline< T, tp_size >::at ( const unsigned int  i)

return by reference the value of the ith element on the line Useful for populating the line.

template<class T , unsigned int tp_size>
unsigned int SNline< T, tp_size >::firstNonZeroColumn ( ) const

return the number of the first non-zero element in the line.

template<class T , unsigned int tp_size>
T SNline< T, tp_size >::get ( const unsigned int  i) const

Return by value the value of the ith element on the line

template<class T , unsigned int tp_size>
void SNline< T, tp_size >::makeUnit ( )

divide all the elements by the first non-zero element. So the line becomes (0,0,1, blah ) the original matrix is not updated.

Friends And Related Function Documentation

template<class T, unsigned int tp_size>
template<class U , unsigned int s>
SNline<U,s> operator* ( const U  m,
const SNline< U, s > &  v 
)
friend
template<class T, unsigned int tp_size>
template<class V , unsigned int s>
std::ostream& operator<< ( std::ostream &  stream,
const SNline< V, s > &  line 
)
friend
template<class T, unsigned int tp_size>
template<class U , class V , unsigned int s>
bool operator== ( const SNline< U, s > &  A,
const SNline< V, s > &  B 
)
friend

Member Data Documentation

template<class T, unsigned int tp_size>
std::array<T,tp_size> SNline< T, tp_size >::data
private
template<class T, unsigned int tp_size>
unsigned int SNline< T, tp_size >::line
private

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