#include <Point.h>
Public Member Functions | |
| Point (int dimension) | |
| Point (vector< double > &toCopy) | |
| unsigned int | getDimension () const | 
| double | getCoordinate (const int index) const | 
| void | setCoordinate (const int index, const double value) | 
| void | setCoordinates (vector< double > values) | 
| Point * | operator- (const Point other) const | 
| string | toString () const | 
Private Attributes | |
| vector< double > | m_coordinates | 
Definition at line 21 of file Point.h.
| Point::Point | ( | int | dimension | ) | 
Base point constructor.
| dimension | The dimensionality of the newly created point. | 
Definition at line 13 of file Point.cpp.
References m_coordinates.
Referenced by operator-().
| Point::Point | ( | vector< double > & | toCopy | ) | 
Point 'copy' constructor.
| toCopy | Converts a STL vector< double > to a point object. | 
Definition at line 15 of file Point.cpp.
References m_coordinates.
| unsigned int Point::getDimension | ( | ) | const | 
Gets the dimension of the current node.
Definition at line 23 of file Point.cpp.
References m_coordinates.
Referenced by Cubic_Bounding_Box::contains(), Polytope::getDimension(), and Cart::Norm().
| double Point::getCoordinate | ( | const int | index | ) | const | 
Gets the coordinate on a given dimension.
| index | The dimension we wish to know the coordinate on | 
Definition at line 17 of file Point.cpp.
References m_coordinates.
Referenced by Cubic_Bounding_Box::contains(), Cart::Norm(), and operator-().
| void Point::setCoordinate | ( | const int | index, | |
| const double | value | |||
| ) | 
Sets the coordinate on a given dimension.
| index | The dimension we wish to set the coordinate on | |
| value | The coordinate value we wish to set | 
| void Point::setCoordinates | ( | vector< double > | values | ) | 
Sets the coordinate to match that of a given STL vector.
| values | The STL vector< double > we wish to copy | 
Definition at line 21 of file Point.cpp.
References m_coordinates.
Referenced by operator-().
Convenience method for dimension-by-dimension substraction of point coordinates.
Beware to not call this method instead of Metric.subtract(), where appropiate!
| other | The other point | 
Definition at line 25 of file Point.cpp.
References getCoordinate(), m_coordinates, Point(), and setCoordinates().
| string Point::toString | ( | ) | const | 
Prints a point nicely to string format.
Definition at line 47 of file Point.cpp.
References m_coordinates.
Referenced by operator<<().
vector<double> Point::m_coordinates [private]           | 
        
Vector used to store the point coordinates.
Definition at line 24 of file Point.h.
Referenced by getCoordinate(), getDimension(), operator-(), Point(), setCoordinates(), and toString().
 1.5.2