Line | |
---|
1 | #ifndef DistCalc_h |
---|
2 | #define DistCalc_h |
---|
3 | |
---|
4 | typedef float dist_t; |
---|
5 | const dist_t BIG_DIST = (dist_t) 1e29; |
---|
6 | |
---|
7 | class DistFunc; |
---|
8 | |
---|
9 | class DistCalc |
---|
10 | { |
---|
11 | public: |
---|
12 | virtual void CalcDistRange(unsigned i, dist_t Dist[]) const = 0; |
---|
13 | virtual unsigned GetCount() const = 0; |
---|
14 | virtual unsigned GetId(unsigned i) const = 0; |
---|
15 | virtual const char *GetName(unsigned i) const = 0; |
---|
16 | }; |
---|
17 | |
---|
18 | class DistCalcDF : public DistCalc |
---|
19 | { |
---|
20 | public: |
---|
21 | void Init(const DistFunc &DF); |
---|
22 | virtual void CalcDistRange(unsigned i, dist_t Dist[]) const; |
---|
23 | virtual unsigned GetCount() const; |
---|
24 | virtual unsigned GetId(unsigned i) const; |
---|
25 | virtual const char *GetName(unsigned i) const; |
---|
26 | |
---|
27 | private: |
---|
28 | const DistFunc *m_ptrDF; |
---|
29 | }; |
---|
30 | |
---|
31 | class DistCalcMSA : public DistCalc |
---|
32 | { |
---|
33 | public: |
---|
34 | void Init(const MSA &msa, DISTANCE Distance); |
---|
35 | virtual void CalcDistRange(unsigned i, dist_t Dist[]) const; |
---|
36 | virtual unsigned GetCount() const; |
---|
37 | virtual unsigned GetId(unsigned i) const; |
---|
38 | virtual const char *GetName(unsigned i) const; |
---|
39 | |
---|
40 | private: |
---|
41 | const MSA *m_ptrMSA; |
---|
42 | DISTANCE m_Distance; |
---|
43 | }; |
---|
44 | |
---|
45 | #endif // DistCalc_h |
---|
Note: See
TracBrowser
for help on using the repository browser.