| Line | |
|---|
| 1 | #ifndef DistFunc_h |
|---|
| 2 | #define DistFunc_h |
|---|
| 3 | |
|---|
| 4 | class DistFunc |
|---|
| 5 | { |
|---|
| 6 | public: |
|---|
| 7 | DistFunc(); |
|---|
| 8 | virtual ~DistFunc(); |
|---|
| 9 | |
|---|
| 10 | public: |
|---|
| 11 | virtual void SetCount(unsigned uCount); |
|---|
| 12 | virtual void SetDist(unsigned uIndex1, unsigned uIndex2, float dDist); |
|---|
| 13 | |
|---|
| 14 | void SetName(unsigned uIndex, const char szName[]); |
|---|
| 15 | void SetId(unsigned uIndex, unsigned uId); |
|---|
| 16 | const char *GetName(unsigned uIndex) const; |
|---|
| 17 | unsigned GetId(unsigned uIndex) const; |
|---|
| 18 | |
|---|
| 19 | virtual float GetDist(unsigned uIndex1, unsigned uIndex2) const; |
|---|
| 20 | virtual unsigned GetCount() const; |
|---|
| 21 | |
|---|
| 22 | void LogMe() const; |
|---|
| 23 | |
|---|
| 24 | protected: |
|---|
| 25 | unsigned VectorIndex(unsigned uIndex, unsigned uIndex2) const; |
|---|
| 26 | unsigned VectorLength() const; |
|---|
| 27 | |
|---|
| 28 | private: |
|---|
| 29 | unsigned m_uCount; |
|---|
| 30 | unsigned m_uCacheCount; |
|---|
| 31 | float *m_Dists; |
|---|
| 32 | char **m_Names; |
|---|
| 33 | unsigned *m_Ids; |
|---|
| 34 | }; |
|---|
| 35 | |
|---|
| 36 | #endif // DistFunc_h |
|---|
Note: See
TracBrowser
for help on using the repository browser.