40 return static_cast<int>(
std::floor(scalar + 0.5));
48 return static_cast<double>(scalar);
53 template <
typename T,
int N>
56 for (
int n = 0; n < N; ++n) {
64 for (
int n = 0; n < 2; ++n) {
72 for (
int n = 0; n < 3; ++n) {
77 template <
typename T,
int N>
80 for (
int n = 0; n < N; ++n) r[n] = this->
_vector[n] == other[n];
84 template <
typename T,
int N>
87 for (
int n = 0; n < N; ++n) r[n] = this->
_vector[n] != other[n];
91 template <
typename T,
int N>
94 for (
int n = 0; n < N; ++n) r[n] = this->
_vector[n] < other[n];
98 template <
typename T,
int N>
101 for (
int n = 0; n < N; ++n) r[n] = this->
_vector[n] <= other[n];
105 template <
typename T,
int N>
108 for (
int n = 0; n < N; ++n) r[n] = this->
_vector[n] > other[n];
112 template <
typename T,
int N>
115 for (
int n = 0; n < N; ++n) r[n] = this->
_vector[n] >= other[n];
119 template <
typename T,
int N>
128 #define INSTANTIATE_TYPE_DIM(TYPE, DIM) \ 129 template class PointBase<TYPE, DIM>; \ 130 template class Point<TYPE, DIM>; \ 131 template std::size_t hash_value(Point<TYPE, DIM> const&); 132 #define INSTANTIATE_DIM(DIM) \ 133 INSTANTIATE_TYPE_DIM(int, DIM); \ 134 INSTANTIATE_TYPE_DIM(double, DIM); \ 135 template Point<int, DIM>::Point(Point<double, DIM> const &); \ 136 template Point<double, DIM>::Point(Point<int, DIM> const &);
CoordinateExpr< N > gt(Point< T, N > const &other) const
static int convert(U scalar)
ItemVariant const * other
CoordinateExpr< N > ne(Point< T, N > const &other) const
CoordinateExpr< N > eq(Point< T, N > const &other) const
A coordinate class intended to represent absolute positions.
CoordinateExpr< N > ge(Point< T, N > const &other) const
Point(T val=static_cast< T >(0))
Construct a Point with all elements set to the same scalar value.
A base class for image defects.
static double convert(U scalar)
std::unique_ptr< SchemaItem< U > > result
CoordinateExpr< N > le(Point< T, N > const &other) const
std::size_t hashCombine(std::size_t seed)
CoordinateExpr< N > lt(Point< T, N > const &other) const
std::size_t hash_value(Point< T, N > const &point)