-
Notifications
You must be signed in to change notification settings - Fork 4
/
ManellicTree.jl
36 lines (28 loc) · 953 Bytes
/
ManellicTree.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# """
# $TYPEDEF
# Elliptical structure for use in a (Manellic) Ball Tree.
# """
# struct HyperEllipse{P <:AbstractArray,D,DD}
# """ manifold point at which this ellipse is based """
# point::P
# """ Covariance of coords at either TBD this point or some other reference point? """
# coord_cov::SMatrix{D,D,Float64,DD}
# end
# ManellicTree
# Short for Manifold Ellipse Metric Tree
# starting as a balanced tree, relax to unbalanced in future.
struct ManellicTree{M,D<:AbstractVector,N,HL,HT}
manifold::M
data::D
weights::MVector{N,<:Real}
permute::MVector{N,Int}
# kernels::ArrayPartition{<:Number,KT}
leaf_kernels::SizedVector{N,HL}
tree_kernels::SizedVector{N,HT}
segments::SizedVector{N,Set{Int}}
left_idx::MVector{N,Int}
right_idx::MVector{N,Int}
# workaround to overcome bug for StaticArrays `isdefined() != false` issue
_workaround_isdef_treekernel::Set{Int}
_workaround_isdef_leafkernel::Set{Int}
end