Class 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 the BaseShortestPathAlgorithm.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) long loadBalancing
      Amount of edges which are processed in parallel.
      (package private) java.util.Spliterator<E> spliterator
      Is 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.Double compute()
      Computes maximum edge weight.
      • Methods inherited from class java.util.concurrent.RecursiveTask

        exec, getRawResult, setRawResult
      • 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 - spliterator
        loadBalancing - loadBalancing
    • Method Detail

      • compute

        protected java.lang.Double compute()
        Computes maximum edge weight. If amount of edges in spliterator is less than loadBalancing, then computation is performed sequentially. If not, the spliterator is used to split the collection and then two new child tasks are created.
        Specified by:
        compute in class java.util.concurrent.RecursiveTask<java.lang.Double>
        Returns:
        max edge weight