summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/ovision/see/hotelling.hh
diff options
context:
space:
mode:
Diffstat (limited to '2005/i/robert/src/ovision/see/hotelling.hh')
-rw-r--r--2005/i/robert/src/ovision/see/hotelling.hh28
1 files changed, 2 insertions, 26 deletions
diff --git a/2005/i/robert/src/ovision/see/hotelling.hh b/2005/i/robert/src/ovision/see/hotelling.hh
index 8acf3b3..ba32027 100644
--- a/2005/i/robert/src/ovision/see/hotelling.hh
+++ b/2005/i/robert/src/ovision/see/hotelling.hh
@@ -26,31 +26,7 @@
#include <vector>
#include "oconfig.hh"
-
-class Hpoint
-{
- double p_[2];
- public:
- Hpoint () {p_[0]=0; p_[1]=0;}
- Hpoint (const int i, const int j) {set (i, j);}
- inline double operator [] (const unsigned i) const {return i<2?p_[i]:0;}
- inline Hpoint& operator = (Hpoint &h)
- {
- if (&h != this)
- {
- h.p_[0] = p_[0];
- h.p_[1] = p_[1];
- }
- return *this;
- }
- inline void set (const double i, const double j)
- {p_[0]=i; p_[1]=j;}
- inline void norm ()
- {
- double n = sqrt (p_[0]*p_[0] + p_[1]*p_[1]);
- p_[0] /= n; p_[1] /= n;
- }
-};
+#include "hpoint.hh"
/// Detecte l'orientation principale d'une masse de données
class Hotelling
@@ -78,7 +54,7 @@ class Hotelling
/// Affiche la matrice de covariance
void showCovMatrix () const;
/// Affiche les eigenvectors
- void showEigenVectors () const;
+ void show () const;
/// Calcul des eigenvectors
void eigenVectors ();
/// Accessors