#include <point_site.hh>
Related Functions | |
(Note that these are not member functions.) | |
template<typename L, typename R> | |
L::dpoint | operator- (const Point_Site< L > &lhs, const Point_Site< R > &rhs) |
Difference between a couple of point site lhs and rhs . | |
template<typename P> | |
std::ostream & | operator<< (std::ostream &ostr, const Point_Site< P > &p) |
Print a point site p into the output stream ostr . | |
template<typename L, typename R> | |
bool | operator== (const Point_Site< L > &lhs, const Point_Site< R > &rhs) |
Equality comparison between a couple of point site lhs and rhs . | |
template<typename P, typename D> | |
P::point | operator+ (const Point_Site< P > &p, const Delta_Point_Site< D > &dp) |
Add a delta-point rhs to a point site lhs . | |
template<typename P, typename D> | |
P::point | operator- (const Point_Site< P > &p, const Delta_Point_Site< D > &dp) |
} |
A point site ("psite" for short) is an object that allows an efficient access to data associated with a point. A point site is either a point or designates a point.
When a point site is not really a point, it is automatically convertible to the point it designates.
Let us take the example of a 2D image encoded as an array of runs of values. With a point, a pair (row index, column index), retrieving the corresponding pixel value would mean to browse the array of runs to find the value location. That would not be efficient. Conversely, a point site dedicated to this image structure allows for value access in contant time; precisely the proper point site is a pair (index of run, index within the run).
P::point operator+ | ( | const Point_Site< P > & | p, | |
const Delta_Point_Site< D > & | dp | |||
) | [related] |
Add a delta-point rhs
to a point site lhs
.
[in] | p | A point site. |
[in] | dp | A delta-point. |
dp
has to compatible with the type of p
.
P::point operator- | ( | const Point_Site< P > & | p, | |
const Delta_Point_Site< D > & | dp | |||
) | [related] |
}
Substract a delta-point dp
to a point site p
.
[in] | p | A point site. |
[in] | dp | A delta-point. |
dp
has to compatible with the type of p
.
L::dpoint operator- | ( | const Point_Site< L > & | lhs, | |
const Point_Site< R > & | rhs | |||
) | [related] |
Difference between a couple of point site lhs
and rhs
.
lhs
and rhs
have to be defined on the same topology and with the same type of coordinates; otherwise this test does not compile.dp
, is such as lhs
== rhs
+ dp
.std::ostream & operator<< | ( | std::ostream & | ostr, | |
const Point_Site< P > & | p | |||
) | [related] |
bool operator== | ( | const Point_Site< L > & | lhs, | |
const Point_Site< R > & | rhs | |||
) | [related] |