Class documentation of Concepts

Loading...
Searching...
No Matches
f01.hh
Go to the documentation of this file.
1
6#ifndef clusterF01_hh
7#define clusterF01_hh
8
10#include "toolbox/hashMap.hh"
11#include "cluster/expansion.hh"
12#include "cluster/f.hh"
13
14namespace cluster {
15
16 // ******************************************************************* F01 **
17
23 template<class NodeX, class NodeY>
24 class F01 : public ClstF<NodeX, NodeY> {
25 public:
29 typedef typename ClstF<NodeX, NodeY>::FX FX;
30 typedef typename ClstF<NodeX, NodeY>::FY FY;
33 private:
36 class Ffld {
38 Ffld* lnk_;
40 uint sigma_, tau_;
42 FColExp* val_;
43
44 public:
45 inline Ffld(uint blksz, const ExpansionF<FX>& exp, uint sigma,
46 uint tau, Ffld* lnk)
47 : lnk_(lnk), sigma_(sigma), tau_(tau) {
48 val_ = exp.getCol(blksz);
49 }
50 inline ~Ffld() {delete val_;}
51
52 inline Ffld* link() const {return lnk_;}
53 inline uint sigma() const {return sigma_;}
54 inline uint tau() const {return tau_;}
55 inline FColExp* val() const {return val_;}
56 };
57
59 const Tree<NodeX>& treeX_;
60 const Tree<NodeY>& treeY_;
61
63 const ExpansionF<FX>& exp_;
64
66 uint m_;
68 concepts::Real eta_;
70 uint minsz_;
72 Ffld* ffld_;
74 uint nffld_;
78 uint nnfld_;
79
81 void constructor_(const NodeX* clstX, const NodeY* clstY);
83 void constructorSym_(const NodeX* clstX, const NodeY* clstY);
87 template<class Trts, class Nd>
88 uint info_(uint idx, const Nd* clst,
89 std::unordered_map<uint, uint>& nlf) const;
90
91 protected:
93 std::ostream& info(std::ostream& os) const;
94
95 public:
105 F01(const Tree<NodeX>& treeX, const Tree<NodeY>& treeY,
106 const ExpansionF<FX>& exp, concepts::Real eta, uint minsz);
115 F01(const Tree<NodeX>& tree, const ExpansionF<FX>& exp,
116 concepts::Real eta, uint minsz);
117
118 ~F01();
119
121 void operator()(const ClstY<NodeY>& vecY, ClstX<NodeX>& vecX) const;
123 inline NfldScan* scan() const {
124 return new concepts::ListScan<NfldNodes>(*nfld_);
125 }
127 inline float memory() const;
133 std::ostream& info(std::ostream& os, uint idxX, uint idxY) const;
134 };
135
136 template<class NodeX, class NodeY>
137 inline float F01<NodeX,NodeY>::memory() const {
138 return sizeof(F01<NodeX,NodeY>)
139 + (float)nffld_ *
140 (sizeof(typename F01<NodeX,NodeY>::Ffld)
141 + (ffld_ ? ffld_->val()->memory(exp_.blksz(m_)) : 0))
142 + (float)nnfld_ * sizeof(concepts::Joiner<NfldNodes, 1>);
143 }
144
145} // namespace cluster
146
147#endif // clusterF01_hh
virtual FColExp * getCol(uint blksz) const =0
float memory() const
Memory used by F01 in bytes.
Definition f01.hh:137
std::ostream & info(std::ostream &os, uint idxX, uint idxY) const
F01(const Tree< NodeX > &treeX, const Tree< NodeY > &treeY, const ExpansionF< FX > &exp, concepts::Real eta, uint minsz)
void operator()(const ClstY< NodeY > &vecY, ClstX< NodeX > &vecX) const
Application operator.
NfldScan * scan() const
Scanner for the nearfield.
Definition f01.hh:123
ClstF< NodeX, NodeY >::TraitsX TraitsX
Interface of the far field.
Definition f01.hh:27
F01(const Tree< NodeX > &tree, const ExpansionF< FX > &exp, concepts::Real eta, uint minsz)
std::ostream & info(std::ostream &os) const
Some basic informations.
double Real
Definition typedefs.hh:39
Set< F > makeSet(uint n, const F &first,...)
Definition set.hh:320