1.8.0
CCC
 
Loading...
Searching...
No Matches
gstlrn::t_btree Struct Reference

#include <ball_algorithm.h>

Public Member Functions

 t_btree ()=default
 
 t_btree (MatrixT< double > &&data, Id n_samples, Id n_features, bool has_constraints, Id leaf_size, Id default_distance_function)
 
void display (Id level=-1) const
 
Id init_node (Id i_node, Id idx_start, Id idx_end)
 
void recursive_build (Id i_node, Id idx_start, Id idx_end)
 
double min_dist (Id i_node, const constvect pt) const
 Calculate the distance between the current 'pt' and the centroid of node 'i_node' Returns 0 if 'pt' belongs to the node.
 
Id query_depth_first (Id i_node, const constvect pt, Id i_pt, t_nheap &heap, double dist) const
 

Public Attributes

MatrixT< double > data
 
VectorBool accept
 
 idx_array
 
std::vector< t_nodedatanode_data
 
MatrixT< double > node_bounds
 
Id n_samples
 
Id n_features
 
Id leaf_size
 
Id n_levels
 
Id n_nodes
 
Id default_distance_function {1}
 

Constructor & Destructor Documentation

◆ t_btree() [1/2]

gstlrn::t_btree::t_btree ( )
default

◆ t_btree() [2/2]

gstlrn::t_btree::t_btree ( MatrixT< double > &&  data,
Id  n_samples,
Id  n_features,
bool  has_constraints,
Id  leaf_size,
Id  default_distance_function 
)

Member Function Documentation

◆ display()

void gstlrn::t_btree::display ( Id  level = -1) const

◆ init_node()

Id gstlrn::t_btree::init_node ( Id  i_node,
Id  idx_start,
Id  idx_end 
)

◆ min_dist()

double gstlrn::t_btree::min_dist ( Id  i_node,
const constvect  pt 
) const

Calculate the distance between the current 'pt' and the centroid of node 'i_node' Returns 0 if 'pt' belongs to the node.

Parameters
i_nodeRank of the target node
ptCharacteristics of the target SpacePoint
Returns
double Minimum distance or 0

◆ query_depth_first()

Id gstlrn::t_btree::query_depth_first ( Id  i_node,
const constvect  pt,
Id  i_pt,
t_nheap heap,
double  dist 
) const

◆ recursive_build()

void gstlrn::t_btree::recursive_build ( Id  i_node,
Id  idx_start,
Id  idx_end 
)

Member Data Documentation

◆ accept

VectorBool gstlrn::t_btree::accept

◆ data

MatrixT<double> gstlrn::t_btree::data

◆ default_distance_function

Id gstlrn::t_btree::default_distance_function {1}

◆ idx_array

gstlrn::t_btree::idx_array

◆ leaf_size

Id gstlrn::t_btree::leaf_size

◆ n_features

Id gstlrn::t_btree::n_features

◆ n_levels

Id gstlrn::t_btree::n_levels

◆ n_nodes

Id gstlrn::t_btree::n_nodes

◆ n_samples

Id gstlrn::t_btree::n_samples

◆ node_bounds

MatrixT<double> gstlrn::t_btree::node_bounds

◆ node_data

std::vector<t_nodedata> gstlrn::t_btree::node_data

The documentation for this struct was generated from the following files: