00001 #ifndef __LIBHYPERPOINT__ 00002 #define __LIBHYPERPOINT__ 00003 00012 #include <iostream> 00013 #include <ostream> 00015 00016 typedef float xsd__float; 00017 typedef int xsd__int; 00018 00019 //namespace libhyperpoint { 00020 00026 class hyperpoint 00027 { 00028 public: 00029 xsd__float * __ptr; 00030 xsd__int __size; 00031 00032 hyperpoint (); 00038 hyperpoint (xsd__int size); 00042 hyperpoint (const hyperpoint & point); 00043 virtual ~ hyperpoint (); 00050 virtual xsd__int size () const; 00056 virtual void initialize (int size); 00062 virtual void reset (void); 00068 virtual xsd__float & operator[] (xsd__int i) const; 00074 virtual xsd__float operator () (xsd__int i) const; 00080 virtual hyperpoint & operator= (const hyperpoint & point); 00085 virtual void print () const; 00090 virtual void print (std::ostream &printstream) const; 00094 virtual double norm2() const; 00100 virtual hyperpoint operator - (const hyperpoint & point) const; 00106 virtual bool operator < (double threshold) const; 00111 virtual double dist2(const hyperpoint &point) const; 00112 }; 00119 class hyperarray 00120 { 00121 public: 00122 hyperpoint * __ptr; 00123 xsd__int __size; 00124 00125 hyperarray (); 00130 hyperarray (xsd__int size); 00134 hyperarray (const hyperarray & array); 00135 virtual ~ hyperarray (); 00140 virtual xsd__int size () const; 00146 virtual void initialize (int size); 00150 virtual void reset (void); 00156 virtual hyperpoint & operator[] (xsd__int i) const; 00162 virtual hyperpoint operator () (xsd__int i) const; 00168 virtual hyperarray & operator= (const hyperarray & array); 00172 virtual void print () const; 00177 virtual void print (std::ostream &printstream) const; 00178 }; 00179 00180 //}// namespace libhyperpoint 00181 00182 #endif // __LIBHYPERPOINT__