template<class Traits, class Partition>
eckit::BSPTreeX class

Base classes

template<class Traits, class NodeType>
class SPTree<Traits, BSPNode<Traits, Partition>>

Public types

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

Constructors, destructors, conversion operators

BSPTreeX(Alloc& alloc)

Public functions

template<typename Container>
void build(Container& nodes)
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, class Partition>
typedef Traits::Point eckit::BSPTreeX<Traits, Partition>::Point

template<class Traits, class Partition>
typedef Traits::Payload eckit::BSPTreeX<Traits, Partition>::Payload

template<class Traits, class Partition>
typedef Alloc::Ptr eckit::BSPTreeX<Traits, Partition>::Ptr

template<class Traits, class Partition>
typedef Alloc::Ptr eckit::BSPTreeX<Traits, Partition>::ID

template<class Traits, class Partition>
typedef BSPNode<Traits, Partition> eckit::BSPTreeX<Traits, Partition>::Node

template<class Traits, class Partition>
typedef SPMetadata<Traits> eckit::BSPTreeX<Traits, Partition>::Metadata

template<class Traits, class Partition>
typedef Point eckit::BSPTreeX<Traits, Partition>::PointType

template<class Traits, class Partition>
typedef Payload eckit::BSPTreeX<Traits, Partition>::PayloadType

template<class Traits, class Partition>
typedef Node::NodeList eckit::BSPTreeX<Traits, Partition>::NodeList

template<class Traits, class Partition>
typedef SPNodeInfo<Traits, BSPNode<Traits, Partition>> eckit::BSPTreeX<Traits, Partition>::NodeInfo

template<class Traits, class Partition>
typedef Node::Value eckit::BSPTreeX<Traits, Partition>::Value

template<class Traits, class Partition>
typedef SPIterator<Traits, BSPNode<Traits, Partition>> eckit::BSPTreeX<Traits, Partition>::iterator

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

Function documentation

template<class Traits, class Partition> template<typename Container>
void eckit::BSPTreeX<Traits, Partition>::build(Container& nodes)

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

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

template<class Traits, class Partition>
NodeInfo eckit::BSPTreeX<Traits, Partition>::nodeByID(ID id)

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

template<class Traits, class Partition>
NodeInfo eckit::BSPTreeX<Traits, Partition>::nearestNeighbour(const Point& p)

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

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

template<class Traits, class Partition>
NodeInfo eckit::BSPTreeX<Traits, Partition>::nearestNeighbourBruteForce(const Point& p)

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

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

template<class Traits, class Partition>
void eckit::BSPTreeX<Traits, Partition>::visit(Visitor& v)

template<class Traits, class Partition>
void eckit::BSPTreeX<Traits, Partition>::statsReset()

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

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

template<class Traits, class Partition>
iterator eckit::BSPTreeX<Traits, Partition>::begin()

template<class Traits, class Partition>
iterator eckit::BSPTreeX<Traits, Partition>::end()

template<class Traits, class Partition>
bool eckit::BSPTreeX<Traits, Partition>::empty() const

template<class Traits, class Partition>
size_t eckit::BSPTreeX<Traits, Partition>::size() const

Variable documentation

template<class Traits, class Partition>
Alloc& eckit::BSPTreeX<Traits, Partition>::alloc_

template<class Traits, class Partition>
Ptr eckit::BSPTreeX<Traits, Partition>::root_

template<class Traits, class Partition>
Metadata eckit::BSPTreeX<Traits, Partition>::meta_