20 #ifndef __SNLINE_H__64621__ 21 #define __SNLINE_H__64621__ 28 template <
class T,
unsigned int tp_size>
39 template <
class T,
unsigned int tp_size>
44 std::array<T,tp_size>
data;
49 SNline(
const std::array<T,tp_size>&);
51 template <
class U,
class V,
unsigned int s>
53 template <
class U,
unsigned int s>
55 template <
class V,
unsigned int s>
56 friend std::ostream& operator<<(std::ostream&, const SNline<V,s>&);
62 T&
at(
const unsigned int i);
64 T
get(
const unsigned int i)
const;
79 template <
class T,
unsigned int tp_size>
83 for (
m_num c=0;c<tp_size;++c)
90 template <
class T,
unsigned int tp_size>
95 template <
class U,
class V,
unsigned int s>
103 template <
class U,
unsigned int s>
108 for (
unsigned int c=0;c<s;c++)
110 ans.
at(c)=m*v.
get(c);
115 template <
class V,
unsigned int s>
116 std::ostream& operator<<(std::ostream& stream, const SNline<V,s>&
line)
118 for (
unsigned int c=0;c<s;c++)
120 stream<<
line.get(c)<<
",";
127 template <
class T,
unsigned int tp_size>
132 std::cout<<
"This SNline has size "<<tp_size<<
". Attempt to access element "<<i<<
" ."<<std::endl;
137 template <
class T,
unsigned int tp_size>
142 std::cout<<
"This SNline has size "<<tp_size<<
". Attempt to access element "<<i<<
" ."<<std::endl;
150 template <
class T,
unsigned int tp_size>
157 for (
unsigned int col=0;col<tp_size;col++)
167 template <
class T,
unsigned int tp_size>
173 const T m =
get(col);
175 for (
unsigned int c=col+1;c<tp_size;c++)
friend class GaussTest
Definition: SNline.h:42
Represent a square numerical matrix.
Definition: SNline.h:29
T & at(const unsigned int i)
Definition: SNline.h:128
T get(const unsigned int i) const
Definition: SNline.h:138
virtual T get(const m_num, const m_num) const final
Definition: SNgeneric.h:211
friend SNline< U, s > operator*(const U m, const SNline< U, s > &)
Definition: SNline.h:104
unsigned int line
Definition: SNline.h:45
void makeUnit()
Definition: SNline.h:168
SNline(unsigned int line, SNmatrix< T, tp_size > &snmatrix)
Definition: SNline.h:80
std::array< T, tp_size > data
Definition: SNline.h:44
unsigned int firstNonZeroColumn() const
Definition: SNline.h:151
friend bool operator==(const SNline< U, s > &, const SNline< V, s > &)
Definition: SNline.h:96