00001 #ifndef PTV_INCLUDED
00002 #define PTV_INCLUDED
00003
00004
00005 #include <map>
00006
00007 class ptv {
00008 private:
00009 int dim;
00010 double* v;
00011 static double tol;
00012
00013 public:
00014 ptv(int size_);
00015 ptv(int size_, double* v_);
00016 ptv(const ptv& p);
00017 ptv();
00018
00019 virtual ~ptv();
00020
00021 const int size() const;
00022
00023 const double& operator [] (int i) const;
00024 double& operator [] (int i);
00025 ptv& operator = (const ptv& p);
00026
00027 bool is_less(const ptv& p) const;
00028
00029 };
00030
00031 struct ptv_is_less : public std::binary_function<ptv, ptv, bool> {
00032 bool operator() (const ptv &lh, const ptv &rh) const { return lh.is_less(rh); }
00033 };
00034
00035 std::ostream & operator<< ( std::ostream& os, const ptv& p);
00036
00037
00038 #endif
00039