Vulpes  0.1.0
Versatile and parallel compUtational Library for high-order discontinuous Polytopal Element Simulations
Loading...
Searching...
No Matches
ckdtree_decl.hpp File Reference
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <ios>
#include <limits>
#include <new>
#include <numeric>
#include <sstream>
#include <stdexcept>
#include <string>
#include <typeinfo>
#include <vector>
Include dependency graph for ckdtree_decl.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  vulpes::scipy::coo_entry
struct  vulpes::scipy::ordered_pair
struct  vulpes::scipy::ckdtreenode
struct  vulpes::scipy::ckdtree< Dim >
struct  vulpes::scipy::Rectangle< m >
struct  vulpes::scipy::RR_stack_item
struct  vulpes::scipy::RectRectDistanceTracker< MinMaxDist, Dim >
struct  vulpes::scipy::BaseMinkowskiDistPp< Dist1D, Dim >
struct  vulpes::scipy::BaseMinkowskiDistP1< Dist1D, Dim >
struct  vulpes::scipy::BaseMinkowskiDistPinf< Dist1D, Dim >
struct  vulpes::scipy::BaseMinkowskiDistP2< Dist1D, Dim >
struct  vulpes::scipy::PlainDist1D< Dim >
struct  vulpes::scipy::MinkowskiDistP2< Dim >
struct  vulpes::scipy::BoxDist1D< Dim >
union  vulpes::scipy::heapcontents
struct  vulpes::scipy::heapitem
struct  vulpes::scipy::heap
struct  vulpes::scipy::nodeinfo< m >
struct  vulpes::scipy::nodeinfo_pool< m >

Namespaces

namespace  vulpes
namespace  vulpes::scipy

Macros

#define tree_buffer_root(buf)
#define CKDTREE_LIKELY(x)
#define CKDTREE_UNLIKELY(x)
#define CKDTREE_PREFETCH(x, rw, loc)
#define ckdtree_fmax(x, y)
#define ckdtree_fmin(x, y)
#define ckdtree_fabs(x)
#define HANDLE_KNN(cond, kls)
#define HANDLE_QBP(cond, kls)
#define HANDLE_PAIRS(cond, kls)
#define HANDLE_TREE(cond, kls)

Typedefs

using vulpes::scipy::ckdtree_intp_t = intptr_t
template<ckdtree_intp_t Dim>
using vulpes::scipy::MinkowskiDistPp = BaseMinkowskiDistPp<PlainDist1D<Dim>, Dim>
template<ckdtree_intp_t Dim>
using vulpes::scipy::MinkowskiDistPinf = BaseMinkowskiDistPinf<PlainDist1D<Dim>, Dim>
template<ckdtree_intp_t Dim>
using vulpes::scipy::MinkowskiDistP1 = BaseMinkowskiDistP1<PlainDist1D<Dim>, Dim>
template<ckdtree_intp_t Dim>
using vulpes::scipy::NonOptimizedMinkowskiDistP2 = BaseMinkowskiDistP2<PlainDist1D<Dim>, Dim>

Functions

void vulpes::scipy::add_ordered_pair (std::vector< ordered_pair > *results, const ckdtree_intp_t i, const ckdtree_intp_t j)
template<ckdtree_intp_t Dim>
static ckdtree_intp_t vulpes::scipy::build_ckdtree (ckdtree< Dim > *self, ckdtree_intp_t start_idx, intptr_t end_idx, double *maxes, double *mins, const int _median, const int _compact)
double vulpes::scipy::sqeuclidean_distance_double (const double *u, const double *v, ckdtree_intp_t n)
template<typename MinMaxDist, ckdtree_intp_t Dim, double p, bool Periodic = false>
static void vulpes::scipy::query_single_point (const ckdtree< Dim > *self, double *result_distances, ckdtree_intp_t *result_indices, const double *x, const ckdtree_intp_t *k, const ckdtree_intp_t nk, const ckdtree_intp_t kmax, const double eps, double distance_upper_bound)
template<ckdtree_intp_t Dim, double p, bool Periodic = false>
int vulpes::scipy::query_knn (const ckdtree< Dim > *self, double *dd, ckdtree_intp_t *ii, const double *xx, const ckdtree_intp_t n, const ckdtree_intp_t *k, const ckdtree_intp_t nk, const ckdtree_intp_t kmax, const double eps, const double distance_upper_bound)
template<ckdtree_intp_t Dim>
static void vulpes::scipy::traverse_no_checking_query_ball_point (const ckdtree< Dim > *self, const int return_length, std::vector< ckdtree_intp_t > &results, const ckdtreenode *node)
template<ckdtree_intp_t Dim, typename MinMaxDist>
static void vulpes::scipy::traverse_checking_query_ball_point (const ckdtree< Dim > *self, const int return_length, std::vector< ckdtree_intp_t > &results, const ckdtreenode *node, RectRectDistanceTracker< MinMaxDist, Dim > *tracker)
template<ckdtree_intp_t Dim, double p, bool Periodic = false>
int vulpes::scipy::query_ball_point (const ckdtree< Dim > *self, const double *x, const double *r, const double eps, const ckdtree_intp_t n_queries, std::vector< ckdtree_intp_t > *results, const bool return_length, const bool sort_output)
template<ckdtree_intp_t Dim>
static void vulpes::scipy::traverse_no_checking_query_pairs (const ckdtree< Dim > *self, std::vector< ordered_pair > *results, const ckdtreenode *node1, const ckdtreenode *node2)
template<ckdtree_intp_t Dim, typename MinMaxDist>
static void vulpes::scipy::traverse_checking_query_pairs (const ckdtree< Dim > *self, std::vector< ordered_pair > *results, const ckdtreenode *node1, const ckdtreenode *node2, RectRectDistanceTracker< MinMaxDist, Dim > *tracker)
template<ckdtree_intp_t Dim, double p, bool Periodic = false>
int vulpes::scipy::query_pairs (const ckdtree< Dim > *self, const double r, const double eps, std::vector< ordered_pair > *results)
template<ckdtree_intp_t Dim>
static void vulpes::scipy::traverse_no_checking_query_ball_tree (const ckdtree< Dim > *self, const ckdtree< Dim > *other, std::vector< ckdtree_intp_t > *results, const ckdtreenode *node1, const ckdtreenode *node2)
template<ckdtree_intp_t Dim, typename MinMaxDist>
static void vulpes::scipy::traverse_checking_query_ball_tree (const ckdtree< Dim > *self, const ckdtree< Dim > *other, std::vector< ckdtree_intp_t > *results, const ckdtreenode *node1, const ckdtreenode *node2, RectRectDistanceTracker< MinMaxDist, Dim > *tracker)
template<ckdtree_intp_t Dim, double p, bool Periodic = false>
int vulpes::scipy::query_ball_tree (const ckdtree< Dim > *self, const ckdtree< Dim > *other, const double r, const double eps, std::vector< ckdtree_intp_t > *results)

Variables

const ckdtree_intp_t vulpes::scipy::LESS = 1
const ckdtree_intp_t vulpes::scipy::GREATER = 2

Macro Definition Documentation

◆ ckdtree_fabs

#define ckdtree_fabs ( x)
Value:
std::abs(x)

◆ ckdtree_fmax

#define ckdtree_fmax ( x,
y )
Value:
std::max(x, y)

◆ ckdtree_fmin

#define ckdtree_fmin ( x,
y )
Value:
std::min(x, y)

◆ CKDTREE_LIKELY

#define CKDTREE_LIKELY ( x)
Value:
__builtin_expect(!!(x), 1)

◆ CKDTREE_PREFETCH

#define CKDTREE_PREFETCH ( x,
rw,
loc )

◆ CKDTREE_UNLIKELY

#define CKDTREE_UNLIKELY ( x)
Value:
__builtin_expect(!!(x), 0)

◆ HANDLE_KNN

#define HANDLE_KNN ( cond,
kls )
Value:
if constexpr (cond) { \
query_single_point<kls, Dim, p, Periodic>( \
self, dd_row, ii_row, xx_row, k, nk, kmax, eps, distance_upper_bound); \
} else

◆ HANDLE_PAIRS

#define HANDLE_PAIRS ( cond,
kls )
Value:
if constexpr (cond) { \
RectRectDistanceTracker<kls, Dim> tracker(self, r1, r2, p, eps, r); \
traverse_checking_query_pairs( \
self, results, self->ctree, self->ctree, &tracker); \
} else

◆ HANDLE_QBP

#define HANDLE_QBP ( cond,
kls )
Value:
if constexpr (cond) { \
if (return_length) \
results[i].push_back(0); \
RectRectDistanceTracker<kls, Dim> tracker( \
self, point, rect, p, eps, r[i]); \
traverse_checking_query_ball_point( \
self, return_length, results[i], self->ctree, &tracker); \
} else

◆ HANDLE_TREE

#define HANDLE_TREE ( cond,
kls )
Value:
if constexpr (cond) { \
RectRectDistanceTracker<kls, Dim> tracker(self, r1, r2, p, eps, r); \
traverse_checking_query_ball_tree( \
self, other, results, self->ctree, other->ctree, &tracker); \
} else

◆ tree_buffer_root

#define tree_buffer_root ( buf)
Value:
(&(buf)[0][0])