pub struct TreeTopology<V, I> {
pub nodes: HashMap<V, Vec<I>>,
pub edges: Vec<(V, V)>,
}Expand description
Specification for tree topology: defines nodes and index ID assignments.
I is the index ID type (e.g., DynId). Each node maps to the IDs of its
physical indices in the input tensor. This ensures correct index lookup
regardless of tensor index ordering, which can change during factorization.
Fields§
§nodes: HashMap<V, Vec<I>>Nodes in the tree (node name -> list of index IDs belonging to this node)
edges: Vec<(V, V)>Edges in the tree: (node_a, node_b)
Implementations§
Source§impl<V: Clone + Hash + Eq, I: Clone + Eq> TreeTopology<V, I>
impl<V: Clone + Hash + Eq, I: Clone + Eq> TreeTopology<V, I>
Trait Implementations§
Source§impl<V: Clone, I: Clone> Clone for TreeTopology<V, I>
impl<V: Clone, I: Clone> Clone for TreeTopology<V, I>
Source§fn clone(&self) -> TreeTopology<V, I>
fn clone(&self) -> TreeTopology<V, I>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<V, I> Freeze for TreeTopology<V, I>
impl<V, I> RefUnwindSafe for TreeTopology<V, I>where
V: RefUnwindSafe,
I: RefUnwindSafe,
impl<V, I> Send for TreeTopology<V, I>
impl<V, I> Sync for TreeTopology<V, I>
impl<V, I> Unpin for TreeTopology<V, I>
impl<V, I> UnsafeUnpin for TreeTopology<V, I>
impl<V, I> UnwindSafe for TreeTopology<V, I>where
V: UnwindSafe,
I: UnwindSafe,
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more