pub struct NetworkxBranchingPlan {
pub initial: Vec<usize>,
pub steps: Vec<(Vec<usize>, usize)>,
}Expand description
What networkx’s maximum_branching does to its final set of edge keys.
networkx builds the result by iterating a Python set of integer edge
keys, so the result’s edge ORDER depends on that set’s history. The plan
is that history: set(initial), then for each step update(circuit) and
remove(removed). Replaying it on a Python set reproduces networkx’s
order exactly; the keys index the input edge list.
Fields§
§initial: Vec<usize>The last level’s branching keys, in networkx’s edge-index order.
steps: Vec<(Vec<usize>, usize)>One step per contraction, from the last level to the first.
Trait Implementations§
Source§impl Clone for NetworkxBranchingPlan
impl Clone for NetworkxBranchingPlan
Source§impl Debug for NetworkxBranchingPlan
impl Debug for NetworkxBranchingPlan
impl Eq for NetworkxBranchingPlan
Source§impl PartialEq for NetworkxBranchingPlan
impl PartialEq for NetworkxBranchingPlan
impl StructuralPartialEq for NetworkxBranchingPlan
Auto Trait Implementations§
impl Freeze for NetworkxBranchingPlan
impl RefUnwindSafe for NetworkxBranchingPlan
impl Send for NetworkxBranchingPlan
impl Sync for NetworkxBranchingPlan
impl Unpin for NetworkxBranchingPlan
impl UnsafeUnpin for NetworkxBranchingPlan
impl UnwindSafe for NetworkxBranchingPlan
Blanket Implementations§
Source§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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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