Biorithm
1.1
|
Public Member Functions | |
Point_d (int d=0) | |
Point_d (int d, const vector< NT > &c, const set< unsigned int > *missing=NULL) | |
Point_d (const Point_d &other) | |
unsigned int | getNumDimensions () const |
NT | operator[] (int i) const |
bool | isDimMissing (unsigned int i) const |
unsigned int | getNumMissingDimensions () const |
void | standardise () |
void | standardise (MyNT m, MyNT s) |
void | print (ostream &ostr) const |
virtual void | randomise () |
NT & | operator[] (int i) |
Protected Member Functions | |
void | addMissingDim (unsigned int i) |
void | deleteMissingDim (unsigned int i) |
Protected Attributes | |
unsigned int | dimension |
set< unsigned int > | missingDims |
vector< NT > | coords |
Friends | |
ostream & | operator<< (ostream &ostr, const Point_d &pt) |
istream & | operator>> (istream &istr, Point_d &pt) |
unsigned int Point_d< NT >::getNumMissingDimensions | ( | ) | const [inline] |
Return the number of dimensions with missing values.
Constructs a random permutation of the coordinates of the point and stores the new permutation in place. The random permutation is uniformly chosen from all possible permutations. STL's random_shuffle() function does all the hard word.
void Point_d< NT >::standardise | ( | ) | [inline] |
Standardise the point.
Linearly transform the point's coordinates to have mean 0 and standard deviation 1.
void Point_d< NT >::standardise | ( | MyNT | m, |
MyNT | s | ||
) | [inline] |
Standardise the point to have the given mean and standard deviation.
Linearly transform the point's coordinates to have mean m and standard deviation s.