transpose.hh

Go to the documentation of this file.
1 
6 #ifndef transpose_hh
7 #define transpose_hh
8 
9 #include "operator/matrix.hh"
10 
11 namespace concepts {
12 
13  // ************************************************************* Transpose **
14 
16  template<class F>
17  class Transpose : public Matrix<F> {
18  public:
20  typedef typename Realtype<F>::type r_type;
22  typedef typename Cmplxtype<F>::type c_type;
23 
27  Transpose(Matrix<F>& a) : Matrix<F>(a.dimY(), a.dimX()), a_(a) { }
29  virtual F operator()(const uint i, const uint j) const { return a_(j, i); }
31  virtual F& operator()(const uint i, const uint j) { return a_(j, i); }
33  virtual void operator()(const Function<r_type>& fncY,
34  Function<F>& fncX);
35  virtual void operator()(const Function<c_type>& fncY,
36  Function<c_type>& fncX);
38  template<class H, class I>
39  void operator()(const Vector<H>& fncY, Vector<I>& fncX) {
40  a_.transpMult(fncY, fncX);
41  }
42 
44  virtual void transpMult(const Vector<r_type>& fncY, Vector<F>& fncX) {
45  a_(fncY, fncX);
46  }
48  virtual void transpMult(const Vector<c_type>& fncY,
49  Vector<c_type>& fncX)
50  {
51  a_(fncY, fncX);
52  }
53  protected:
54  std::ostream& info(std::ostream& os) const;
55  private:
58  };
59 
60 } // namespace concepts
61 
62 #endif // transpose_hh
virtual void transpMult(const Vector< c_type > &fncY, Vector< c_type > &fncX)
Computes fncX = AT fncY where A is this matrix.
Definition: transpose.hh:48
Abstract class for a function.
Definition: basis.hh:21
virtual void operator()(const Function< c_type > &fncY, Function< c_type > &fncX)
std::ostream & info(std::ostream &os) const
virtual F operator()(const uint i, const uint j) const
Returns entry with indices i and j.
Definition: transpose.hh:29
Matrix< F > & a_
The matrix to transpose.
Definition: transpose.hh:57
Cmplxtype< F >::type c_type
Real type of data type.
Definition: transpose.hh:22
virtual void operator()(const Function< r_type > &fncY, Function< F > &fncX)
Computes fncX = A(fncY) where A is this matrix.
Abstract class for an operator.
Definition: compositions.hh:31
void operator()(const Vector< H > &fncY, Vector< I > &fncX)
Computes fncX = A(fncY) where A is this matrix.
Definition: transpose.hh:39
Realtype< F >::type r_type
Real type of data type.
Definition: transpose.hh:20
The transpose of another matrix.
Definition: transpose.hh:17
virtual F & operator()(const uint i, const uint j)
Returns and allows access to entry with indices i and j.
Definition: transpose.hh:31
std::complex< F > type
Definition: typedefs.hh:116
Transpose(Matrix< F > &a)
Constructor.
Definition: transpose.hh:27
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
virtual void transpMult(const Vector< r_type > &fncY, Vector< F > &fncX)
Computes fncX = AT fncY where A is this matrix.
Definition: transpose.hh:44
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich