20 #ifndef SELDON_FILE_MATRIX_BASE_CXX
22 #include "Matrix_Base.hxx"
27 #ifdef SELDON_WITH_VIRTUAL
30 void VirtualMatrix<T>::Reallocate(
int m,
int n)
34 throw Undefined(
"Reallocate",
"Not implemented");
40 void VirtualMatrix<T>::Zero()
44 throw Undefined(
"Zero",
"Not implemented");
50 void VirtualMatrix<T>::SetEntry(
int i,
int j,
const T& x)
54 throw Undefined(
"SetEntry",
"Not implemented");
60 void VirtualMatrix<T>::AddInteraction(
int i,
int j,
const T& x)
64 throw Undefined(
"AddInteraction",
"Not implemented");
70 void VirtualMatrix<T>::AddInteractionRow(
int,
int,
const Vector<int>&,
71 const Vector<T>& val,
bool sorted)
75 throw Undefined(
"AddInteractionRow",
"Not implemented");
81 void VirtualMatrix<T>::AddInteractionColumn(
int,
int,
const Vector<int>&,
82 const Vector<T>& val,
bool sorted)
86 throw Undefined(
"AddInteractionColumn",
"Not implemented");
100 void VirtualMatrix<T>::AddDistantInteraction(
int i,
int jglob,
int proc,
105 throw Undefined(
"AddDistantInteraction",
"Not implemented");
119 void VirtualMatrix<T>::AddRowDistantInteraction(
int iglob,
int j,
int proc,
124 throw Undefined(
"AddRowDistantInteraction",
"Not implemented");
130 size_t VirtualMatrix<T>::GetMemorySize()
const
134 throw Undefined(
"GetMemorySize",
"Not implemented");
140 void VirtualMatrix<T>::Clear()
144 throw Undefined(
"Clear",
"Not implemented");
150 inline void VirtualMatrix<T>::ClearRow(
int i)
154 throw Undefined(
"ClearRow",
"Not implemented");
159 template<
class T>
void VirtualMatrix<T>
160 ::ApplySor(
const SeldonTranspose&, Vector<Treal>& x,
const Vector<Treal>& r,
161 const typename ClassComplexType<T>::Treal& omega,
162 int nb_iter,
int stage_ssor)
const
164 throw Undefined(
"ApplySOR",
"Not implemented");
169 template<
class T>
void VirtualMatrix<T>
170 ::ApplySor(
const SeldonTranspose&, Vector<Tcplx>& x,
const Vector<Tcplx>& r,
171 const typename ClassComplexType<T>::Treal& omega,
172 int nb_iter,
int stage_ssor)
const
174 throw Undefined(
"ApplySOR with transpose",
"Not implemented");
179 template<
class T>
void VirtualMatrix<T>
180 ::MltAddVector(
const Treal& alpha,
const Vector<Treal>& x,
181 const Treal& beta, Vector<Treal>& y)
const
183 throw Undefined(
"MltAddVector",
"Not implemented");
188 template<
class T>
void VirtualMatrix<T>
189 ::MltAddVector(
const Tcplx& alpha,
const Vector<Tcplx>& x,
190 const Tcplx& beta, Vector<Tcplx>& y)
const
192 throw Undefined(
"MltAddVector",
"Not implemented");
197 template<
class T>
void VirtualMatrix<T>
198 ::MltAddVector(
const Treal& alpha,
const SeldonTranspose&,
199 const Vector<Treal>& x,
200 const Treal& beta, Vector<Treal>& y)
const
202 throw Undefined(
"MltAddVector",
"Not implemented");
207 template<
class T>
void VirtualMatrix<T>
208 ::MltAddVector(
const Tcplx& alpha,
const SeldonTranspose&,
209 const Vector<Tcplx>& x,
210 const Tcplx& beta, Vector<Tcplx>& y)
const
212 throw Undefined(
"MltAddVector",
"Not implemented");
217 template<
class T>
void VirtualMatrix<T>
218 ::MltVector(
const Vector<Treal>& x, Vector<Treal>& y)
const
220 throw Undefined(
"MltVector",
"Not implemented");
225 template<
class T>
void VirtualMatrix<T>
226 ::MltVector(
const Vector<Tcplx>& x, Vector<Tcplx>& y)
const
228 throw Undefined(
"MltVector",
"Not implemented");
233 template<
class T>
void VirtualMatrix<T>
234 ::MltVector(
const SeldonTranspose&,
235 const Vector<Treal>& x, Vector<Treal>& y)
const
237 throw Undefined(
"MltVector with transpose",
"Not implemented");
242 template<
class T>
void VirtualMatrix<T>
243 ::MltVector(
const SeldonTranspose&,
244 const Vector<Tcplx>& x, Vector<Tcplx>& y)
const
246 throw Undefined(
"MltVector with transpose",
"Not implemented");
251 template<
class T>
bool VirtualMatrix<T>::IsSymmetric()
const
258 template<
class T>
bool VirtualMatrix<T>::IsComplex()
const
271 template <
class T,
class Prop,
class Storage,
class Allocator>
276 for (
int i = 0; i < A.GetM(); i++)
278 for (
int j = 0; j < A.GetN(); j++)
279 out << A(i, j) <<
'\t';
289 #define SELDON_FILE_MATRIX_BASE_CXX