Skip to main content

conspire/geometry/ntree/node/
mod.rs

1pub mod orthants;
2pub mod split;
3pub mod subdivide;
4
5pub enum Kind<const N: usize, U> {
6    Leaf,
7    Tree(Orthants<N, U>),
8}
9
10pub struct Node<const D: usize, const M: usize, const N: usize, T, U, V = ()> {
11    pub(crate) corner: [T; D],
12    pub(crate) length: T,
13    pub(crate) facets: [Option<U>; M],
14    pub(crate) kind: Kind<N, U>,
15    pub(crate) value: Option<V>,
16}
17
18pub type Nodes<const D: usize, const M: usize, const N: usize, T, U, V = ()> =
19    Vec<Node<D, M, N, T, U, V>>;
20
21pub type Orthants<const N: usize, U> = [U; N];