pub struct CanonicalizeEdges { /* private fields */ }Expand description
Ordered sequence of directed edges for canonicalization.
Each edge is (from, to) where:
fromis the node being orthogonalized away fromtois the direction towards the orthogonality center
§Note on ordering
- For path-based canonicalization (moving ortho center), edges are connected:
each edge’s
toequals the next edge’sfrom. - For full canonicalization (from scratch), edges represent parent edges in post-order DFS traversal, which may not be connected as a path but guarantees correct processing order (children before parents).
§Example
For a chain A - B - C - D (canonizing towards D):
edges = [(A, B), (B, C), (C, D)]For a star with center C (canonizing towards C):
A
|
B - C - D
|
E
edges = [(A, C), (B, C), (D, C), (E, C)] (order depends on DFS)Implementations§
Source§impl CanonicalizeEdges
impl CanonicalizeEdges
Sourcepub fn from_edges(edges: Vec<(NodeIndex, NodeIndex)>) -> Self
pub fn from_edges(edges: Vec<(NodeIndex, NodeIndex)>) -> Self
Create from a list of edges.
Note: For path-based canonicalization, edges should be connected (each edge’s to
equals next edge’s from). For full canonicalization, edges may not be connected
but must be in correct processing order.
Sourcepub fn iter(&self) -> impl Iterator<Item = &(NodeIndex, NodeIndex)>
pub fn iter(&self) -> impl Iterator<Item = &(NodeIndex, NodeIndex)>
Iterate over edges in order.
Trait Implementations§
Source§impl Clone for CanonicalizeEdges
impl Clone for CanonicalizeEdges
Source§fn clone(&self) -> CanonicalizeEdges
fn clone(&self) -> CanonicalizeEdges
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 moreSource§impl Debug for CanonicalizeEdges
impl Debug for CanonicalizeEdges
Source§impl<'a> IntoIterator for &'a CanonicalizeEdges
impl<'a> IntoIterator for &'a CanonicalizeEdges
Source§impl IntoIterator for CanonicalizeEdges
impl IntoIterator for CanonicalizeEdges
Source§impl PartialEq for CanonicalizeEdges
impl PartialEq for CanonicalizeEdges
impl Eq for CanonicalizeEdges
impl StructuralPartialEq for CanonicalizeEdges
Auto Trait Implementations§
impl Freeze for CanonicalizeEdges
impl RefUnwindSafe for CanonicalizeEdges
impl Send for CanonicalizeEdges
impl Sync for CanonicalizeEdges
impl Unpin for CanonicalizeEdges
impl UnsafeUnpin for CanonicalizeEdges
impl UnwindSafe for CanonicalizeEdges
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>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§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