Class documentation of Concepts

Loading...
Searching...
No Matches
trafo.hh
Go to the documentation of this file.
1
6#ifndef aglowav2trafo_hh
7#define aglowav2trafo_hh
8
9#ifdef __GUNG__
10#pragma interface
11#endif
12
13#include "aglowav2/space.hh"
15#include "basics/output.hh"
16
17namespace aglowav2 {
18
19 // ******************************************************************* C2W **
20
24 template<class F = concepts::Real>
25 class C2W : public concepts::Operator<F> {
26 public:
28 C2W(const Haar3d0<F>& wavspc);
30 ~C2W() {delete[] leven_; delete[] lodd_;}
31
37 void operator()(const concepts::Vector<F>& fncC,
40 const Haar3d0<F>& spaceX() const {return wavspc_;}
41 const concepts::Space<F>& spaceY() const {return wavspc_.space();}
42
43 protected:
45 std::ostream& info(std::ostream& os) const;
46
47 private:
48 const Haar3d0<F>& wavspc_;
49
51 F* leven_;
52 F* lodd_;
53 };
54
55 template<class F>
56 C2W<F>::C2W(const Haar3d0<F>& wavspc)
57 : concepts::Operator<F>(wavspc.dim(), wavspc.space().dim())
58 , wavspc_(wavspc)
59 {
60 leven_ = new F[wavspc_.dim()];
61 lodd_ = new F[wavspc_.dim()];
62 }
63
64 template<class F>
65 std::ostream& C2W<F>::info(std::ostream& os) const {
66 os << "aglowav2::" << concepts::typeOf(*this) << "(" << wavspc_.space() << " --> ";
67 return os << wavspc_ << ')';
68 }
69
70 // ******************************************************************* W2C **
71
75 template<class F = concepts::Real>
76 class W2C : public concepts::Operator<F> {
77 public:
79 W2C(const Haar3d0<F>& wavspc);
81 ~W2C() {delete[] ptrs_; delete[] data_; delete[] locdata_;}
82
88 void operator()(const concepts::Vector<F>& fncW,
91 const concepts::Space<F>& spaceX() const {return wavspc_.space();}
92 const Haar3d0<F>& spaceY() const {return wavspc_;}
93
94 protected:
96 std::ostream& info(std::ostream& os) const;
97
98 private:
99 const Haar3d0<F>& wavspc_;
100
102 uint maxdim_;
104 uint nlvl_;
105
107 F** ptrs_;
108 F* data_;
109 F* locdata_;
110 };
111
112 template<class F>
113 W2C<F>::W2C(const Haar3d0<F>& wavspc)
114 : concepts::Operator<F>(wavspc.space().dim(), wavspc.dim())
115 , wavspc_(wavspc), maxdim_(wavspc_.maxLocDim()), nlvl_(wavspc_.nlvl() + 1)
116 {
117 ptrs_ = new F*[nlvl_];
118 data_ = new F[maxdim_ * nlvl_];
119 locdata_ = new F[maxdim_];
120 }
121
122 template<class F>
123 std::ostream& W2C<F>::info(std::ostream& os) const {
124 os << "aglowav2::" <<concepts::typeOf(*this)<<"(" << wavspc_ << " --> ";
125 return os << wavspc_.space() << ')';
126 }
127
128} // namespace aglowav
129
130#endif // aglowav2trafo_hh
131
void operator()(const concepts::Function< F > &fncC, concepts::Function< F > &fncW)
C2W(const Haar3d0< F > &wavspc)
Constructor.
Definition trafo.hh:56
std::ostream & info(std::ostream &os) const
Information about the operator.
Definition trafo.hh:65
const Haar3d0< F > & spaceX() const
Spaces of the transformation.
Definition trafo.hh:40
~C2W()
Destructor.
Definition trafo.hh:30
W2C(const Haar3d0< F > &wavspc)
Constructor.
Definition trafo.hh:113
void operator()(const concepts::Function< F > &fncW, concepts::Function< F > &fncC)
~W2C()
Destructor.
Definition trafo.hh:81
const concepts::Space< F > & spaceX() const
Spaces of the transformation.
Definition trafo.hh:91
std::ostream & info(std::ostream &os) const
Information about the operator.
Definition trafo.hh:123
virtual void operator()()
std::string typeOf(const T &t)
Definition output.hh:43