21 #ifndef SELDON_FILE_MATRIX_TRIANGULAR_INLINE_CXX
23 #include "Matrix_Triangular.hxx"
38 template <
class T,
class Prop,
class Storage,
class Allocator>
52 template <
class T,
class Prop,
class Storage,
class Allocator>
71 template <
class T,
class Prop,
class Storage,
class Allocator>
74 return long(this->m_) * long(this->n_);
79 template <
class T,
class Prop,
class Storage,
class Allocator>
82 size_t taille =
sizeof(*this) + size_t(GetDataSize())*
sizeof(T);
83 taille +=
sizeof(pointer)*this->m_;
100 template <
class T,
class Prop,
class Storage,
class Allocator>
101 inline const typename
102 Matrix_Triangular<T, Prop, Storage, Allocator>::value_type
107 #ifdef SELDON_CHECK_BOUNDS
108 CheckBounds(i, j, this->m_, this->n_,
"Matrix_Triangular");
112 SetComplexZero(zero);
119 return me_[Storage::GetFirst(i, j)][Storage::GetSecond(i, j)];
126 return me_[Storage::GetFirst(i, j)][Storage::GetSecond(i, j)];
141 template <
class T,
class Prop,
class Storage,
class Allocator>
147 #ifdef SELDON_CHECK_BOUNDS
148 CheckBoundsTriang(i, j, this->m_, this->n_,
149 Storage::UpLo(),
"Matrix_Triangular");
152 return me_[Storage::GetFirst(i, j)][Storage::GetSecond(i, j)];
166 template <
class T,
class Prop,
class Storage,
class Allocator>
167 inline typename Matrix_Triangular<T, Prop, Storage, Allocator>::reference
171 #ifdef SELDON_CHECK_BOUNDS
172 CheckBoundsTriang(i, j, this->m_, this->n_,
173 Storage::UpLo(),
"Matrix_Triangular");
176 return me_[Storage::GetFirst(i, j)][Storage::GetSecond(i, j)];
187 template <
class T,
class Prop,
class Storage,
class Allocator>
192 return this->Val(i, j);
203 template <
class T,
class Prop,
class Storage,
class Allocator>
204 inline typename Matrix_Triangular<T, Prop, Storage, Allocator>::reference
207 return this->Val(i, j);
217 template <
class T,
class Prop,
class Storage,
class Allocator>
218 inline typename Matrix_Triangular<T, Prop, Storage, Allocator>::reference
222 #ifdef SELDON_CHECK_BOUNDS
223 CheckBounds(i, this->GetDataSize(),
"Matrix_Triangular");
226 return this->data_[i];
236 template <
class T,
class Prop,
class Storage,
class Allocator>
242 #ifdef SELDON_CHECK_BOUNDS
243 CheckBounds(i, this->GetDataSize(),
"Matrix_Triangular");
246 return this->data_[i];
256 template <
class T,
class Prop,
class Storage,
class Allocator>
273 template <
class T,
class Prop,
class Storage,
class Allocator>
287 template <
class T,
class Prop,
class Storage,
class Allocator>
291 this->Reallocate(A.
GetM(), A.
GetN());
293 Allocator::memorycpy(this->data_, A.
GetData(), this->GetDataSize());
297 #ifdef SELDON_WITH_VIRTUAL
298 template <
class T,
class Prop,
class Storage,
class Allocator>
308 template <
class T,
class Prop,
class Storage,
class Allocator>
309 inline void Matrix_Triangular<T, Prop, Storage, Allocator>
310 ::MltAddVector(
const Tcplx& alpha,
const Vector<Tcplx>& x,
311 const Tcplx& beta, Vector<Tcplx>& y)
const
314 static_cast<const Matrix<T, Prop, Storage, Allocator>&
>(*
this),
318 template <
class T,
class Prop,
class Storage,
class Allocator>
319 inline void Matrix_Triangular<T, Prop, Storage, Allocator>
320 ::MltAddVector(
const Treal& alpha,
const SeldonTranspose& trans,
321 const Vector<Treal>& x,
322 const Treal& beta, Vector<Treal>& y)
const
325 static_cast<const Matrix<T, Prop, Storage, Allocator>&
>(*
this),
329 template <
class T,
class Prop,
class Storage,
class Allocator>
330 inline void Matrix_Triangular<T, Prop, Storage, Allocator>
331 ::MltAddVector(
const Tcplx& alpha,
const SeldonTranspose& trans,
332 const Vector<Tcplx>& x,
333 const Tcplx& beta, Vector<Tcplx>& y)
const
336 static_cast<const Matrix<T, Prop, Storage, Allocator>&
>(*
this),
340 template <
class T,
class Prop,
class Storage,
class Allocator>
341 inline void Matrix_Triangular<T, Prop, Storage, Allocator>
342 ::MltVector(
const Vector<Treal>& x, Vector<Treal>& y)
const
344 Mlt(
static_cast<const Matrix<T, Prop, Storage, Allocator>&
>(*
this), x, y);
347 template <
class T,
class Prop,
class Storage,
class Allocator>
348 inline void Matrix_Triangular<T, Prop, Storage, Allocator>
349 ::MltVector(
const Vector<Tcplx>& x, Vector<Tcplx>& y)
const
351 Mlt(
static_cast<const Matrix<T, Prop, Storage, Allocator>&
>(*
this), x, y);
354 template <
class T,
class Prop,
class Storage,
class Allocator>
355 inline void Matrix_Triangular<T, Prop, Storage, Allocator>
356 ::MltVector(
const SeldonTranspose& trans,
357 const Vector<Treal>& x, Vector<Treal>& y)
const
360 static_cast<const Matrix<T, Prop, Storage, Allocator>&
>(*
this), x, y);
363 template <
class T,
class Prop,
class Storage,
class Allocator>
364 inline void Matrix_Triangular<T, Prop, Storage, Allocator>
365 ::MltVector(
const SeldonTranspose& trans,
366 const Vector<Tcplx>& x, Vector<Tcplx>& y)
const
369 static_cast<const Matrix<T, Prop, Storage, Allocator>&
>(*
this), x, y);
372 template <
class T,
class Prop,
class Storage,
class Allocator>
373 inline bool Matrix_Triangular<T, Prop, Storage, Allocator>
374 ::IsSymmetric()
const
395 template <
class T,
class Prop,
class Allocator>
407 template <
class T,
class Prop,
class Allocator>
424 template <
class T,
class Prop,
class Allocator>
441 template <
class T,
class Prop,
class Allocator>
455 template <
class T,
class Prop,
class Allocator>
460 for (
long i = 0; i < this->GetDataSize();i++)
482 template <
class T,
class Prop,
class Allocator>
494 template <
class T,
class Prop,
class Allocator>
511 template <
class T,
class Prop,
class Allocator>
528 template <
class T,
class Prop,
class Allocator>
542 template <
class T,
class Prop,
class Allocator>
547 for (
long i = 0; i < this->GetDataSize();i++)
569 template <
class T,
class Prop,
class Allocator>
581 template <
class T,
class Prop,
class Allocator>
598 template <
class T,
class Prop,
class Allocator>
615 template <
class T,
class Prop,
class Allocator>
629 template <
class T,
class Prop,
class Allocator>
634 for (
long i = 0; i < this->GetDataSize();i++)
656 template <
class T,
class Prop,
class Allocator>
668 template <
class T,
class Prop,
class Allocator>
685 template <
class T,
class Prop,
class Allocator>
702 template <
class T,
class Prop,
class Allocator>
716 template <
class T,
class Prop,
class Allocator>
721 for (
long i = 0; i < this->GetDataSize();i++)
730 #define SELDON_FILE_MATRIX_TRIANGULAR_INLINE_CXX