[][src]Trait rs_graph::search::astar::Accumulator

pub trait Accumulator<T> {
    fn accum(dist: T, weight: T) -> T;
}

A binary operation used to accumulate edge weight and distance.

The default operation for Dijkstra's algorithm is the sum, for Prim's algorithm it is simply the edge weight ignoring the "distance".

Required methods

fn accum(dist: T, weight: T) -> T

Loading content...

Implementors

impl<T> Accumulator<T> for SumAccumulator where
    T: Add<Output = T>, 
[src]

Loading content...