Nice TWiki > Doc > CodeExamples > GraphParametricTypeExample > PrimMinimumSpanningTreeExample (r1.2) TWiki webs:
Dev | Doc | Main | TWiki | Sandbox
Doc . { Changes | Index | Search | Go }
// 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.2 - 07 Feb 2004 - 16:22 GMT - IsaacGouy
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.