BandMatrix.hxx
1 // Copyright (C) 2014 INRIA
2 // Author(s): Marc DuruflĂ©
3 //
4 // This file is part of the linear-algebra library Seldon,
5 // http://seldon.sourceforge.net/.
6 //
7 // Seldon is free software; you can redistribute it and/or modify it under the
8 // terms of the GNU Lesser General Public License as published by the Free
9 // Software Foundation; either version 2.1 of the License, or (at your option)
10 // any later version.
11 //
12 // Seldon is distributed in the hope that it will be useful, but WITHOUT ANY
13 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
15 // more details.
16 //
17 // You should have received a copy of the GNU Lesser General Public License
18 // along with Seldon. If not, see http://www.gnu.org/licenses/.
19 
20 #ifndef SELDON_FILE_BAND_MATRIX_HXX
21 
22 namespace Seldon
23 {
24  class BandedCol : public ColSparse
25  {
26  };
27 
28  class ArrowCol : public ColSparse
29  {
30  };
31 
32 
34  template <class T, class Prop, class Storage, class Allocator
35  = typename SeldonDefaultAllocator<Storage, T>::allocator>
36  class Matrix_Band : public VirtualMatrix<T>
37  {
38  public :
39  typedef T entry_type;
40 
41  // Attributes.
42  protected:
44  int kl_;
46  int ku_;
49 
50  public :
51  Matrix_Band();
52 
53  int GetKL() const;
54  int GetKU() const;
55  int GetM() const;
56  int GetN() const;
57  long GetDataSize() const;
58  size_t GetMemorySize() const;
59 
60  void Clear();
61  void Zero();
62  void HideMessages();
63  void Reallocate(int m, int n);
64  void Reallocate(int m, int n, int kl, int ku);
65 
66  T* GetData() const;
67 
68  void AddInteraction(int i, int j, const T& val);
69  void AddInteractionRow(int i, int n,
70  const IVect& num, const Vector<T>& val,
71  bool sorted = false);
72 
73  void ClearRow(int i);
74 
75  const T operator()(int i, int j) const;
76 
78 
79  T& Get(int i, int j);
80  const T& Get(int i, int j) const;
81 
82  T& Val(int i, int j);
83  const T& Val(int i, int j) const;
84 
85  void Set(int, int, const T&);
86  void SetEntry(int, int, const T&);
87 
88  void SetIdentity();
89 
90  template<class T0>
91  void Fill(const T0& x);
92 
93  void FillRand();
95 
96  void Factorize();
97  void Factorize(IVect&);
98 
99  template<class T0>
100  void Add_(const T0& alpha,
102 
103  template<class T0, class T1>
104  void MltAdd(const T0& alpha, const SeldonTranspose& trans,
105  const Vector<T1>& x, Vector<T1>& y) const;
106 
107  template<class T1>
108  void Solve(Vector<T1>& x) const;
109 
110  template<class T1>
111  void Solve(const IVect&, Vector<T1>& x) const;
112 
113  void Write(string FileName) const;
114  void Write(ostream& FileStream) const;
115  void WriteText(string FileName) const;
116  void WriteText(ostream& FileStream) const;
117 
118 #ifdef SELDON_WITH_VIRTUAL
119  typedef typename ClassComplexType<T>::Treal Treal;
120  typedef typename ClassComplexType<T>::Tcplx Tcplx;
121 
122  virtual void ApplySor(const SeldonTranspose&, Vector<Treal>& x, const Vector<Treal>& r,
123  const typename ClassComplexType<T>::Treal& omega,
124  int nb_iter, int stage_ssor) const;
125 
126  virtual void ApplySor(const SeldonTranspose&, Vector<Tcplx>& x, const Vector<Tcplx>& r,
127  const typename ClassComplexType<T>::Treal& omega,
128  int nb_iter, int stage_ssor) const;
129 
130  virtual void MltAddVector(const Treal& alpha, const Vector<Treal>& x,
131  const Treal& beta, Vector<Treal>& y) const;
132 
133  virtual void MltAddVector(const Tcplx& alpha, const Vector<Tcplx>& x,
134  const Tcplx& beta, Vector<Tcplx>& y) const;
135 
136  virtual void MltAddVector(const Treal& alpha, const SeldonTranspose&,
137  const Vector<Treal>& x,
138  const Treal& beta, Vector<Treal>& y) const;
139 
140  virtual void MltAddVector(const Tcplx& alpha, const SeldonTranspose&,
141  const Vector<Tcplx>& x,
142  const Tcplx& beta, Vector<Tcplx>& y) const;
143 
144  virtual void MltVector(const Vector<Treal>& x, Vector<Treal>& y) const;
145  virtual void MltVector(const Vector<Tcplx>& x, Vector<Tcplx>& y) const;
146 
147  virtual void MltVector(const SeldonTranspose&,
148  const Vector<Treal>& x, Vector<Treal>& y) const;
149 
150  virtual void MltVector(const SeldonTranspose&,
151  const Vector<Tcplx>& x, Vector<Tcplx>& y) const;
152 
153  virtual bool IsSymmetric() const;
154 #endif
155 
156  };
157 
158 
160  template<class T, class Allocator>
161  class Matrix<T, General, BandedCol, Allocator>
162  : public Matrix_Band<T, General, BandedCol, Allocator>
163  {
164  };
165 
166 
168  template <class T, class Prop, class Storage, class Allocator
169  = typename SeldonDefaultAllocator<Storage, T>::allocator>
170  class Matrix_Arrow : public Matrix_Band<T, Prop, Storage, Allocator>
171  {
172  // Attributes.
173  protected:
180 
181  public :
182  Matrix_Arrow();
183 
184  int GetM() const;
185  int GetN() const;
186  int GetNbLastRow() const;
187  int GetNbLastCol() const;
188  long GetDataSize() const;
189  size_t GetMemorySize() const;
190 
191  void Clear();
192  void Zero();
193  void HideMessages();
194  void Reallocate(int m, int n);
195  void Reallocate(int m, int n, int kl, int ku,
196  int nb_last_row = 0, int nb_last_col = 0);
197 
198  void AddInteraction(int i, int j, const T& val);
199  void AddInteractionRow(int i, int n,
200  const IVect& num, const Vector<T>& val,
201  bool sorted = false);
202 
203  void ClearRow(int i);
204 
205  const T operator()(int i, int j) const;
206 
208 
209  T& Get(int i, int j);
210  const T& Get(int i, int j) const;
211 
212  T& Val(int i, int j);
213  const T& Val(int i, int j) const;
214 
215  void Set(int, int, const T&);
216  void SetEntry(int, int, const T&);
217 
218  void SetIdentity();
219 
220  template<class T0>
221  void Fill(const T0& x);
222 
223  void FillRand();
224 
225  void Factorize();
226 
227  template<class T0>
228  void Add_(const T0& alpha,
230 
231  template<class T0, class T1>
232  void MltAdd(const T0& alpha, const SeldonTranspose& trans,
233  const Vector<T1>& x, Vector<T1>& y) const;
234 
235  template<class T1>
236  void Solve(Vector<T1>& x) const;
237 
238  void Write(string FileName) const;
239  void Write(ostream& FileStream) const;
240  void WriteText(string FileName) const;
241  void WriteText(ostream& FileStream) const;
242 
243  };
244 
245 
247 
252  template<class T, class Allocator>
253  class Matrix<T, General, ArrowCol, Allocator>
254  : public Matrix_Arrow<T, General, ArrowCol, Allocator>
255  {
256  };
257 
258 
259  // fonctions for the LU factorization and solution
260 
261  // without pivoting
262  template<class T, class Allocator>
265  bool keep_matrix = false);
266 
267  template<class T, class Allocator>
269 
270  template<class T, class Allocator>
271  void SolveLU(const Matrix<T, General, BandedCol, Allocator>& A, Vector<T>& x);
272 
273  template<class T, class Allocator>
274  void SolveLU(const Matrix<T, General, BandedCol, Allocator>& A,
275  Vector<complex<T> >& x);
276 
277  // with pivoting
278  template<class Allocator>
280  Vector<int>& ipivot, LapackInfo& info = lapack_info);
281 
282  template<class Allocator>
283  void SolveLU(const Matrix<double, General, BandedCol, Allocator>& A,
284  const Vector<int>& ipivot, Vector<double>& b,
285  LapackInfo& info = lapack_info);
286 
287  template<class Allocator>
288  void SolveLU(const Matrix<double, General, BandedCol, Allocator>& A,
289  const Vector<int>& ipivot, Vector<complex<double> >& b,
290  LapackInfo& info = lapack_info);
291 
292  template<class Allocator>
293  void GetLU(Matrix<complex<double>, General, BandedCol, Allocator>& A,
294  Vector<int>& ipivot, LapackInfo& info = lapack_info);
295 
296  template<class Allocator>
297  void SolveLU(const Matrix<complex<double>,
298  General, BandedCol, Allocator>& A,
299  const Vector<int>& ipivot, Vector<complex<double> >& b,
300  LapackInfo& info = lapack_info);
301 
302  template<class T, class Allocator>
304  Vector<int>& ipivot, LapackInfo& info = lapack_info);
305 
306  template<class T, class Allocator>
307  void SolveLU(const Matrix<T, General, BandedCol, Allocator>& A,
308  const Vector<int>& ipivot, Vector<T>& b,
309  LapackInfo& info = lapack_info);
310 
311  template<class T, class Allocator>
312  void SolveLU(const Matrix<T, General, BandedCol, Allocator>& A,
313  const Vector<int>& ipivot, Vector<complex<T> >& b,
314  LapackInfo& info = lapack_info);
315 
316  template<class T, class Allocator>
319 
320  template<class T0, class T1, class Prop1, class Allocator1,
321  class T2, class Prop2, class Allocator2>
322  void AddMatrix(const T0& alpha,
325 
326  template<class T0, class T1, class T, class T2, class Allocator>
327  void MltAddVector(const T0& alpha,
329  const Vector<T2>& x, const T1& beta, Vector<T2>& y);
330 
331  template<class T0, class T1, class T, class T2, class Allocator>
332  void MltAddVector(const T0& alpha, const SeldonTranspose& trans,
334  const Vector<T2>& x, const T1& beta, Vector<T2>& y);
335 
336  template<class T, class Allocator, class T1>
337  void MltVector(const Matrix<T, General, BandedCol, Allocator>& A,
338  const Vector<T1>& x, Vector<T1>& y);
339 
340  template<class T, class Allocator, class T1>
341  void MltVector(const SeldonTranspose& trans,
343  const Vector<T1>& x, Vector<T1>& y);
344 
345  template<class T0, class T1, class Allocator>
346  void MltScalar(const T0& alpha,
348 
349  template<class T, class Allocator>
350  ostream& operator<<(ostream& out,
352 
353  template<class T, class Allocator>
356  bool keep_matrix = false);
357 
358  template<class T, class Allocator>
360 
361  template<class T, class Allocator>
362  void SolveLU(const Matrix<T, General, ArrowCol, Allocator>& A, Vector<T>& x);
363 
364  template<class T, class Allocator>
365  void SolveLU(const Matrix<T, General, ArrowCol, Allocator>& A, Vector<complex<T> >& x);
366 
367  template<class T0, class T1, class Prop1, class Allocator1,
368  class T2, class Prop2, class Allocator2>
369  void AddMatrix(const T0& alpha,
372 
373  template<class T0, class T1, class T, class T2, class Allocator>
374  void MltAddVector(const T0& alpha,
376  const Vector<T2>& x, const T1& beta, Vector<T2>& y);
377 
378  template<class T0, class T1, class T, class T2, class Allocator>
379  void MltAddVector(const T0& alpha, const SeldonTranspose& trans,
381  const Vector<T2>& x, const T1& beta, Vector<T2>& y);
382 
383  template<class T, class Allocator, class T1>
384  void MltVector(const Matrix<T, General, ArrowCol, Allocator>& A,
385  const Vector<T1>& x, Vector<T1>& y);
386 
387  template<class T, class Allocator, class T1>
388  void MltVector(const SeldonTranspose& trans,
390  const Vector<T1>& x, Vector<T1>& y);
391 
392  template<class T0, class T1, class Allocator>
393  void MltScalar(const T0& alpha,
395 
396  template<class T, class Prop, class Allocator,
397  class T1, class Allocator1, class T2, class Allocator2>
398  void ScaleMatrix(Matrix<T, Prop, BandedCol, Allocator>& A,
401 
402  template<class T, class Allocator>
403  ostream& operator<<(ostream& out,
405 
406 }
407 
408 #define SELDON_FILE_BAND_MATRIX_HXX
409 #endif
Seldon::Matrix_Arrow::last_rows_
Matrix< T, General, RowMajor, Allocator > last_rows_
last rows
Definition: BandMatrix.hxx:175
Seldon::Matrix_Band::GetMemorySize
size_t GetMemorySize() const
returns the memory used by the object in bytes
Definition: BandMatrixInline.cxx:74
Seldon::Matrix_Band::Set
void Set(int, int, const T &)
sets A(i, j)
Definition: BandMatrixInline.cxx:141
Seldon::Matrix_Band
base class for a banded-matrix
Definition: BandMatrix.hxx:36
Seldon::Matrix_Arrow::GetMemorySize
size_t GetMemorySize() const
returns the memory used by the object in bytes
Definition: BandMatrixInline.cxx:321
Seldon::Matrix_Band::Add_
void Add_(const T0 &alpha, const Matrix< T, General, BandedCol, Allocator > &A)
performs the operation *this = *this + alpha A
Definition: BandMatrix.cxx:311
Seldon::Matrix_Arrow::AddInteraction
void AddInteraction(int i, int j, const T &val)
performs the operation A(i, j) = A(i, j) + val
Definition: BandMatrix.cxx:563
Seldon::SeldonTranspose
Definition: MatrixFlag.hxx:32
Seldon::Matrix_Arrow
base class for arrow matrix (banded matrix + dense columns/rows)
Definition: BandMatrix.hxx:170
Seldon::Matrix_Arrow::Fill
void Fill(const T0 &x)
sets all non-zero entries to a same value
Definition: BandMatrix.cxx:720
Seldon::LapackInfo
Definition: Errors.hxx:243
Seldon::ColSparse
Definition: Storage.hxx:79
Seldon::Matrix_Arrow::Add_
void Add_(const T0 &alpha, const Matrix< T, General, ArrowCol, Allocator > &A)
performs the operation *this = *this + alpha A
Definition: BandMatrix.cxx:854
Seldon::MltScalar
void MltScalar(const T0 &alpha, Array3D< T, Allocator > &A)
Multiplication of all elements of a 3D array by a scalar.
Definition: Array3D.cxx:539
Seldon::Matrix_Band::MltAdd
void MltAdd(const T0 &alpha, const SeldonTranspose &trans, const Vector< T1 > &x, Vector< T1 > &y) const
performs matrix-vector product y = y + alpha A x
Definition: BandMatrix.cxx:328
Seldon::Matrix_Band::GetN
int GetN() const
returns the number of rows
Definition: BandMatrixInline.cxx:58
Seldon::ArrowCol
Definition: BandMatrix.hxx:28
Seldon::Matrix_Band::Factorize
void Factorize()
performs LU factorisation without pivoting
Definition: BandMatrix.cxx:235
Seldon::Matrix_Arrow::FillRand
void FillRand()
sets all non-zero entries to random values
Definition: BandMatrix.cxx:733
Seldon::Matrix_Band::GetData
T * GetData() const
returns a pointer to the array containing values
Definition: BandMatrixInline.cxx:106
Seldon::Matrix_Arrow::AddInteractionRow
void AddInteractionRow(int i, int n, const IVect &num, const Vector< T > &val, bool sorted=false)
adds severals values on a single row of the matrix
Definition: BandMatrix.cxx:592
Seldon::Matrix_Band::Solve
void Solve(Vector< T1 > &x) const
solves A x = b, assuming that Factorize has been previously called
Definition: BandMatrix.cxx:384
Seldon::Matrix_Band::Zero
void Zero()
fills non-zero entries with 0
Definition: BandMatrixInline.cxx:82
Seldon::Matrix< T, General, ArrowCol, Allocator >
arrow matrix stored by columns
Definition: BandMatrix.hxx:253
Seldon::Matrix_Arrow::Val
T & Val(int i, int j)
returns a reference to A(i, j)
Definition: BandMatrixInline.cxx:346
Seldon::Vector< int, VectFull >
Seldon::Matrix_Arrow::Set
void Set(int, int, const T &)
sets A(i, j)
Definition: BandMatrixInline.cxx:363
Seldon::Matrix_Band::Copy
void Copy(const Matrix< T, General, ArrayRowSparse > &A)
conversion from a CSR matrix
Definition: BandMatrix.cxx:205
Seldon::Matrix_Arrow::last_block_
Matrix< T, General, ColMajor, Allocator > last_block_
last block
Definition: BandMatrix.hxx:179
Seldon::Matrix_Arrow::last_columns_
Matrix< T, General, ColMajor, Allocator > last_columns_
last columns
Definition: BandMatrix.hxx:177
Seldon::Matrix_Arrow::SetIdentity
void SetIdentity()
sets the matrix to the identity matrix
Definition: BandMatrix.cxx:702
Seldon::Matrix
Definition: SeldonHeader.hxx:226
Seldon::Matrix_Band::GetM
int GetM() const
returns the number of rows
Definition: BandMatrixInline.cxx:34
Seldon::Matrix_Band::kl_
int kl_
number of extra-diagonals in lower part
Definition: BandMatrix.hxx:44
Seldon::Matrix_Band::operator()
const T operator()(int i, int j) const
returns entry (i, j) of the matrix
Definition: BandMatrix.cxx:121
Seldon::Matrix_Arrow::HideMessages
void HideMessages()
present for compatibility
Definition: BandMatrixInline.cxx:331
Seldon::Matrix_Band::Matrix_Band
Matrix_Band()
default constructor
Definition: BandMatrix.cxx:34
Seldon::Matrix_Arrow::operator()
const T operator()(int i, int j) const
returns entry (i, j) of the matrix
Definition: BandMatrix.cxx:631
Seldon::Matrix_Arrow::Solve
void Solve(Vector< T1 > &x) const
solves A x = b, assuming that Factorize has been previously called
Definition: BandMatrix.cxx:983
Seldon::Matrix< T, General, BandedCol, Allocator >
banded matrix stored by columns (Lapack format)
Definition: BandMatrix.hxx:161
Seldon::Matrix_Arrow::operator*=
Matrix< T, Prop, Storage, Allocator > & operator*=(const T &alpha)
multiplication by a scalar
Definition: BandMatrix.cxx:652
Seldon::Matrix_Band::AddInteractionRow
void AddInteractionRow(int i, int n, const IVect &num, const Vector< T > &val, bool sorted=false)
adds severals values on a single row of the matrix
Definition: BandMatrix.cxx:94
Seldon::Matrix_Arrow::GetN
int GetN() const
returns the number of columns
Definition: BandMatrixInline.cxx:288
Seldon::Matrix_Arrow::Reallocate
void Reallocate(int m, int n)
changes the size of the matrix
Definition: BandMatrixInline.cxx:338
Seldon::Matrix_Band::Clear
void Clear()
clears the matrix
Definition: BandMatrix.cxx:45
Seldon::Matrix_Band::SetEntry
void SetEntry(int, int, const T &)
sets A(i, j)
Definition: BandMatrixInline.cxx:150
Seldon::Matrix_Arrow::Clear
void Clear()
clears the matrix
Definition: BandMatrix.cxx:524
Seldon::Matrix_Arrow::GetNbLastCol
int GetNbLastCol() const
returns the number of dense columns placed at the end of the matrix
Definition: BandMatrixInline.cxx:304
Seldon::Matrix_Band::Get
T & Get(int i, int j)
returns a reference to A(i, j)
Definition: BandMatrix.cxx:134
Seldon::Matrix_Band::Val
T & Val(int i, int j)
returns a reference to A(i, j)
Definition: BandMatrixInline.cxx:124
Seldon::Matrix_Arrow::ClearRow
void ClearRow(int i)
clears row i, fills it with 0
Definition: BandMatrix.cxx:605
Seldon::Matrix_Arrow::GetNbLastRow
int GetNbLastRow() const
returns the number of dense rows placed at the end of the matrix
Definition: BandMatrixInline.cxx:296
Seldon::Matrix_Band::ku_
int ku_
number of extra-diagonals in upper part
Definition: BandMatrix.hxx:46
Seldon::Matrix_Arrow::Matrix_Arrow
Matrix_Arrow()
default constructor
Definition: BandMatrixInline.cxx:272
Seldon::Matrix_Band::ClearRow
void ClearRow(int i)
clears row i, fills it with 0
Definition: BandMatrix.cxx:107
Seldon::General
Definition: Properties.hxx:26
Seldon::BandedCol
Definition: BandMatrix.hxx:24
Seldon::Matrix_Band::GetDataSize
long GetDataSize() const
returns the number of elements stored in the matrix
Definition: BandMatrixInline.cxx:66
Seldon::Matrix_Arrow::Write
void Write(string FileName) const
writes the matrix in a file in binary format
Definition: BandMatrix.cxx:1060
Seldon::Matrix_Arrow::SetEntry
void SetEntry(int, int, const T &)
sets A(i, j)
Definition: BandMatrixInline.cxx:372
Seldon::GetLU
void GetLU(Matrix< T0, Prop0, Storage0, Allocator0 > &A)
Returns the LU factorization of a matrix.
Definition: Functions_Matrix.cxx:2073
Seldon::Matrix_Band::data_
Matrix< T, General, ColMajor, Allocator > data_
values are stored in a dense matrix (in Lapack format)
Definition: BandMatrix.hxx:48
Seldon::Matrix_Band::AddInteraction
void AddInteraction(int i, int j, const T &val)
sets A(i, j) = A(i, j) + val
Definition: BandMatrix.cxx:72
Seldon::Matrix_Arrow::Get
T & Get(int i, int j)
returns a reference to A(i, j)
Definition: BandMatrix.cxx:664
Seldon::Matrix_Band::Write
void Write(string FileName) const
writes the matrix in a file in binary format
Definition: BandMatrix.cxx:437
Seldon::Matrix_Arrow::GetDataSize
long GetDataSize() const
returns the number of non-zero entries
Definition: BandMatrixInline.cxx:312
Seldon::Matrix_Band::GetKU
int GetKU() const
returns the number of extra-diagonals in upper part of the matrix
Definition: BandMatrixInline.cxx:50
Seldon::Matrix_Band::operator*=
Matrix< T, Prop, Storage, Allocator > & operator*=(const T &alpha)
multiplication by a scalar
Definition: BandMatrixInline.cxx:115
Seldon::Matrix_Band::Fill
void Fill(const T0 &x)
sets all non-zero entries to a same value
Definition: BandMatrix.cxx:178
Seldon::Matrix_Band::HideMessages
void HideMessages()
present for compatibility
Definition: BandMatrixInline.cxx:90
Seldon::Matrix_Arrow::GetM
int GetM() const
returns the number of rows
Definition: BandMatrixInline.cxx:280
Seldon::Matrix_Band::FillRand
void FillRand()
sets all non-zero entries to random values
Definition: BandMatrix.cxx:191
Seldon::Matrix_Band::Reallocate
void Reallocate(int m, int n)
changes the size of the matrix, previous entries are lost
Definition: BandMatrixInline.cxx:98
Seldon::Matrix_Arrow::Zero
void Zero()
sets all non-zero entries to 0
Definition: BandMatrix.cxx:536
Seldon::Matrix_Band::SetIdentity
void SetIdentity()
sets the matrix to the identity matrix
Definition: BandMatrix.cxx:164
Seldon
Seldon namespace.
Definition: Array.cxx:24
Seldon::operator<<
ostream & operator<<(ostream &out, const Array< T, N, Allocator > &A)
operator<< overloaded for a 3D array.
Definition: Array.cxx:1617
Seldon::Matrix_Arrow::WriteText
void WriteText(string FileName) const
writes the matrix in a file in text format
Definition: BandMatrix.cxx:1094
Seldon::Matrix_Arrow::Factorize
void Factorize()
performs LU factorisation without pivoting
Definition: BandMatrix.cxx:744
Seldon::Matrix_Band::WriteText
void WriteText(string FileName) const
writes the matrix in a file in text format
Definition: BandMatrix.cxx:476
Seldon::AddMatrix
void AddMatrix(const T0 &alpha, const Matrix< T1, Prop1, Storage1, Allocator1 > &A, Matrix< T2, Prop2, Storage2, Allocator2 > &B)
Adds two matrices.
Definition: Functions_Matrix.cxx:1619
Seldon::Matrix_Band::GetKL
int GetKL() const
returns the number of extra-diagonals in lower part of the matrix
Definition: BandMatrixInline.cxx:42
Seldon::Matrix_Arrow::MltAdd
void MltAdd(const T0 &alpha, const SeldonTranspose &trans, const Vector< T1 > &x, Vector< T1 > &y) const
performs matrix-vector product y = y + alpha A x
Definition: BandMatrix.cxx:884
Seldon::VirtualMatrix
Abstract base class for all matrices.
Definition: Matrix_Base.hxx:42