Mojo struct
KDTreeNode
@memory_only
struct KDTreeNode
Aliases
__del__is_trivial = False__moveinit__is_trivial = True__copyinit__is_trivial = False
Fields
- cut_dim (
Int) - cut_val (
Float32) - cut_val_left (
Float32) - cut_val_right (
Float32) - l (
Int) - u (
Int) - box (
List[interval]) - left (
UnsafePointer[KDTreeNode, MutAnyOrigin]) - right (
UnsafePointer[KDTreeNode, MutAnyOrigin]) - metric (
fn(Float32) -> Float32)
Implemented traits
AnyType, Copyable, ImplicitlyDestructible, Movable
Methods
__init__
fn __init__(out self, dim: Int, metric: fn(Float32) -> Float32)
Args:
- dim (
Int) - metric (
fn(Float32) -> Float32) - self (
Self)
Returns:
Self
search
fn search(self, mut sr: SearchRecord)
Args:
- self (
Self) - sr (
SearchRecord)
box_in_search_range
fn box_in_search_range(self, sr: SearchRecord) -> Bool
Args:
- self (
Self) - sr (
SearchRecord)
Returns:
Bool
process_terminal_node
fn process_terminal_node(self, mut sr: SearchRecord)
Args:
- self (
Self) - sr (
SearchRecord)
process_terminal_node_fixedball
fn process_terminal_node_fixedball(self, sr: SearchRecord)
Args:
- self (
Self) - sr (
SearchRecord)