eckit::geometry::Point2 class

Base classes

template<int SIZE = 2>
class KPoint<2>
A generic point in K dimension cartesian space.

Derived classes

class atlas::PointLonLat
Point in longitude-latitude coordinate system. This class does not normalise the longitude by default, but contains a normalise function.
class atlas::PointXY
Point in arbitrary XY-coordinate system.

Public static variables

static const size_t DIMS

Public static functions

static auto dimensions() -> size_t
static auto distance(const KPoint& p1, const KPoint& p2) -> double
static auto distance(const KPoint& p1, const KPoint& p2, unsigned int axis) -> double
static auto distance2(const KPoint& p1, const KPoint& p2) -> double
static auto equal(const KPoint& p1, const KPoint& p2) -> bool
static auto norm(const KPoint& p1) -> double
static auto dot(const KPoint& p1, const KPoint& p2) -> double
static auto add(const KPoint& p1, const KPoint& p2) -> KPoint
static auto middle(const KPoint& p1, const KPoint& p2) -> KPoint
static auto sub(const KPoint& p1, const KPoint& p2) -> KPoint
static auto mul(const KPoint& p, double m) -> KPoint
static auto div(const KPoint& p, double m) -> KPoint
static auto componentsMin(const KPoint& p1, const KPoint& p2) -> KPoint
static auto componentsMax(const KPoint& p1, const KPoint& p2) -> KPoint
static auto normalize(const KPoint& p) -> KPoint
static auto mean(const Container& points) -> Container::value_type
static auto symetrical(const KPoint& w, const KPoint& c) -> KPoint
static void normalizeAll(Container& c, KPoint& offset, KPoint& scale)

Constructors, destructors, conversion operators

Point2()
Point2(const BasePoint& p)
Point2(const double* p)
Point2(double x, double y)
operator eckit::Value() const

Public functions

auto x() const -> double
auto y() const -> double
auto x(size_t axis) const -> double
auto operator[](const size_t& i) const -> double
auto operator[](const size_t& i) -> double&
template<typename T>
void assign(const T& p)
auto point() const -> const KPoint&
auto point() -> KPoint&
auto data() -> double*
auto data() const -> const double*
auto operator()(const size_t& i) const -> double
auto operator<(const KPoint& other) const -> bool
void print(std::ostream& s) const
auto distance(const KPoint& p) const -> double
auto distance2(const KPoint& p) const -> double
auto operator==(const KPoint& other) const -> bool
auto operator!=(const KPoint& other) const -> bool
void normalize(const KPoint& offset, const KPoint& scale)
auto begin() const -> const double*
auto end() const -> const double*
auto operator+(const KPoint& other) const -> KPoint
auto operator-(const KPoint& other) const -> KPoint
auto operator*(const double s) const -> KPoint

Function documentation

static size_t eckit::geometry::Point2::dimensions()

static double eckit::geometry::Point2::distance(const KPoint& p1, const KPoint& p2)

static double eckit::geometry::Point2::distance(const KPoint& p1, const KPoint& p2, unsigned int axis)

static double eckit::geometry::Point2::distance2(const KPoint& p1, const KPoint& p2)

static bool eckit::geometry::Point2::equal(const KPoint& p1, const KPoint& p2)

static double eckit::geometry::Point2::norm(const KPoint& p1)

static double eckit::geometry::Point2::dot(const KPoint& p1, const KPoint& p2)

static KPoint eckit::geometry::Point2::add(const KPoint& p1, const KPoint& p2)

static KPoint eckit::geometry::Point2::middle(const KPoint& p1, const KPoint& p2)

static KPoint eckit::geometry::Point2::sub(const KPoint& p1, const KPoint& p2)

static KPoint eckit::geometry::Point2::mul(const KPoint& p, double m)

static KPoint eckit::geometry::Point2::div(const KPoint& p, double m)

static KPoint eckit::geometry::Point2::componentsMin(const KPoint& p1, const KPoint& p2)

static KPoint eckit::geometry::Point2::componentsMax(const KPoint& p1, const KPoint& p2)

static KPoint eckit::geometry::Point2::normalize(const KPoint& p)

static Container::value_type eckit::geometry::Point2::mean(const Container& points)

static KPoint eckit::geometry::Point2::symetrical(const KPoint& w, const KPoint& c)

static void eckit::geometry::Point2::normalizeAll(Container& c, KPoint& offset, KPoint& scale)

const KPoint& eckit::geometry::Point2::point() const

KPoint& eckit::geometry::Point2::point()

double* eckit::geometry::Point2::data()

const double* eckit::geometry::Point2::data() const

double eckit::geometry::Point2::operator()(const size_t& i) const

bool eckit::geometry::Point2::operator<(const KPoint& other) const

void eckit::geometry::Point2::print(std::ostream& s) const

double eckit::geometry::Point2::distance(const KPoint& p) const

double eckit::geometry::Point2::distance2(const KPoint& p) const

bool eckit::geometry::Point2::operator==(const KPoint& other) const

bool eckit::geometry::Point2::operator!=(const KPoint& other) const

void eckit::geometry::Point2::normalize(const KPoint& offset, const KPoint& scale)

const double* eckit::geometry::Point2::begin() const

const double* eckit::geometry::Point2::end() const

KPoint eckit::geometry::Point2::operator+(const KPoint& other) const

KPoint eckit::geometry::Point2::operator-(const KPoint& other) const

KPoint eckit::geometry::Point2::operator*(const double s) const

Variable documentation

static const size_t eckit::geometry::Point2::DIMS