Skip to main content

ParametricAPI

Trait ParametricAPI 

Source
pub trait ParametricAPI<E, R>
where R: Copy + PartialOrd, E: Clone,
{ // Required methods fn distance(&self, ratio: &R, edge: &EdgeReference<'_, R>) -> R; fn zero_cancel(&self, cycle: &[EdgeReference<'_, R>]) -> R; }
Expand description

API trait for parametric shortest path problems.

Implement this trait to define how distances are computed and how to find the ratio that cancels a cycle.

Required Methods§

Source

fn distance(&self, ratio: &R, edge: &EdgeReference<'_, R>) -> R

Source

fn zero_cancel(&self, cycle: &[EdgeReference<'_, R>]) -> R

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§