29 #ifndef LSST_AFW_GEOM_COORDINATEBASE_H
30 #define LSST_AFW_GEOM_COORDINATEBASE_H
36 #include "boost/tuple/tuple.hpp"
38 namespace lsst {
namespace afw {
namespace geom {
40 template <
typename T,
int N=2>
class Point;
41 template <
typename T,
int N=2>
class Extent;
48 template <
typename Derived,
typename T,
int N>
85 template <
typename Vector>
92 template <
typename Derived,
typename T,
int N>
95 T rtol = static_cast<T>(1E-5),
96 T atol = static_cast<T>(1E-8)
102 template <
typename Derived,
typename T>
141 template <
typename Vector>
150 template <
typename Derived,
typename T>
192 template <
typename Vector>
198 template <
typename Derived,
typename T,
int N>
199 std::ostream & operator<<(std::ostream & os, CoordinateBase<Derived,T,N>
const & coordinate) {
200 os <<
"(" << coordinate[0];
201 for (
int n=1; n<N; ++n) os <<
", " << coordinate[n];
T const & operator[](int n) const
CoordinateBase(Eigen::MatrixBase< Vector > const &vector)
Initialize all elements from an N-d Eigen vector.
Eigen::Matrix< T, 2, 1, Eigen::DontAlign > EigenVector
Eigen::Matrix< T, 3, 1, Eigen::DontAlign > EigenVector
CoordinateBase(T val=static_cast< T >(0))
A coordinate class intended to represent offsets and dimensions.
std::pair< T, T > asPair() const
Return a std::pair representation of the coordinate object.
EigenVector const & asEigen() const
Return a fixed-size Eigen representation of the coordinate object.
boost::tuple< T, T > asTuple() const
Return a boost::tuple representation of the coordinate object.
Eigen::Matrix< T, N, 1, Eigen::DontAlign > EigenVector
A CRTP base class for coordinate objects.
A coordinate class intended to represent absolute positions.
CoordinateBase(Eigen::MatrixBase< Vector > const &vector)
T const & coeffRef(int n) const
T const & coeffRef(int n) const
CoordinateBase(T val=static_cast< T >(0))
void _swap(CoordinateBase &other)
CoordinateBase(T val=static_cast< T >(0))
Initialize all elements to a scalar.
static int const dimensions
boost::tuple< T, T, T > asTuple() const
Return a boost::tuple representation of the coordinate object.
bool allclose(CoordinateBase< Derived, T, N > const &a, CoordinateBase< Derived, T, N > const &b, T rtol=static_cast< T >(1E-5), T atol=static_cast< T >(1E-8))
T const & operator[](int n) const
void _swap(CoordinateBase &other)
void _swap(CoordinateBase &other)
EigenVector const & asEigen() const
Return a fixed-size Eigen representation of the coordinate object.
T const & coeffRef(int n) const
afw::table::Key< double > b
T const & operator[](int n) const
EigenVector const & asEigen() const
Return a fixed-size Eigen representation of the coordinate object.
CoordinateBase(Eigen::MatrixBase< Vector > const &vector)