Module org.jgrapht.core
Package org.jgrapht.alg.shortestpath
Class DeltaSteppingShortestPath.MaxEdgeWeightTask
- java.lang.Object
-
- java.util.concurrent.ForkJoinTask<V>
-
- java.util.concurrent.RecursiveTask<java.lang.Double>
-
- org.jgrapht.alg.shortestpath.DeltaSteppingShortestPath.MaxEdgeWeightTask
-
- All Implemented Interfaces:
java.io.Serializable,java.util.concurrent.Future<java.lang.Double>
- Enclosing class:
- DeltaSteppingShortestPath<V,E>
class DeltaSteppingShortestPath.MaxEdgeWeightTask extends java.util.concurrent.RecursiveTask<java.lang.Double>Is used during the algorithm to compute maximum edge weight of theBaseShortestPathAlgorithm.graph. Apart from computing the maximal edge weight in the graph the task also checks if there exist edges with negative weights.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) longloadBalancingAmount of edges which are processed in parallel.(package private) java.util.Spliterator<E>spliteratorIs used to split a collection and create new recursive tasks during the computation.
-
Constructor Summary
Constructors Constructor Description MaxEdgeWeightTask(java.util.Spliterator<E> spliterator, long loadBalancing)Constructs a new instance for the given spliterator and loadBalancing
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Doublecompute()Computes maximum edge weight.-
Methods inherited from class java.util.concurrent.ForkJoinTask
adapt, adapt, adapt, cancel, compareAndSetForkJoinTaskTag, complete, completeExceptionally, fork, get, get, getException, getForkJoinTaskTag, getPool, getQueuedTaskCount, getSurplusQueuedTaskCount, helpQuiesce, inForkJoinPool, invoke, invokeAll, invokeAll, invokeAll, isCancelled, isCompletedAbnormally, isCompletedNormally, isDone, join, peekNextLocalTask, pollNextLocalTask, pollSubmission, pollTask, quietlyComplete, quietlyInvoke, quietlyJoin, reinitialize, setForkJoinTaskTag, tryUnfork
-
-
-
-
Field Detail
-
spliterator
java.util.Spliterator<E> spliterator
Is used to split a collection and create new recursive tasks during the computation.
-
loadBalancing
long loadBalancing
Amount of edges which are processed in parallel.
-
-
Constructor Detail
-
MaxEdgeWeightTask
MaxEdgeWeightTask(java.util.Spliterator<E> spliterator, long loadBalancing)
Constructs a new instance for the given spliterator and loadBalancing- Parameters:
spliterator- spliteratorloadBalancing- loadBalancing
-
-
Method Detail
-
compute
protected java.lang.Double compute()
Computes maximum edge weight. If amount of edges inspliteratoris less thanloadBalancing, then computation is performed sequentially. If not, thespliteratoris used to split the collection and then two new child tasks are created.- Specified by:
computein classjava.util.concurrent.RecursiveTask<java.lang.Double>- Returns:
- max edge weight
-
-