19 #ifndef __SNMULTIGAUSSIAN_H__105525 20 #define __SNMULTIGAUSSIAN_H__105525 41 template <
class T,
unsigned int tp_size>
145 template <
class U,
unsigned int s>
152 template <
class T,
unsigned int tp_size>
159 template <
class T,
unsigned int tp_size>
166 template <
class T,
unsigned int tp_size>
173 template <
class T,
unsigned int tp_size>
179 for (
m_num l=c+1;l<tp_size;++l)
181 this->
at(l,c)=A.
get(l,c);
190 template <
class T,
unsigned int tp_size>
198 template <
class T,
unsigned int tp_size>
208 template <
class T,
unsigned int tp_size>
214 template <
class T,
unsigned int tp_size>
225 template <
class T,
unsigned int tp_size>
226 template <
class U,
unsigned int s>
230 for (
m_num line=0;line<max_l+1;line++)
232 for (
m_num col=0; col < line ;++col)
234 this->
at(line,col)=other.
get(line,col);
241 template <
class T,
unsigned int tp_size>
247 throw ProbablyNotWhatYouWantException(
"You are trying to multiply a multi-Gaussian matrix by a gaussian matrix whose column is not the next one. This is mathematically possible, but probably not what you want. However; this situation is not yet implemented.");
259 template <
class T,
unsigned int tp_size>
267 for (
m_num line=col+1;line<tp_size;++line)
270 for (
m_num k=col;k<line;++k)
272 acc+=this->
get(line,k)*ans.get(k,col);
274 ans.at(line,col)= - acc;
281 template <
class T,
unsigned int tp_size>
290 std::swap( this->
at(i,col),this->
at(j,col) );
309 template <
class T,
unsigned int tp_size>
330 template <
class T,
unsigned int tp_size>
341 template <
class T,
unsigned int tp_size>
346 throw NotInitializedMemberException(
"You are trying to populate a 'SNmultiGaussian' before to initialize the member 'data_last_column'. Use setLastColumn().");
bool special
Definition: SNgeneric.h:130
virtual T & at(const m_num, const m_num) final
Definition: SNgeneric.h:218
Definition: SNgaussian.h:61
void checkSizeCompatibility(const SNgeneric< U, s > &A, const SNgeneric< V, t > &B)
Definition: MathUtilities.h:35
T _get(m_num, m_num) const override
Definition: SNmultiGaussian.h:331
T & _at(m_num, m_num) override
Definition: SNmultiGaussian.h:342
This is the base class for the other matrices types.
Definition: MathUtilities.h:32
m_num getLastColumn() const
Definition: SNmultiGaussian.h:209
SNmultiGaussian< T, tp_size > & operator=(SNmultiGaussian< T, tp_size >)
Definition: SNmultiGaussian.h:199
void setLastColumn(const m_num &lc)
Set the number of the last non trivial column.
Definition: SNmultiGaussian.h:215
Definition: SNidentity.h:28
SNgaussian< T, tp_size > getGaussian(const m_num c) const
Definition: SNgeneric.h:229
Definition: SNmultiGaussian.h:42
SpecialValue< T > checkForSpecialElements(const m_num &, const m_num &) const
Definition: SNmultiGaussian.h:310
virtual T get(const m_num, const m_num) const final
Definition: SNgeneric.h:211
Definition: SNgaussian.h:38
SNmultiGaussian()
Definition: SNmultiGaussian.h:153
m_num getColumn() const
Definition: SNgaussian.h:144
void setFirstLines(const SNgeneric< U, s > &other, const m_num max_l)
copies the first max_l lines from other to this.
Definition: SNmultiGaussian.h:228
Definition: SNexceptions.cpp:224
T value
Definition: SNgeneric.h:129
void swap(SNmultiGaussian< T, tp_size > &)
Definition: SNmultiGaussian.h:191
m_num data_last_column
Definition: SNmultiGaussian.h:47
Represents a lower triangular matrix (the diagonal can be non zero).
Definition: SNlowerTriangular.h:37
Definition: SNexceptions.cpp:119
SNlowerTriangular< T, tp_size > data_L
Definition: SNmultiGaussian.h:46
Definition: SNexceptions.cpp:104
void swap(m_num &other)
Definition: m_num.cpp:39
void swapLines(const m_num &i, const m_num &j)
Definition: SNmultiGaussian.h:282
void operator*=(const SNgaussian< T, tp_size > &other)
Definition: SNmultiGaussian.h:242
SNmultiGaussian< T, tp_size > inverse() const
Definition: SNmultiGaussian.h:260
Definition: SNexceptions.cpp:81