Package org.graph4j.spanning
Class BoruvkaMinimumSpanningTreeParallel
java.lang.Object
org.graph4j.GraphAlgorithm
org.graph4j.spanning.MinimumSpanningTreeBase
org.graph4j.spanning.BoruvkaMinimumSpanningTreeBase
org.graph4j.spanning.BoruvkaMinimumSpanningTreeParallel
- All Implemented Interfaces:
MinimumSpanningTreeAlgorithm
Parallel implementation of the Boruvka algorithm for finding a minimum
spanning tree.
You can see more :
https://web.archive.org/web/20110410100229id_/http://www.globalstf.org:80/docs/proceedings/adpc/ADPC_22.pdf
SECTION 5 - EXPERIMENTS
- Author:
- Sorodoc Cosmin
-
Field Summary
Fields inherited from class org.graph4j.spanning.BoruvkaMinimumSpanningTreeBase
cheapest, ufFields inherited from class org.graph4j.spanning.MinimumSpanningTreeBase
minWeight, tree, treeEdgesFields inherited from class org.graph4j.GraphAlgorithm
directed, graph -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcompute()protected booleanFor each component, find the smallest weighted edge and update the cheapest arrayMethods inherited from class org.graph4j.spanning.MinimumSpanningTreeBase
getEdges, getTree, getWeightMethods inherited from class org.graph4j.GraphAlgorithm
getGraph
-
Constructor Details
-
BoruvkaMinimumSpanningTreeParallel
-
BoruvkaMinimumSpanningTreeParallel
- Parameters:
graph- the input graph.nrThreads- the number of threads.
-
-
Method Details
-
compute
protected void compute()- Overrides:
computein classBoruvkaMinimumSpanningTreeBase
-
updateCheapestEdges
protected boolean updateCheapestEdges()For each component, find the smallest weighted edge and update the cheapest array- Specified by:
updateCheapestEdgesin classBoruvkaMinimumSpanningTreeBase- Returns:
- true if there is at least one outgoing edge from the components, false otherwise
-