Line | |
---|
1 | #ifndef ClustSetDF_h |
---|
2 | #define ClustSetDF_h |
---|
3 | |
---|
4 | class MSA; |
---|
5 | class Clust; |
---|
6 | |
---|
7 | #include "clustset.h" |
---|
8 | #include "distfunc.h" |
---|
9 | #include "msa.h" |
---|
10 | |
---|
11 | class ClustSetDF : public ClustSet |
---|
12 | { |
---|
13 | public: |
---|
14 | ClustSetDF(const DistFunc &DF) : |
---|
15 | m_ptrDF(&DF) |
---|
16 | { |
---|
17 | } |
---|
18 | |
---|
19 | public: |
---|
20 | virtual unsigned GetLeafCount() |
---|
21 | { |
---|
22 | return m_ptrDF->GetCount(); |
---|
23 | } |
---|
24 | virtual const char *GetLeafName(unsigned uNodeIndex) |
---|
25 | { |
---|
26 | return m_ptrDF->GetName(uNodeIndex); |
---|
27 | } |
---|
28 | virtual unsigned GetLeafId(unsigned uNodeIndex) |
---|
29 | { |
---|
30 | return m_ptrDF->GetId(uNodeIndex); |
---|
31 | } |
---|
32 | virtual void JoinNodes(const Clust &C, unsigned uLeftNodeIndex, |
---|
33 | unsigned uRightNodeIndex, unsigned uJoinedNodeIndex, |
---|
34 | double *ptrdLeftLength, double *ptrdRightLength) |
---|
35 | { |
---|
36 | Quit("ClustSetDF::JoinNodes, should never be called"); |
---|
37 | } |
---|
38 | virtual double ComputeDist(const Clust &C, unsigned uNodeIndex1, |
---|
39 | unsigned uNodeIndex2) |
---|
40 | { |
---|
41 | return m_ptrDF->GetDist(uNodeIndex1, uNodeIndex2); |
---|
42 | } |
---|
43 | |
---|
44 | private: |
---|
45 | const DistFunc *m_ptrDF; |
---|
46 | }; |
---|
47 | |
---|
48 | #endif // ClustSetDF_h |
---|
Note: See
TracBrowser
for help on using the repository browser.