Skip to main content

DynamicGraph

Trait DynamicGraph 

Source
pub trait DynamicGraph {
    type Vertex: Clone + Hash + Eq;
    type Cost: Cost;

    // Required methods
    fn successors(
        &self,
        vertex: &Self::Vertex,
        emit: impl FnMut(Self::Vertex, Self::Cost),
    );
    fn predecessors(
        &self,
        vertex: &Self::Vertex,
        emit: impl FnMut(Self::Vertex, Self::Cost),
    );
}
Expand description

A graph with stable vertices whose edge costs may change between searches.

Both directions must agree and reflect the current costs: to is reported as a successor of from with cost c exactly when from is reported as a predecessor of to with cost c.

Required Associated Types§

Source

type Vertex: Clone + Hash + Eq

A vertex. Cloned and hashed into the planner’s tables.

Source

type Cost: Cost

An edge cost. Must be strictly positive: LpaStar and DStarLite can keep stale distances alive around a zero-cost cycle.

Required Methods§

Source

fn successors( &self, vertex: &Self::Vertex, emit: impl FnMut(Self::Vertex, Self::Cost), )

Calls emit(to, cost) for every edge leaving vertex.

Source

fn predecessors( &self, vertex: &Self::Vertex, emit: impl FnMut(Self::Vertex, Self::Cost), )

Calls emit(from, cost) for every edge entering vertex.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§