[][src]Function rs_graph::search::astar::start_generic

Important traits for AStar<'a, A, D, W, M, P, H, Accum>
pub fn start_generic<'a, A, D, W, H, Accum, M, P>(
    adj: A,
    src: A::Node,
    weights: W,
    heur: H,
    data: (M, P)
) -> AStar<'a, A, D, W, M, P, H, Accum> where
    A: Adjacencies<'a>,
    D: Copy + PartialOrd + Zero,
    W: Fn(A::Edge) -> D,
    H: AStarHeuristic<A::Node>,
    H::Result: Add<D, Output = D>,
    M: ItemMap<A::Node, Option<P::Item>>,
    P: ItemPriQueue<A::Node, Data<A::Edge, D, H::Result>>,
    Accum: Accumulator<D>, 

Start and return an A*-iterator with a custom accumulator and custom data structures.

This function differs from start_with_data in the additional type parameter Accum. The type parameter is the accumulation function for combining the length to the previous node with the weight of the current edge. It is usually just the sum (SumAccumulator). One possible use is the Prim's algorithm for the minimum spanning tree problem (see mst::prim).