World Builder
0.1.0-pre
A geodyanmic initial conditions generator
|
#include <point.h>
Public Member Functions | |
Point () | |
Point (const std::array< double, dim > &location, CoordinateSystem coordinate_system=CoordinateSystem::cartesian) | |
Point (const Point< dim > &point, CoordinateSystem coordinate_system=CoordinateSystem::cartesian) | |
Point (const double x, const double y, CoordinateSystem coordinate_system=CoordinateSystem::cartesian) | |
Point (const double x, const double y, const double z, CoordinateSystem coordinate_system=CoordinateSystem::cartesian) | |
~Point () | |
Point< dim > & | operator= (const Point< dim > &point) |
double | operator* (const Point< dim > &point) const |
Point< dim > | operator* (const double scalar) const |
Point< dim > | operator+ (const Point< dim > &point) const |
Point< dim > | operator- (const Point< dim > &point) const |
Point< dim > & | operator*= (const double scalar) |
Point< dim > & | operator+= (const Point< dim > &point) |
Point< dim > & | operator-= (const Point< dim > &point) |
const double & | operator[] (const unsigned int index) const |
double & | operator[] (const unsigned int index) |
const std::array< double, dim > & | get_array () const |
CoordinateSystem | get_coordinate_system () const |
double | norm () const |
double | norm_square () const |
template<> | |
Point () | |
template<> | |
Point () | |
template<> | |
Point (const double x, const double y, CoordinateSystem coordinate_system_) | |
template<> | |
Point (const double, const double, CoordinateSystem coordinate_system_) | |
template<> | |
Point (const double, const double, const double, CoordinateSystem coordinate_system_) | |
template<> | |
Point (const double x, const double y, const double z, CoordinateSystem coordinate_system_) | |
template<> | |
double | norm_square () const |
template<> | |
double | norm_square () const |
A class which stores 2d and 3d arrays of doubles (depending on the dimension), and the coordinate system which the coordinates can be used for. It also implements several operations such as the computation of the l2 norm and the dot product.
WorldBuilder::Point< dim >::Point | ( | ) |
Constructor. Constructs a Point at (0,0) in 2d or (0,0,0) in 3d with a Cartesian coordinate system.
WorldBuilder::Point< dim >::Point | ( | const std::array< double, dim > & | location, |
CoordinateSystem | coordinate_system = CoordinateSystem::cartesian |
||
) |
WorldBuilder::Point< dim >::Point | ( | const Point< dim > & | point, |
CoordinateSystem | coordinate_system = CoordinateSystem::cartesian |
||
) |
WorldBuilder::Point< dim >::Point | ( | const double | x, |
const double | y, | ||
CoordinateSystem | coordinate_system = CoordinateSystem::cartesian |
||
) |
Constructor. Constructs a 2d Point from two doubles and a coordinate system which is set by default to Cartesian.
WorldBuilder::Point< dim >::Point | ( | const double | x, |
const double | y, | ||
const double | z, | ||
CoordinateSystem | coordinate_system = CoordinateSystem::cartesian |
||
) |
Constructor. Constructs a 3d Point from three doubles and a coordinate system which is set by default to Cartesian.
WorldBuilder::Point< dim >::~Point | ( | ) |
WorldBuilder::Point< 3 >::Point | ( | ) |
WorldBuilder::Point< 2 >::Point | ( | ) |
WorldBuilder::Point< 2 >::Point | ( | const double | x, |
const double | y, | ||
CoordinateSystem | coordinate_system_ | ||
) |
WorldBuilder::Point< 3 >::Point | ( | const double | , |
const double | , | ||
CoordinateSystem | coordinate_system_ | ||
) |
WorldBuilder::Point< 2 >::Point | ( | const double | , |
const double | , | ||
const double | , | ||
CoordinateSystem | coordinate_system_ | ||
) |
WorldBuilder::Point< 3 >::Point | ( | const double | x, |
const double | y, | ||
const double | z, | ||
CoordinateSystem | coordinate_system_ | ||
) |
const std::array< double, dim > & WorldBuilder::Point< dim >::get_array | ( | ) | const |
CoordinateSystem WorldBuilder::Point< dim >::get_coordinate_system | ( | ) | const |
double WorldBuilder::Point< dim >::norm | ( | ) | const |
double WorldBuilder::Point< dim >::norm_square | ( | ) | const |
Computes the square of the norm, which is the sum of the absolute squares x_i * x_i + y_i * y_i + z_i * z_i in 3d.
double WorldBuilder::Point< 2 >::norm_square | ( | ) | const |
double WorldBuilder::Point< 3 >::norm_square | ( | ) | const |
double WorldBuilder::Point< dim >::operator* | ( | const Point< dim > & | point | ) | const |
Point< dim > WorldBuilder::Point< dim >::operator* | ( | const double | scalar | ) | const |
Point< dim > & WorldBuilder::Point< dim >::operator*= | ( | const double | scalar | ) |
Point< dim > WorldBuilder::Point< dim >::operator+ | ( | const Point< dim > & | point | ) | const |
Point< dim > & WorldBuilder::Point< dim >::operator+= | ( | const Point< dim > & | point | ) |
Point< dim > WorldBuilder::Point< dim >::operator- | ( | const Point< dim > & | point | ) | const |
Point< dim > & WorldBuilder::Point< dim >::operator-= | ( | const Point< dim > & | point | ) |
Point< dim > & WorldBuilder::Point< dim >::operator= | ( | const Point< dim > & | point | ) |
const double & WorldBuilder::Point< dim >::operator[] | ( | const unsigned int | index | ) | const |
double & WorldBuilder::Point< dim >::operator[] | ( | const unsigned int | index | ) |