21 #ifndef SELDON_FILE_MATRIX_COMPLEXSPARSE_INLINE_CXX
23 #include "Matrix_ComplexSparse.hxx"
34 template <
class T,
class Prop,
class Storage,
class Allocator>
54 template <
class T,
class Prop,
class Storage,
class Allocator>
57 return real_nz_ + imag_nz_;
68 template <
class T,
class Prop,
class Storage,
class Allocator>
71 return real_nz_ + imag_nz_;
80 template <
class T,
class Prop,
class Storage,
class Allocator>
92 template <
class T,
class Prop,
class Storage,
class Allocator>
107 template <
class T,
class Prop,
class Storage,
class Allocator>
123 template <
class T,
class Prop,
class Storage,
class Allocator>
134 template <
class T,
class Prop,
class Storage,
class Allocator>
138 return (Storage::GetFirst(this->m_, this->n_) + 1);
146 template <
class T,
class Prop,
class Storage,
class Allocator>
150 return (Storage::GetFirst(this->m_, this->n_) + 1);
165 template <
class T,
class Prop,
class Storage,
class Allocator>
184 template <
class T,
class Prop,
class Storage,
class Allocator>
203 template <
class T,
class Prop,
class Storage,
class Allocator>
222 template <
class T,
class Prop,
class Storage,
class Allocator>
234 template <
class T,
class Prop,
class Storage,
class Allocator>
235 inline typename Allocator::value_type*
246 template <
class T,
class Prop,
class Storage,
class Allocator>
247 inline typename Allocator::value_type*
267 template <
class T,
class Prop,
class Storage,
class Allocator>
272 return ValReal(i, j);
284 template <
class T,
class Prop,
class Storage,
class Allocator>
289 return ValImag(i, j);
301 template <
class T,
class Prop,
class Storage,
class Allocator>
305 if (real(val) != value_type(0))
306 GetReal(i, j) += real(val);
308 if (imag(val) != value_type(0))
309 GetImag(i, j) += imag(val);
314 template <
class T,
class Prop,
class Storage,
class Allocator>
319 throw Undefined(
"AddInteractionRow",
"Not implemented");
329 template <
class T,
class Prop,
class Storage,
class Allocator>
331 ::Set(
int i,
int j,
const entry_type& val)
333 GetReal(i, j) = real(val);
334 GetImag(i, j) = imag(val);
344 template <
class T,
class Prop,
class Storage,
class Allocator>
355 #ifdef SELDON_WITH_VIRTUAL
356 template <
class T,
class Prop,
class Storage,
class Allocator>
359 const typename ClassComplexType<T>::Treal& omega,
360 int nb_iter,
int stage_ssor)
const
363 x, r, omega, nb_iter, stage_ssor);
366 template <
class T,
class Prop,
class Storage,
class Allocator>
367 inline void Matrix_ComplexSparse<T, Prop, Storage, Allocator>
368 ::ApplySor(
const SeldonTranspose& trans, Vector<Tcplx>& x,
const Vector<Tcplx>& r,
369 const typename ClassComplexType<T>::Treal& omega,
370 int nb_iter,
int stage_ssor)
const
373 static_cast<const Matrix<T, Prop, Storage, Allocator>&
>(*
this),
374 x, r, omega, nb_iter, stage_ssor);
377 template <
class T,
class Prop,
class Storage,
class Allocator>
378 inline void Matrix_ComplexSparse<T, Prop, Storage, Allocator>
379 ::MltAddVector(
const Treal& alpha,
const Vector<Treal>& x,
380 const Treal& beta, Vector<Treal>& y)
const
382 cout <<
"Not defined for real numbers" << endl;
386 template <
class T,
class Prop,
class Storage,
class Allocator>
387 inline void Matrix_ComplexSparse<T, Prop, Storage, Allocator>
388 ::MltAddVector(
const Tcplx& alpha,
const Vector<Tcplx>& x,
389 const Tcplx& beta, Vector<Tcplx>& y)
const
392 static_cast<const Matrix<T, Prop, Storage, Allocator>&
>(*
this),
396 template <
class T,
class Prop,
class Storage,
class Allocator>
397 inline void Matrix_ComplexSparse<T, Prop, Storage, Allocator>
398 ::MltAddVector(
const Treal& alpha,
const SeldonTranspose& trans,
399 const Vector<Treal>& x,
400 const Treal& beta, Vector<Treal>& y)
const
402 cout <<
"Not defined for real numbers" << endl;
406 template <
class T,
class Prop,
class Storage,
class Allocator>
407 inline void Matrix_ComplexSparse<T, Prop, Storage, Allocator>
408 ::MltAddVector(
const Tcplx& alpha,
const SeldonTranspose& trans,
409 const Vector<Tcplx>& x,
410 const Tcplx& beta, Vector<Tcplx>& y)
const
413 static_cast<const Matrix<T, Prop, Storage, Allocator>&
>(*
this),
417 template <
class T,
class Prop,
class Storage,
class Allocator>
418 inline void Matrix_ComplexSparse<T, Prop, Storage, Allocator>
419 ::MltVector(
const Vector<Treal>& x, Vector<Treal>& y)
const
421 cout <<
"Not defined for real numbers" << endl;
425 template <
class T,
class Prop,
class Storage,
class Allocator>
426 inline void Matrix_ComplexSparse<T, Prop, Storage, Allocator>
427 ::MltVector(
const Vector<Tcplx>& x, Vector<Tcplx>& y)
const
429 Mlt(
static_cast<const Matrix<T, Prop, Storage, Allocator>&
>(*
this), x, y);
432 template <
class T,
class Prop,
class Storage,
class Allocator>
433 inline void Matrix_ComplexSparse<T, Prop, Storage, Allocator>
434 ::MltVector(
const SeldonTranspose& trans,
435 const Vector<Treal>& x, Vector<Treal>& y)
const
437 cout <<
"Not defined for real numbers" << endl;
441 template <
class T,
class Prop,
class Storage,
class Allocator>
442 inline void Matrix_ComplexSparse<T, Prop, Storage, Allocator>
443 ::MltVector(
const SeldonTranspose& trans,
444 const Vector<Tcplx>& x, Vector<Tcplx>& y)
const
447 static_cast<const Matrix<T, Prop, Storage, Allocator>&
>(*
this), x, y);
450 template <
class T,
class Prop,
class Storage,
class Allocator>
451 inline bool Matrix_ComplexSparse<T, Prop, Storage, Allocator>
452 ::IsSymmetric()
const
472 template <
class T,
class Prop,
class Allocator>
484 template <
class T,
class Prop,
class Allocator>
500 template <
class T,
class Prop,
class Allocator>
530 template <
class T,
class Prop,
class Allocator>
531 template <
class Storage0,
class Allocator0,
532 class Storage1,
class Allocator1,
533 class Storage2,
class Allocator2>
567 template <
class T,
class Prop,
class Allocator>
579 template <
class T,
class Prop,
class Allocator>
inline
594 template <
class T,
class Prop,
class Allocator>
inline
624 template <
class T,
class Prop,
class Allocator>
625 template <
class Storage0,
class Allocator0,
626 class Storage1,
class Allocator1,
627 class Storage2,
class Allocator2>
649 #define SELDON_FILE_MATRIX_COMPLEXSPARSE_INLINE_CXX