21 #ifndef SELDON_FILE_MATRIX_ARRAY_COMPLEX_SPARSE_INLINE_CXX
23 #include "Matrix_ArrayComplexSparse.hxx"
38 template <
class T,
class Prop,
class Storage,
class Allocator>
52 template <
class T,
class Prop,
class Storage,
class Allocator>
55 val_real_(Storage::GetFirst(i, j)), val_imag_(Storage::GetFirst(i, j))
66 template <
class T,
class Prop,
class Storage,
class Allocator>
78 template <
class T,
class Prop,
class Storage,
class Allocator>
99 template <
class T,
class Prop,
class Storage,
class Allocator>
103 return (GetRealNonZeros()+GetImagNonZeros());
113 template <
class T,
class Prop,
class Storage,
class Allocator>
117 return GetRealNonZeros();
127 template <
class T,
class Prop,
class Storage,
class Allocator>
131 return GetImagNonZeros();
141 template <
class T,
class Prop,
class Storage,
class Allocator>
145 return (GetRealNonZeros()+GetImagNonZeros());
155 template <
class T,
class Prop,
class Storage,
class Allocator>
159 return val_real_(i).GetIndex();
168 template <
class T,
class Prop,
class Storage,
class Allocator>
169 inline typename Allocator::value_type*
173 return val_real_(i).GetData();
183 template <
class T,
class Prop,
class Storage,
class Allocator>
187 return val_imag_(i).GetIndex();
196 template <
class T,
class Prop,
class Storage,
class Allocator>
197 inline typename Allocator::value_type*
201 return val_imag_(i).GetData();
217 template <
class T,
class Prop,
class Storage,
class Allocator>
218 inline const typename
219 Matrix_ArrayComplexSparse<T, Prop, Storage, Allocator>::entry_type
224 #ifdef SELDON_CHECK_BOUNDS
225 CheckBounds(i, j, this->m_, this->n_,
"Matrix");
228 return entry_type(this->val_real_(Storage::GetFirst(i, j))
229 (Storage::GetSecond(i, j)),
230 this->val_imag_(Storage::GetFirst(i, j))
231 (Storage::GetSecond(i, j)) );
242 template <
class T,
class Prop,
class Storage,
class Allocator>
244 Matrix_ArrayComplexSparse<T, Prop, Storage, Allocator>::entry_type&
248 throw Undefined(
"Matrix_ArrayComplexSparse::Val(int i, int j)");
259 template <
class T,
class Prop,
class Storage,
class Allocator>
260 inline const typename
261 Matrix_ArrayComplexSparse<T, Prop, Storage, Allocator>::entry_type&
265 throw Undefined(
"Matrix_ArrayComplexSparse::Val(int i, int j)");
276 template <
class T,
class Prop,
class Storage,
class Allocator>
278 Matrix_ArrayComplexSparse<T, Prop, Storage, Allocator>::entry_type&
282 throw Undefined(
"Matrix_ArrayComplexSparse::Get(int i, int j)");
293 template <
class T,
class Prop,
class Storage,
class Allocator>
294 inline const typename
295 Matrix_ArrayComplexSparse<T, Prop, Storage, Allocator>::entry_type&
299 throw Undefined(
"Matrix_ArrayComplexSparse::Get(int i, int j)");
309 template <
class T,
class Prop,
class Storage,
class Allocator>
310 inline typename Allocator::value_type&
314 return val_real_(Storage::GetFirst(i, j)).
Val(Storage::GetSecond(i, j));
324 template <
class T,
class Prop,
class Storage,
class Allocator>
325 inline const typename Allocator::value_type&
329 return val_real_(Storage::GetFirst(i, j)).
Val(Storage::GetSecond(i, j));
339 template <
class T,
class Prop,
class Storage,
class Allocator>
340 inline typename Allocator::value_type&
344 return val_imag_(Storage::GetFirst(i, j)).
Val(Storage::GetSecond(i, j));
354 template <
class T,
class Prop,
class Storage,
class Allocator>
355 inline const typename Allocator::value_type&
359 return val_imag_(Storage::GetFirst(i, j)).
Val(Storage::GetSecond(i, j));
369 template <
class T,
class Prop,
class Storage,
class Allocator>
370 inline typename Allocator::value_type&
374 return val_real_(Storage::GetFirst(i, j)).
Get(Storage::GetSecond(i, j));
384 template <
class T,
class Prop,
class Storage,
class Allocator>
385 inline const typename Allocator::value_type&
389 return val_real_(Storage::GetFirst(i, j)).
Get(Storage::GetSecond(i, j));
399 template <
class T,
class Prop,
class Storage,
class Allocator>
400 inline typename Allocator::value_type&
404 return val_imag_(Storage::GetFirst(i, j)).
Get(Storage::GetSecond(i, j));
414 template <
class T,
class Prop,
class Storage,
class Allocator>
415 inline const typename Allocator::value_type&
419 return val_imag_(Storage::GetFirst(i, j)).
Get(Storage::GetSecond(i, j));
429 template <
class T,
class Prop,
class Storage,
class Allocator>
430 inline const typename Allocator::value_type&
435 #ifdef SELDON_CHECK_BOUNDS
436 CheckBounds(i, j, Storage::GetFirst(this->m_, this->n_),
437 this->val_real_(i).GetM(),
"Matrix_ArrayComplexSparse");
440 return val_real_(i).Value(j);
450 template <
class T,
class Prop,
class Storage,
class Allocator>
451 inline typename Allocator::value_type&
456 #ifdef SELDON_CHECK_BOUNDS
457 CheckBounds(i, j, Storage::GetFirst(this->m_, this->n_),
458 this->val_real_(i).GetM(),
"Matrix_ArrayComplexSparse");
461 return val_real_(i).Value(j);
471 template <
class T,
class Prop,
class Storage,
class Allocator>
476 #ifdef SELDON_CHECK_BOUNDS
477 CheckBounds(i, j, Storage::GetFirst(this->m_, this->n_),
478 this->val_real_(i).GetM(),
"Matrix_ArrayComplexSparse");
481 return val_real_(i).Index(j);
491 template <
class T,
class Prop,
class Storage,
class Allocator>
496 #ifdef SELDON_CHECK_BOUNDS
497 CheckBounds(i, j, Storage::GetFirst(this->m_, this->n_),
498 this->val_real_(i).GetM(),
"Matrix_ArrayComplexSparse");
501 return val_real_(i).Index(j);
511 template <
class T,
class Prop,
class Storage,
class Allocator>
512 inline const typename Allocator::value_type&
517 #ifdef SELDON_CHECK_BOUNDS
518 CheckBounds(i, j, Storage::GetFirst(this->m_, this->n_),
519 this->val_imag_(i).GetM(),
"Matrix_ArrayComplexSparse");
522 return val_imag_(i).Value(j);
532 template <
class T,
class Prop,
class Storage,
class Allocator>
533 inline typename Allocator::value_type&
538 #ifdef SELDON_CHECK_BOUNDS
539 CheckBounds(i, j, Storage::GetFirst(this->m_, this->n_),
540 this->val_imag_(i).GetM(),
"Matrix_ArrayComplexSparse");
543 return val_imag_(i).Value(j);
553 template <
class T,
class Prop,
class Storage,
class Allocator>
558 #ifdef SELDON_CHECK_BOUNDS
559 CheckBounds(i, j, Storage::GetFirst(this->m_, this->n_),
560 this->val_imag_(i).GetM(),
"Matrix_ArrayComplexSparse");
563 return val_imag_(i).Index(j);
573 template <
class T,
class Prop,
class Storage,
class Allocator>
578 #ifdef SELDON_CHECK_BOUNDS
579 CheckBounds(i, j, Storage::GetFirst(this->m_, this->n_),
580 this->val_imag_(i).GetM(),
"Matrix_ArrayComplexSparse");
583 return val_imag_(i).Index(j);
594 template <
class T,
class Prop,
class Storage,
class Allocator>
598 val_real_(i).SetData(n, val, ind);
609 template <
class T,
class Prop,
class Storage,
class Allocator>
613 val_imag_(i).SetData(n, val, ind);
622 template <
class T,
class Prop,
class Storage,
class Allocator>
625 val_real_(i).Nullify();
634 template <
class T,
class Prop,
class Storage,
class Allocator>
637 val_imag_(i).Nullify();
647 template <
class T,
class Prop,
class Storage,
class Allocator>
653 val_real_.SetData(Storage::GetFirst(m, n), val);
663 template <
class T,
class Prop,
class Storage,
class Allocator>
669 val_imag_.SetData(Storage::GetFirst(m, n), val);
678 template <
class T,
class Prop,
class Storage,
class Allocator>
692 template <
class T,
class Prop,
class Storage,
class Allocator>
701 #ifdef SELDON_WITH_VIRTUAL
702 template <
class T,
class Prop,
class Storage,
class Allocator>
705 const typename ClassComplexType<T>::Treal& omega,
706 int nb_iter,
int stage_ssor)
const
709 x, r, omega, nb_iter, stage_ssor);
712 template <
class T,
class Prop,
class Storage,
class Allocator>
713 inline void Matrix_ArrayComplexSparse<T, Prop, Storage, Allocator>
714 ::ApplySor(
const SeldonTranspose& trans, Vector<Tcplx>& x,
const Vector<Tcplx>& r,
715 const typename ClassComplexType<T>::Treal& omega,
716 int nb_iter,
int stage_ssor)
const
719 static_cast<const Matrix<T, Prop, Storage, Allocator>&
>(*
this),
720 x, r, omega, nb_iter, stage_ssor);
723 template <
class T,
class Prop,
class Storage,
class Allocator>
724 inline void Matrix_ArrayComplexSparse<T, Prop, Storage, Allocator>
725 ::MltAddVector(
const Treal& alpha,
const Vector<Treal>& x,
726 const Treal& beta, Vector<Treal>& y)
const
728 cout <<
"Not defined for real numbers" << endl;
732 template <
class T,
class Prop,
class Storage,
class Allocator>
733 inline void Matrix_ArrayComplexSparse<T, Prop, Storage, Allocator>
734 ::MltAddVector(
const Tcplx& alpha,
const Vector<Tcplx>& x,
735 const Tcplx& beta, Vector<Tcplx>& y)
const
738 static_cast<const Matrix<T, Prop, Storage, Allocator>&
>(*
this),
742 template <
class T,
class Prop,
class Storage,
class Allocator>
743 inline void Matrix_ArrayComplexSparse<T, Prop, Storage, Allocator>
744 ::MltAddVector(
const Treal& alpha,
const SeldonTranspose& trans,
745 const Vector<Treal>& x,
746 const Treal& beta, Vector<Treal>& y)
const
748 cout <<
"Not defined for real numbers" << endl;
752 template <
class T,
class Prop,
class Storage,
class Allocator>
753 inline void Matrix_ArrayComplexSparse<T, Prop, Storage, Allocator>
754 ::MltAddVector(
const Tcplx& alpha,
const SeldonTranspose& trans,
755 const Vector<Tcplx>& x,
756 const Tcplx& beta, Vector<Tcplx>& y)
const
759 static_cast<const Matrix<T, Prop, Storage, Allocator>&
>(*
this),
763 template <
class T,
class Prop,
class Storage,
class Allocator>
764 inline void Matrix_ArrayComplexSparse<T, Prop, Storage, Allocator>
765 ::MltVector(
const Vector<Treal>& x, Vector<Treal>& y)
const
767 cout <<
"Not defined for real numbers" << endl;
771 template <
class T,
class Prop,
class Storage,
class Allocator>
772 inline void Matrix_ArrayComplexSparse<T, Prop, Storage, Allocator>
773 ::MltVector(
const Vector<Tcplx>& x, Vector<Tcplx>& y)
const
775 Mlt(
static_cast<const Matrix<T, Prop, Storage, Allocator>&
>(*
this), x, y);
778 template <
class T,
class Prop,
class Storage,
class Allocator>
779 inline void Matrix_ArrayComplexSparse<T, Prop, Storage, Allocator>
780 ::MltVector(
const SeldonTranspose& trans,
781 const Vector<Treal>& x, Vector<Treal>& y)
const
783 cout <<
"Not defined for real numbers" << endl;
787 template <
class T,
class Prop,
class Storage,
class Allocator>
788 inline void Matrix_ArrayComplexSparse<T, Prop, Storage, Allocator>
789 ::MltVector(
const SeldonTranspose& trans,
790 const Vector<Tcplx>& x, Vector<Tcplx>& y)
const
793 static_cast<const Matrix<T, Prop, Storage, Allocator>&
>(*
this), x, y);
796 template <
class T,
class Prop,
class Storage,
class Allocator>
797 inline bool Matrix_ArrayComplexSparse<T, Prop, Storage, Allocator>
798 ::IsSymmetric()
const
801 Allocator
>& >(*
this));
815 template <
class T,
class Prop,
class Allocator>
828 template <
class T,
class Prop,
class Allocator>
837 template <
class T,
class Prop,
class Allocator>
841 this->val_real_(i).Clear();
846 template <
class T,
class Prop,
class Allocator>
850 this->val_imag_(i).Clear();
859 template <
class T,
class Prop,
class Alloc>
inline
863 this->val_real_(i).Reallocate(j);
872 template <
class T,
class Prop,
class Alloc>
inline
873 void Matrix<T, Prop, ArrayColComplexSparse, Alloc>
874 ::ReallocateImagColumn(
int i,
int j)
876 this->val_imag_(i).Reallocate(j);
885 template <
class T,
class Prop,
class Allocator>
inline
889 this->val_real_(i).Resize(j);
898 template <
class T,
class Prop,
class Allocator>
inline
902 this->val_imag_(i).Resize(j);
911 template <
class T,
class Prop,
class Allocator>
inline
915 Swap(this->val_real_(i), this->val_real_(j));
924 template <
class T,
class Prop,
class Allocator>
inline
928 Swap(this->val_imag_(i), this->val_imag_(j));
937 template <
class T,
class Prop,
class Allocator>
941 for (
int j = 0; j < this->val_real_(i).GetM(); j++)
942 this->val_real_(i).Index(j) = new_index(j);
951 template <
class T,
class Prop,
class Allocator>
955 for (
int j = 0; j < this->val_imag_(i).GetM(); j++)
956 this->val_imag_(i).Index(j) = new_index(j);
965 template <
class T,
class Prop,
class Allocator>
969 return this->val_real_(i).GetSize();
978 template <
class T,
class Prop,
class Allocator>
982 return this->val_imag_(i).GetSize();
987 template <
class T,
class Prop,
class Allocator>
inline
991 this->val_real_(i).Print();
996 template <
class T,
class Prop,
class Allocator>
inline
1000 this->val_imag_(i).Print();
1010 template <
class T,
class Prop,
class Allocator>
inline
1014 this->val_real_(i).Assemble();
1024 template <
class T,
class Prop,
class Allocator>
inline
1028 this->val_imag_(i).Assemble();
1038 template <
class T,
class Prop,
class Allocator>
1042 if (real(val) != value_type(0))
1043 this->val_real_(j).AddInteraction(i, real(val));
1045 if (imag(val) != value_type(0))
1046 this->val_imag_(j).AddInteraction(i, imag(val));
1059 template <
class T,
class Prop,
class Allocator>
1072 template <
class T,
class Prop,
class Allocator>
1081 template <
class T,
class Prop,
class Allocator>
1085 this->val_real_(i).Clear();
1090 template <
class T,
class Prop,
class Allocator>
1094 this->val_imag_(i).Clear();
1099 template <
class T,
class Prop,
class Allocator>
1114 template <
class T,
class Prop,
class Allocator>
1118 this->val_real_(i).Reallocate(j);
1128 template <
class T,
class Prop,
class Allocator>
1132 this->val_imag_(i).Reallocate(j);
1142 template <
class T,
class Prop,
class Allocator>
inline
1146 this->val_real_(i).Resize(j);
1156 template <
class T,
class Prop,
class Allocator>
inline
1160 this->val_imag_(i).Resize(j);
1169 template <
class T,
class Prop,
class Allocator>
1173 Swap(this->val_real_(i), this->val_real_(j));
1182 template <
class T,
class Prop,
class Allocator>
1186 Swap(this->val_imag_(i), this->val_imag_(j));
1195 template <
class T,
class Prop,
class Allocator>
1199 for (
int j = 0; j < this->val_real_(i).GetM(); j++)
1200 this->val_real_(i).Index(j) = new_index(j);
1209 template <
class T,
class Prop,
class Allocator>
1213 for (
int j = 0; j < this->val_imag_(i).GetM(); j++)
1214 this->val_imag_(i).Index(j) = new_index(j);
1223 template <
class T,
class Prop,
class Allocator>
inline
1227 return this->val_real_(i).GetSize();
1236 template <
class T,
class Prop,
class Allocator>
inline
1240 return this->val_imag_(i).GetSize();
1245 template <
class T,
class Prop,
class Allocator>
inline
1249 this->val_real_(i).Print();
1254 template <
class T,
class Prop,
class Allocator>
inline
1258 this->val_imag_(i).Print();
1268 template <
class T,
class Prop,
class Allocator>
1272 this->val_real_(i).Assemble();
1282 template <
class T,
class Prop,
class Allocator>
1286 this->val_imag_(i).Assemble();
1296 template <
class T,
class Prop,
class Allocator>
1300 if (real(val) != value_type(0))
1301 this->val_real_(i).AddInteraction(j, real(val));
1303 if (imag(val) != value_type(0))
1304 this->val_imag_(i).AddInteraction(j, imag(val));
1317 template <
class T,
class Prop,
class Allocator>
1330 template <
class T,
class Prop,
class Allocator>
1349 template <
class T,
class Prop,
class Allocator>
1350 inline const typename
1355 #ifdef SELDON_CHECK_BOUNDS
1356 CheckBounds(i, j, this->m_, this->n_,
"Matrix");
1360 return entry_type(this->val_real_(j)(i), this->val_imag_(j)(i));
1362 return entry_type(this->val_real_(i)(j), this->val_imag_(i)(j));
1372 template <
class T,
class Prop,
class Allocator>
1373 inline typename Allocator::value_type&
1376 #ifdef SELDON_CHECK_BOUNDS
1377 CheckBounds(i, j, this->m_, this->n_,
"Matrix");
1381 return this->val_real_(i).Val(j);
1383 return this->val_real_(j).Val(i);
1394 template <
class T,
class Prop,
class Allocator>
1395 inline const typename Allocator::value_type&
1399 #ifdef SELDON_CHECK_BOUNDS
1400 CheckBounds(i, j, this->m_, this->n_,
"Matrix");
1404 return this->val_real_(j).Val(i);
1406 return this->val_real_(j).Val(i);
1417 template <
class T,
class Prop,
class Allocator>
1418 inline typename Allocator::value_type&
1421 #ifdef SELDON_CHECK_BOUNDS
1422 CheckBounds(i, j, this->m_, this->n_,
"Matrix");
1426 return this->val_real_(j).Get(i);
1428 return this->val_real_(i).Get(j);
1439 template <
class T,
class Prop,
class Allocator>
1440 inline const typename Allocator::value_type&
1444 #ifdef SELDON_CHECK_BOUNDS
1445 CheckBounds(i, j, this->m_, this->n_,
"Matrix");
1449 return this->val_real_(j).Get(i);
1451 return this->val_real_(i).Get(j);
1462 template <
class T,
class Prop,
class Allocator>
1463 inline typename Allocator::value_type&
1466 #ifdef SELDON_CHECK_BOUNDS
1467 CheckBounds(i, j, this->m_, this->n_,
"Matrix");
1471 return this->val_imag_(i).Val(j);
1473 return this->val_imag_(j).Val(i);
1483 template <
class T,
class Prop,
class Allocator>
1484 inline const typename Allocator::value_type&
1488 #ifdef SELDON_CHECK_BOUNDS
1489 CheckBounds(i, j, this->m_, this->n_,
"Matrix");
1492 return this->val_imag_(i).Val(j);
1494 return this->val_imag_(j).Val(i);
1504 template <
class T,
class Prop,
class Allocator>
1505 inline typename Allocator::value_type&
1508 #ifdef SELDON_CHECK_BOUNDS
1509 CheckBounds(i, j, this->m_, this->n_,
"Matrix");
1513 return this->val_imag_(j).Get(i);
1515 return this->val_imag_(i).Get(j);
1525 template <
class T,
class Prop,
class Allocator>
1526 inline const typename Allocator::value_type&
1530 #ifdef SELDON_CHECK_BOUNDS
1531 CheckBounds(i, j, this->m_, this->n_,
"Matrix");
1535 return this->val_imag_(j).Val(i);
1537 return this->val_imag_(i).Val(j);
1542 template <
class T,
class Prop,
class Allocator>
inline
1545 this->val_real_(i).Clear();
1550 template <
class T,
class Prop,
class Allocator>
inline
1553 this->val_imag_(i).Clear();
1563 template <
class T,
class Prop,
class Allocator>
1567 this->val_real_(i).Reallocate(j);
1577 template <
class T,
class Prop,
class Allocator>
1581 this->val_imag_(i).Reallocate(j);
1590 template <
class T,
class Prop,
class Allocator>
1594 this->val_real_(i).Resize(j);
1603 template <
class T,
class Prop,
class Allocator>
1607 this->val_imag_(i).Resize(j);
1616 template <
class T,
class Prop,
class Allocator>
1620 Swap(this->val_real_(i), this->val_real_(j));
1629 template <
class T,
class Prop,
class Allocator>
1633 Swap(this->val_imag_(i), this->val_imag_(j));
1642 template <
class T,
class Prop,
class Allocator>
1646 for (
int j = 0; j < this->val_real_(i).GetM(); j++)
1647 this->val_real_(i).Index(j) = new_index(j);
1656 template <
class T,
class Prop,
class Allocator>
1660 for (
int j = 0; j < this->val_imag_(i).GetM(); j++)
1661 this->val_imag_(i).Index(j) = new_index(j);
1670 template <
class T,
class Prop,
class Allocator>
1674 return this->val_real_(i).GetSize();
1683 template <
class T,
class Prop,
class Allocator>
1687 return this->val_imag_(i).GetSize();
1692 template <
class T,
class Prop,
class Allocator>
1696 this->val_real_(i).Print();
1701 template <
class T,
class Prop,
class Allocator>
1705 this->val_imag_(i).Print();
1715 template <
class T,
class Prop,
class Allocator>
1719 this->val_real_(i).Assemble();
1729 template <
class T,
class Prop,
class Allocator>
1733 this->val_imag_(i).Assemble();
1746 template <
class T,
class Prop,
class Allocator>
1759 template <
class T,
class Prop,
class Allocator>
1779 template <
class T,
class Prop,
class Allocator>
1780 inline const typename
1786 #ifdef SELDON_CHECK_BOUNDS
1787 CheckBounds(i, j, this->m_, this->n_,
"Matrix");
1791 return entry_type(this->val_real_(i)(j), this->val_imag_(i)(j));
1793 return entry_type(this->val_real_(j)(i), this->val_imag_(j)(i));
1803 template <
class T,
class Prop,
class Allocator>
1804 inline typename Allocator::value_type&
1807 #ifdef SELDON_CHECK_BOUNDS
1808 CheckBounds(i, j, this->m_, this->n_,
"Matrix");
1812 return this->val_real_(j).Val(i);
1814 return this->val_real_(i).Val(j);
1825 template <
class T,
class Prop,
class Allocator>
1826 inline const typename Allocator::value_type&
1830 #ifdef SELDON_CHECK_BOUNDS
1831 CheckBounds(i, j, this->m_, this->n_,
"Matrix");
1834 return this->val_real_(j).Val(i);
1836 return this->val_real_(i).Val(j);
1847 template <
class T,
class Prop,
class Allocator>
1848 inline typename Allocator::value_type&
1851 #ifdef SELDON_CHECK_BOUNDS
1852 CheckBounds(i, j, this->m_, this->n_,
"Matrix");
1856 return this->val_real_(i).Get(j);
1858 return this->val_real_(j).Get(i);
1869 template <
class T,
class Prop,
class Allocator>
1870 inline const typename Allocator::value_type&
1874 #ifdef SELDON_CHECK_BOUNDS
1875 CheckBounds(i, j, this->m_, this->n_,
"Matrix");
1879 return this->val_real_(i).Get(j);
1881 return this->val_real_(j).Get(i);
1892 template <
class T,
class Prop,
class Allocator>
1893 inline typename Allocator::value_type&
1896 #ifdef SELDON_CHECK_BOUNDS
1897 CheckBounds(i, j, this->m_, this->n_,
"Matrix");
1900 return this->val_imag_(j).Val(i);
1902 return this->val_imag_(i).Val(j);
1912 template <
class T,
class Prop,
class Allocator>
1913 inline const typename Allocator::value_type&
1917 #ifdef SELDON_CHECK_BOUNDS
1918 CheckBounds(i, j, this->m_, this->n_,
"Matrix");
1922 return this->val_imag_(j).Val(i);
1924 return this->val_imag_(i).Val(j);
1934 template <
class T,
class Prop,
class Allocator>
1935 inline typename Allocator::value_type&
1938 #ifdef SELDON_CHECK_BOUNDS
1939 CheckBounds(i, j, this->m_, this->n_,
"Matrix");
1943 return this->val_imag_(i).Get(j);
1945 return this->val_imag_(j).Get(i);
1955 template <
class T,
class Prop,
class Allocator>
1956 inline const typename Allocator::value_type&
1960 #ifdef SELDON_CHECK_BOUNDS
1961 CheckBounds(i, j, this->m_, this->n_,
"Matrix");
1965 return this->val_imag_(i).Val(j);
1967 return this->val_imag_(j).Val(i);
1972 template <
class T,
class Prop,
class Allocator>
1975 this->val_real_(i).Clear();
1980 template <
class T,
class Prop,
class Allocator>
1983 this->val_imag_(i).Clear();
1988 template <
class T,
class Prop,
class Allocator>
2003 template <
class T,
class Prop,
class Allocator>
2007 this->val_real_(i).Reallocate(j);
2017 template <
class T,
class Prop,
class Allocator>
2021 this->val_imag_(i).Reallocate(j);
2030 template <
class T,
class Prop,
class Allocator>
2034 this->val_real_(i).Resize(j);
2043 template <
class T,
class Prop,
class Allocator>
2047 this->val_imag_(i).Resize(j);
2056 template <
class T,
class Prop,
class Allocator>
2060 Swap(this->val_real_(i), this->val_real_(j));
2069 template <
class T,
class Prop,
class Allocator>
2073 Swap(this->val_imag_(i), this->val_imag_(j));
2082 template <
class T,
class Prop,
class Allocator>
2086 for (
int j = 0; j < this->val_real_(i).GetM(); j++)
2087 this->val_real_(i).Index(j) = new_index(j);
2096 template <
class T,
class Prop,
class Allocator>
2100 for (
int j = 0; j < this->val_imag_(i).GetM(); j++)
2101 this->val_imag_(i).Index(j) = new_index(j);
2110 template <
class T,
class Prop,
class Allocator>
2115 return this->val_real_(i).GetSize();
2124 template <
class T,
class Prop,
class Allocator>
2128 return this->val_imag_(i).GetSize();
2133 template <
class T,
class Prop,
class Allocator>
2137 this->val_real_(i).Print();
2142 template <
class T,
class Prop,
class Allocator>
2146 this->val_imag_(i).Print();
2156 template <
class T,
class Prop,
class Allocator>
2160 this->val_real_(i).Assemble();
2170 template <
class T,
class Prop,
class Allocator>
2174 this->val_imag_(i).Assemble();
2179 #define SELDON_FILE_MATRIX_ARRAY_COMPLEX_SPARSE_INLINE_CXX