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>

class DeltaSteppingShortestPath.MaxEdgeWeightTask extends RecursiveTask<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 Details

    • spliterator

      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 Details

    • MaxEdgeWeightTask

      MaxEdgeWeightTask(Spliterator<E> spliterator, long loadBalancing)
      Constructs a new instance for the given spliterator and loadBalancing
      Parameters:
      spliterator - spliterator
      loadBalancing - loadBalancing
  • Method Details

    • compute

      protected 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 RecursiveTask<Double>
      Returns:
      max edge weight