pub trait GraphOrientation: Sized {
// Required method
fn orientation(&self) -> &EdgeVec<Orientation>;
// Provided methods
fn orientation_thetas(&self) -> Atom { ... }
fn orientation_delta(&self) -> Atom
where Self: Sized { ... }
fn select<'a>(&self, atom: impl Into<AtomOrView<'a>>) -> Atom { ... }
fn iterate<'a>(&'a self) -> EdgeVecIter<'a, Orientation> { ... }
fn get(&self, index: EdgeIndex) -> Orientation { ... }
fn is_compatible_with(&self, reference: &Self) -> bool { ... }
fn score(&self, internal_edges: &[EdgeIndex]) -> RepresentativeScore { ... }
fn select_representative_orientation<'b>(
self,
valid_global_orientations: &'b [Self],
internal_edges: &[EdgeIndex],
) -> Result<&'b Self> { ... }
fn internal_orientation_selector(
&self,
internal_edges: &[EdgeIndex],
) -> Atom { ... }
}Required Methods§
fn orientation(&self) -> &EdgeVec<Orientation>
Provided Methods§
fn orientation_thetas(&self) -> Atom
fn orientation_delta(&self) -> Atomwhere
Self: Sized,
fn select<'a>(&self, atom: impl Into<AtomOrView<'a>>) -> Atom
fn iterate<'a>(&'a self) -> EdgeVecIter<'a, Orientation>
fn get(&self, index: EdgeIndex) -> Orientation
Sourcefn is_compatible_with(&self, reference: &Self) -> bool
fn is_compatible_with(&self, reference: &Self) -> bool
Returns true if the orientation matches the reference, ignoring Undirected edges of the reference.
fn score(&self, internal_edges: &[EdgeIndex]) -> RepresentativeScore
Sourcefn select_representative_orientation<'b>(
self,
valid_global_orientations: &'b [Self],
internal_edges: &[EdgeIndex],
) -> Result<&'b Self>
fn select_representative_orientation<'b>( self, valid_global_orientations: &'b [Self], internal_edges: &[EdgeIndex], ) -> Result<&'b Self>
Select the deterministic full-graph representative used to host the integrated UV term.
The reduced orientation already fixes all edges that remain explicit after contracting the
integrated subgraph. Any contracted edge appears as Undirected and is therefore ignored when
matching compatible full orientations.
Among the compatible candidates, the representative is chosen by maximizing:
- the number of
Undirectedinternal edges - then the number of
Defaultinternal edges - then the lexicographically maximal
is_defaultpattern in ascending internal-edge order
The first criterion is currently future-proof only: the canonical full-graph acyclic basis is
built from Default / Reversed assignments on paired internal edges, so Undirected
internal entries are not expected there unless the global orientation-generation step changes.
Sourcefn internal_orientation_selector(&self, internal_edges: &[EdgeIndex]) -> Atom
fn internal_orientation_selector(&self, internal_edges: &[EdgeIndex]) -> Atom
Build only the selector factors for the internal edges of the integrated subgraph.
This intentionally does not use orientation_thetas() on the whole representative
orientation. The reduced-graph CFF term already carries selectors for the edges that remain
explicit after contraction, so re-applying them here would duplicate selectors on external
edges.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".