// compilation unit Prim.nice
package graph;
<Edge,Vertex,Distance,T | Edge <: GraphEdge<Vertex> >
void primMinimumSpanningTree(
VertexListAndIncidenceGraph<Vertex,Edge> graph,
Vertex s,
ReadWritePropertyMap<Vertex,Vertex> predecessor,
ReadWritePropertyMap<Vertex,Distance> distance,
ReadablePropertyMap<Edge,Distance> weight,
(Distance, Distance)->boolean compare,
Distance inf,
Distance zero
){
dijkstraShortestPaths(
graph, s, predecessor, distance, weight, compare,
(Distance d1, Distance d2)=>d2,
inf, zero);
}
-- IsaacGouy - 07 Jan 2004
| Topic PrimMinimumSpanningTreeExample . { Edit | Attach | Ref-By | Printable | Diffs | r1.7 | > | r1.6 | > | r1.5 | More } |
|
Revision r1.7 - 28 Apr 2005 - 11:55 GMT - TWikiGuest Parents: WebHome > CodeExamples > GraphParametricTypeExample |
Copyright © 1999-2003 by the contributing authors.
All material on this collaboration platform is the property of the contributing authors. Ideas, requests, problems regarding TWiki? Send feedback. |