template<class Traits>
eckit::KDTreeX class

Base classes

template<class Traits, class NodeType>
class SPTree<Traits, KDNode<Traits>>

Public types

using Node = KDNode<Traits>
using SPTreeType = SPTree<Traits, Node>
using Alloc = Traits::Alloc
using Value = SPTreeType::Value
using Point = SPTreeType::Point
using Payload = SPTreeType::Payload
using Ptr = Alloc::Ptr
using ID = Alloc::Ptr
using Metadata = SPMetadata<Traits>
using PointType = Point
using PayloadType = Payload
using NodeList = Node::NodeList
using NodeInfo = SPNodeInfo<Traits, KDNode<Traits>>
using iterator = SPIterator<Traits, KDNode<Traits>>
using value_type = std::pair<Point, Payload>

Constructors, destructors, conversion operators

KDTreeX(Alloc& alloc)

Public functions

template<typename ITER>
void build(ITER begin, ITER end)
template<typename Container>
void build(Container& c)
void insert(const Value& value)
void setMetadata(const Point& offset, const Point& scale)
auto nodeByID(ID id) -> NodeInfo
void getMetadata(Point& offset, Point& scale)
auto nearestNeighbour(const Point& p) -> NodeInfo
auto findInSphere(const Point& p, double radius) -> NodeList
auto kNearestNeighbours(const Point& p, size_t k) -> NodeList
auto nearestNeighbourBruteForce(const Point& p) -> NodeInfo
auto findInSphereBruteForce(const Point& p, double radius) -> NodeList
auto kNearestNeighboursBruteForce(const Point& p, size_t k) -> NodeList
void visit(Visitor& v)
void statsReset()
void statsPrint(std::ostream& o, bool fancy) const
void print(std::ostream& o) const
auto begin() -> iterator
auto end() -> iterator
auto empty() const -> bool
auto size() const -> size_t

Public variables

Alloc& alloc_
Ptr root_
Metadata meta_

Typedef documentation

template<class Traits>
typedef Alloc::Ptr eckit::KDTreeX<Traits>::Ptr

template<class Traits>
typedef Alloc::Ptr eckit::KDTreeX<Traits>::ID

template<class Traits>
typedef SPMetadata<Traits> eckit::KDTreeX<Traits>::Metadata

template<class Traits>
typedef Point eckit::KDTreeX<Traits>::PointType

template<class Traits>
typedef Payload eckit::KDTreeX<Traits>::PayloadType

template<class Traits>
typedef Node::NodeList eckit::KDTreeX<Traits>::NodeList

template<class Traits>
typedef SPNodeInfo<Traits, KDNode<Traits>> eckit::KDTreeX<Traits>::NodeInfo

template<class Traits>
typedef SPIterator<Traits, KDNode<Traits>> eckit::KDTreeX<Traits>::iterator

template<class Traits>
typedef std::pair<Point, Payload> eckit::KDTreeX<Traits>::value_type

Function documentation

template<class Traits> template<typename ITER>
void eckit::KDTreeX<Traits>::build(ITER begin, ITER end)

ITER must be a random access iterator WARNING: container is changed (sorted)

template<class Traits> template<typename Container>
void eckit::KDTreeX<Traits>::build(Container& c)

Container must be a random access WARNING: container is changed (sorted)

template<class Traits>
void eckit::KDTreeX<Traits>::setMetadata(const Point& offset, const Point& scale)

template<class Traits>
NodeInfo eckit::KDTreeX<Traits>::nodeByID(ID id)

template<class Traits>
void eckit::KDTreeX<Traits>::getMetadata(Point& offset, Point& scale)

template<class Traits>
NodeInfo eckit::KDTreeX<Traits>::nearestNeighbour(const Point& p)

template<class Traits>
NodeList eckit::KDTreeX<Traits>::findInSphere(const Point& p, double radius)

template<class Traits>
NodeList eckit::KDTreeX<Traits>::kNearestNeighbours(const Point& p, size_t k)

template<class Traits>
NodeInfo eckit::KDTreeX<Traits>::nearestNeighbourBruteForce(const Point& p)

template<class Traits>
NodeList eckit::KDTreeX<Traits>::findInSphereBruteForce(const Point& p, double radius)

template<class Traits>
NodeList eckit::KDTreeX<Traits>::kNearestNeighboursBruteForce(const Point& p, size_t k)

template<class Traits>
void eckit::KDTreeX<Traits>::visit(Visitor& v)

template<class Traits>
void eckit::KDTreeX<Traits>::statsReset()

template<class Traits>
void eckit::KDTreeX<Traits>::statsPrint(std::ostream& o, bool fancy) const

template<class Traits>
void eckit::KDTreeX<Traits>::print(std::ostream& o) const

template<class Traits>
iterator eckit::KDTreeX<Traits>::begin()

template<class Traits>
iterator eckit::KDTreeX<Traits>::end()

template<class Traits>
bool eckit::KDTreeX<Traits>::empty() const

template<class Traits>
size_t eckit::KDTreeX<Traits>::size() const

Variable documentation

template<class Traits>
Alloc& eckit::KDTreeX<Traits>::alloc_

template<class Traits>
Ptr eckit::KDTreeX<Traits>::root_

template<class Traits>
Metadata eckit::KDTreeX<Traits>::meta_