Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Search for

# tests/ptv.h

Go to the documentation of this file.

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