Skip to main content

EdgeGraph

Trait EdgeGraph 

Source
pub trait EdgeGraph: Graph {
    type Edge: Clone + Ord;

    // Required method
    fn edges(
        &self,
        state: &Self::State,
        out: &mut Vec<(Self::Edge, Self::State, Self::Weight)>,
    );
}
Expand description

A Graph whose edges have identities, for problems that must tell parallel edges apart: disjoint and dissimilar paths.

An additive extension: graphs that only implement Graph keep working with every other search. edges must report the same edges as Graph::successors, each with an identity unique in the graph.

Required Associated Types§

Source

type Edge: Clone + Ord

An edge identity, unique over the whole graph.

Required Methods§

Source

fn edges( &self, state: &Self::State, out: &mut Vec<(Self::Edge, Self::State, Self::Weight)>, )

Appends every outgoing edge of state to out as (edge, successor, weight). out is empty on entry.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<C: Cost, const N: usize> EdgeGraph for DynamicGraph<C, N>