Assignments
Assignments
|
#include <geometry.h>
Public Member Functions | |
Point (void) | |
Point (const Point &p) | |
template<typename ... Doubles> | |
Point (Doubles ... values) | |
double & | operator[] (int index) |
const double & | operator[] (int index) const |
Point | operator* (const Point &p) const |
Point & | operator*= (const Point &p) |
Point | operator/ (const Point &p) const |
Point & | operator/= (const Point &p) |
Point | operator* (double s) const |
Point | operator+ (const Point &p) const |
double | dot (const Point &p) const |
template<typename ... Points> | |
Point< Dim > | CrossProduct (Points ... points) |
Public Member Functions inherited from Util::_InnerProductSpace< Element > | |
double | squareNorm (void) const |
double | length (void) const |
Element | unit (void) const |
Static Public Member Functions | |
template<typename ... Points> | |
static Point | CrossProduct (Points ... points) |
static Point | CrossProduct (Point *points) |
static Point | CrossProduct (const Point *points) |
Static Public Member Functions inherited from Util::_InnerProductSpace< Element > | |
static double | Dot (const Element &e1, const Element &e2) |
static double | SquareNorm (const Element &e) |
static double | Length (const Element &e) |
static double | SquareDistance (const Element &e1, const Element &e2) |
static double | Distance (const Element &e1, const Element &e2) |
Private Member Functions | |
void | _init (const double *values, unsigned int sz) |
Private Attributes | |
double | _p [Dim] |
This templated class represents a Dim-dimenaional vector
Util::Point< Dim >::Point | ( | void | ) |
Default constructor, initializes coefficients to zero.
Util::Point< Dim >::Point | ( | const Point< Dim > & | p | ) |
Copy constructor
Util::Point< Dim >::Point | ( | Doubles ... | values | ) |
Variadic constructor. Assumes the number of values is equal to the dimension and that all values are doubles.
|
private |
Initializes coordinate values from an array
|
static |
This method returns the cross-product of Dim-1 points.
|
static |
This method returns the cross-product of Dim-1 points.
|
static |
This method returns the cross-product of Dim-1 points.
Point< Dim > Util::Point< Dim >::CrossProduct | ( | Points ... | points | ) |
double Util::Point< Dim >::dot | ( | const Point< Dim > & | p | ) | const |
Dot-product method for inner-product space
Point< Dim > Util::Point< Dim >::operator* | ( | const Point< Dim > & | p | ) | const |
This method performs a component-wise multiplication of two ponts and returns the product.
Point< Dim > Util::Point< Dim >::operator* | ( | double | s | ) | const |
Scaling method for vector space
Point< Dim > & Util::Point< Dim >::operator*= | ( | const Point< Dim > & | p | ) |
This method multiplies the coefficients of the current point by the coefficients of the input point.
Point< Dim > Util::Point< Dim >::operator+ | ( | const Point< Dim > & | p | ) | const |
Addition method for vector space
Point< Dim > Util::Point< Dim >::operator/ | ( | const Point< Dim > & | p | ) | const |
This method performs a component-wise division of two ponts and returns the ratio.
Point< Dim > & Util::Point< Dim >::operator/= | ( | const Point< Dim > & | p | ) |
This method divides the coefficients of the current point by the coefficients of the input point.
double & Util::Point< Dim >::operator[] | ( | int | index | ) |
This method returns a reference to the indexed coefficient.
const double & Util::Point< Dim >::operator[] | ( | int | index | ) | const |
This method returns a reference to the indexed coefficient.
|
private |
The coordinates of the point