Module org.jgrapht.core
Package org.jgrapht.alg.shortestpath
Class DeltaSteppingShortestPath.MaxEdgeWeightTask
java.lang.Object
java.util.concurrent.ForkJoinTask<Double>
java.util.concurrent.RecursiveTask<Double>
org.jgrapht.alg.shortestpath.DeltaSteppingShortestPath.MaxEdgeWeightTask
- All Implemented Interfaces:
Serializable
,Future<Double>
- Enclosing class:
DeltaSteppingShortestPath<V,
E>
Is used during the algorithm to compute maximum edge weight of the
BaseShortestPathAlgorithm.graph
. Apart from
computing the maximal edge weight in the graph the task also checks if there exist edges with
negative weights.-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) long
Amount of edges which are processed in parallel.(package private) Spliterator
<E> Is used to split a collection and create new recursive tasks during the computation. -
Constructor Summary
ConstructorsConstructorDescriptionMaxEdgeWeightTask
(Spliterator<E> spliterator, long loadBalancing) Constructs a new instance for the given spliterator and loadBalancing -
Method Summary
Methods inherited from class java.util.concurrent.RecursiveTask
exec, getRawResult, setRawResult
Methods inherited from class java.util.concurrent.ForkJoinTask
adapt, adapt, adapt, adaptInterruptible, cancel, compareAndSetForkJoinTaskTag, complete, completeExceptionally, exceptionNow, 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, quietlyJoin, quietlyJoinUninterruptibly, reinitialize, resultNow, setForkJoinTaskTag, state, tryUnfork
-
Field Details
-
spliterator
Spliterator<E> spliteratorIs used to split a collection and create new recursive tasks during the computation. -
loadBalancing
long loadBalancingAmount of edges which are processed in parallel.
-
-
Constructor Details
-
MaxEdgeWeightTask
MaxEdgeWeightTask(Spliterator<E> spliterator, long loadBalancing) Constructs a new instance for the given spliterator and loadBalancing- Parameters:
spliterator
- spliteratorloadBalancing
- loadBalancing
-
-
Method Details
-
compute
Computes maximum edge weight. If amount of edges inspliterator
is less thanloadBalancing
, then computation is performed sequentially. If not, thespliterator
is used to split the collection and then two new child tasks are created.- Specified by:
compute
in classRecursiveTask<Double>
- Returns:
- max edge weight
-