Module org.jgrapht.core
Package org.jgrapht.alg.shortestpath
Class ContractionHierarchyPrecomputation.ContractionTask
- java.lang.Object
-
- org.jgrapht.alg.shortestpath.ContractionHierarchyPrecomputation.ContractionTask
-
- All Implemented Interfaces:
java.lang.Runnable
- Enclosing class:
- ContractionHierarchyPrecomputation<V,E>
private class ContractionHierarchyPrecomputation.ContractionTask extends java.lang.Object implements java.lang.RunnableTask that is used to perform computing of initial priorities, independent set and shortcuts, updating neighbours priorities and marking upward edges. To achieve good load balancing segment of vertices inverticesis divided into chunks usingtaskId.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.function.Consumer<ContractionHierarchyPrecomputation.ContractionVertex<V>>consumerPerforms needed action with vertices.(package private) intsegmentsEndEnd if the working segment inverticesexclusively.(package private) intsegmentStartStart if the working segment inverticesinclusively.(package private) inttaskIdId of this task.
-
Constructor Summary
Constructors Constructor Description ContractionTask(int taskId)Constructs an instance of the task for the giventaskId.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrun()private intworkerSegmentEnd(int segmentStart, int segmentEnd)Computes end of the working chunk for this task.private intworkerSegmentStart(int segmentStart, int segmentEnd)Computes start of the working chunk for this task.
-
-
-
Field Detail
-
taskId
int taskId
Id of this task.
-
segmentStart
int segmentStart
Start if the working segment inverticesinclusively.
-
segmentsEnd
int segmentsEnd
End if the working segment inverticesexclusively.
-
consumer
java.util.function.Consumer<ContractionHierarchyPrecomputation.ContractionVertex<V>> consumer
Performs needed action with vertices.
-
-
Method Detail
-
run
public void run()
- Specified by:
runin interfacejava.lang.Runnable
-
workerSegmentStart
private int workerSegmentStart(int segmentStart, int segmentEnd)Computes start of the working chunk for this task.- Parameters:
segmentStart- working segment startsegmentEnd- working segment end- Returns:
- working chunk start
-
workerSegmentEnd
private int workerSegmentEnd(int segmentStart, int segmentEnd)Computes end of the working chunk for this task.- Parameters:
segmentStart- working segment startsegmentEnd- working segment end- Returns:
- working chunk end
-
-