Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

operator/transpose.hh
Go to the documentation of this file.
00001 #ifndef transpose_hh
00002 #define transpose_hh
00003 
00004 #include "operator/matrix.hh"
00005 
00006 namespace concepts {
00007 
00008   // ************************************************************* Transpose **
00009 
00011   template<class F>
00012   class Transpose : public Matrix<F> {
00013   public:
00015     typedef typename Realtype<F>::type r_type;
00017     typedef typename Cmplxtype<F>::type c_type;
00018 
00022     Transpose(Matrix<F>& a) : Matrix<F>(a.dimY(), a.dimX()), a_(a) { }
00024     virtual F operator()(const uint i, const uint j) const { return a_(j, i); }
00026     virtual F& operator()(const uint i, const uint j) { return a_(j, i); }
00028     virtual void operator()(const Function<r_type>& fncY,
00029                             Function<F>& fncX);
00030     virtual void operator()(const Function<c_type>& fncY,
00031                             Function<c_type>& fncX);
00033     template<class H, class I>
00034     void operator()(const Vector<H>& fncY, Vector<I>& fncX) {
00035       a_.transpMult(fncY, fncX);
00036     }
00037 
00039     virtual void transpMult(const Vector<r_type>& fncY, Vector<F>& fncX) {
00040       a_(fncY, fncX);
00041     }
00043     virtual void transpMult(const Vector<c_type>& fncY,
00044                             Vector<c_type>& fncX)
00045     {
00046       a_(fncY, fncX);
00047     }
00048   protected:
00049     std::ostream& info(std::ostream& os) const;
00050   private:
00052     Matrix<F>& a_;
00053   };
00054 
00055 } // namespace concepts
00056 
00057 #endif // transpose_hh

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)