Documentation of 'edu.uci.ics.jung.algorithms.shortestpath.PrimMinimumSpanningTree' Java class
PrimMinimumSpanningTree
edu.uci.ics.jung.algorithms.shortestpath

Class PrimMinimumSpanningTree<V,E>

  • Type Parameters:
    V - the vertex type
    E - the edge type
    All Implemented Interfaces:
    com.google.common.base.Function<Graph<V,E>,Graph<V,E>>


    public class PrimMinimumSpanningTree<V,E>
    extends java.lang.Object
    implements com.google.common.base.Function<Graph<V,E>,Graph<V,E>>
    For the input Graph, creates a MinimumSpanningTree using a variation of Prim's algorithm.
    • Constructor Summary

      Constructors 
      Constructor and Description
      PrimMinimumSpanningTree(com.google.common.base.Supplier<? extends Graph<V,E>> supplier)
      Creates an instance which generates a minimum spanning tree assuming constant edge weights.
      PrimMinimumSpanningTree(com.google.common.base.Supplier<? extends Graph<V,E>> supplier, com.google.common.base.Function<? super E,java.lang.Double> weights)
      Creates an instance which generates a minimum spanning tree using the input edge weights.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      Graph<V,E> apply(Graph<V,E> graph) 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.google.common.base.Function

        equals
    • Constructor Detail

      • PrimMinimumSpanningTree

        public PrimMinimumSpanningTree(com.google.common.base.Supplier<? extends Graph<V,E>> supplier)
        Creates an instance which generates a minimum spanning tree assuming constant edge weights.
        Parameters:
        supplier - used to create the tree instances
      • PrimMinimumSpanningTree

        public PrimMinimumSpanningTree(com.google.common.base.Supplier<? extends Graph<V,E>> supplier,
                                       com.google.common.base.Function<? super E,java.lang.Double> weights)
        Creates an instance which generates a minimum spanning tree using the input edge weights.
        Parameters:
        supplier - used to create the tree instances
        weights - the edge weights to use for defining the MST
    • Method Detail

      • apply

        public Graph<V,E> apply(Graph<V,E> graph)
        Specified by:
        apply in interface com.google.common.base.Function<Graph<V,E>,Graph<V,E>>
        Parameters:
        graph - the Graph to find MST in

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.