![]() |
ATLAS Offline Software
|
Class for k-dimensional point. More...
#include <KDPoint.h>
Public Member Functions | |
KDPoint () | |
KDPoint (std::array< T, D > &arr) | |
KDPoint (std::array< T, D > &&arr) | |
KDPoint (const std::vector< T > &v) | |
KDPoint (std::initializer_list< T > list) | |
const KDPoint< T, D > | operator+ (const KDPoint< T, D > &other) const |
Add each elements except weights. More... | |
const KDPoint< T, D > | operator- (const KDPoint< T, D > &other) const |
Subtract each elements except weights. More... | |
KDPoint< T, D > & | operator+= (const KDPoint< T, D > &other) |
KDPoint< T, D > & | operator-= (const KDPoint< T, D > &other) |
template<typename I > | |
const KDPoint< T, D > | operator* (const I &other) const |
Multiply each elements except weights. More... | |
template<typename I > | |
const KDPoint< T, D > | operator/ (const I &other) const |
Divide each elements except weights. More... | |
T & | operator[] (size_t i) |
Return i-th element. More... | |
const T & | operator[] (size_t i) const |
Return i-th element. More... | |
KDPoint< T, D > | average (const KDPoint< T, D > &p) |
Return average point of this point and given point. More... | |
Member Accessors | |
Return position of the point. | |
const std::array< T, D > & | getPos () const |
T | at (size_t i) const |
Return i-th element. If given i exceeds the size, return NaN. More... | |
double | getWeight () const |
Return the weight of the point. More... | |
void | setWeight (double w) |
Set the weight to given value. More... | |
Static Public Member Functions | |
static KDPoint< T, D > | average (const std::vector< KDPoint< T, D >> &) |
Private Attributes | |
std::array< T, D > | m_point |
double | m_weight |
Class for k-dimensional point.
Template parameters
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
private |