#include <ptv.h>
Public Member Functions | |
ptv (int size_) | |
ptv (int size_, double *v_) | |
ptv (const ptv &p) | |
ptv () | |
virtual | ~ptv () |
const int | size () const |
const double & | operator[] (int i) const |
double & | operator[] (int i) |
ptv & | operator= (const ptv &p) |
bool | is_less (const ptv &p) const |
ptv () | |
ptv (int size_, double *v_) | |
ptv (const ptv &p) | |
~ptv () | |
const int | size () const |
const double & | operator[] (int i) const |
double & | operator[] (int i) |
ptv & | operator= (const ptv &p) |
bool | is_less (const ptv &p) const |
Private Attributes | |
int | dim |
double * | v |
double * | v |
Static Private Attributes | |
static double | tol = 10e-6 |
Definition at line 7 of file syfi/ptv.h.
|
Definition at line 12 of file syfi/ptv.cpp. 00012 { 00013 dim = size_; 00014 v = new double[dim]; 00015 for (int i=0; i< dim; i++) { 00016 v[i] = 0.0; 00017 } 00018 }
|
|
Definition at line 21 of file syfi/ptv.cpp. 00021 { 00022 dim = size_; 00023 v = new double[dim]; 00024 for (int i=0; i< dim; i++) { 00025 v[i] = v_[i]; 00026 } 00027 }
|
|
Definition at line 29 of file syfi/ptv.cpp. References dim, size(), and v. 00029 { 00030 dim = p.size(); 00031 v = new double[dim]; 00032 for (int i=0; i< dim; i++) { 00033 v[i] = p[i]; 00034 } 00035 00036 }
|
|
Definition at line 7 of file syfi/ptv.cpp.
|
|
Definition at line 38 of file syfi/ptv.cpp.
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 67 of file syfi/ptv.cpp. References dim, size(), tol, and v. Referenced by ptv_is_less::operator()(). 00067 { 00068 double tmp = 0; 00069 00070 if ( dim < p.size() ) return true ; 00071 if ( dim > p.size() ) return false; 00072 00073 for (int i=dim-1; i>= 0; i--) { 00074 if ( v[i] + tol >= p[i] && v[i] - tol <= p[i] ) { 00075 } else if ( v[i] - tol < p[i] ) { 00076 return true; 00077 } else if ( v[i] + tol > p[i] ) { 00078 return false ; 00079 } 00080 } 00081 return false; 00082 00083 00084 /* 00085 for (int i=0; i< dim; i++) { 00086 if ( v[i] + tol >= p[i] && v[i] - tol <= p[i] ) { 00087 } else if ( v[i] - tol < p[i] ) { 00088 return true; 00089 } else if ( v[i] + tol > p[i] ) { 00090 return false ; 00091 } 00092 } 00093 return false; 00094 */ 00095 }
|
|
|
|
Definition at line 52 of file syfi/ptv.cpp. References dim, size(), and v. 00052 { 00053 if ( this != &p) { 00054 if ( dim > 0 ) delete [] v; 00055 dim = p.size(); 00056 v = new double[dim]; 00057 for (int i=0; i< dim; i++) { 00058 v[i] = p[i]; 00059 } 00060 } 00061 return *this; 00062 }
|
|
|
|
|
|
Definition at line 48 of file syfi/ptv.cpp. References v. 00048 { 00049 return v[i]; 00050 }
|
|
Definition at line 44 of file syfi/ptv.cpp. References v. 00044 { 00045 return v[i]; 00046 }
|
|
|
|
Definition at line 42 of file syfi/ptv.cpp. References dim. Referenced by is_less(), operator<<(), operator=(), and ptv(). 00042 { return dim;}
|
|
Definition at line 9 of file syfi/ptv.h. Referenced by is_less(), operator=(), ptv(), size(), and ~ptv(). |
|
Definition at line 11 of file syfi/ptv.h. Referenced by is_less(). |
|
Definition at line 10 of file tests/ptv.h. |
|
Definition at line 10 of file syfi/ptv.h. Referenced by is_less(), operator=(), operator[](), ptv(), and ~ptv(). |