Module org.arakhne.afc.gis.gisroad
Package org.arakhne.afc.gis.road
Class DistanceBasedRoadNetworkIterator
- java.lang.Object
-
- org.arakhne.afc.math.graph.GraphIterator<ST,PT>
-
- org.arakhne.afc.math.graph.DepthGraphIterator<RoadSegment,RoadConnection>
-
- org.arakhne.afc.gis.road.DistanceBasedRoadNetworkIterator
-
- All Implemented Interfaces:
Iterator<RoadSegment>
final class DistanceBasedRoadNetworkIterator extends DepthGraphIterator<RoadSegment,RoadConnection>
This class is an iterator on the segments of a road network limited to a specified depth.- Since:
- 14.0
- Version:
- 17.0 2020-01-04 14:41:55
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.gis
- Maven Artifact Id:
- gisroad
-
-
Field Summary
-
Fields inherited from class org.arakhne.afc.math.graph.GraphIterator
dynamicDepthUpdater
-
-
Constructor Summary
Constructors Constructor Description DistanceBasedRoadNetworkIterator(RoadSegmentContainer network, double depth, double position_from_starting_point, RoadSegment segment, RoadConnection starting_point, boolean allowManyReplies, boolean assumeOrientedSegments)
Deprecated, for removal: This API element is subject to removal in a future version.DistanceBasedRoadNetworkIterator(RoadSegmentContainer network, double depth, double position_from_starting_point, RoadSegment segment, RoadConnection starting_point, boolean allowManyReplies, boolean assumeOrientedSegments, DynamicDepthUpdater<RoadSegment,RoadConnection> dynamicDepthUpdate)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Comparator<GraphIterationElement<RoadSegment,RoadConnection>>
createVisitedSegmentComparator(boolean assumeOrientedSegments)
Invoked when a comparator on visited segments is required.-
Methods inherited from class org.arakhne.afc.math.graph.DepthGraphIterator
canGotoIntoElement
-
Methods inherited from class org.arakhne.afc.math.graph.GraphIterator
getNextElement, getNextSegments, hasNext, ignoreElementsAfter, ignoreElementsAfter, isManySegmentReplyEnabled, isOrientedSegmentSupportEnabled, newIterationElement, next, nextElement, remove
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
DistanceBasedRoadNetworkIterator
@Deprecated(since="16.0", forRemoval=true) DistanceBasedRoadNetworkIterator(RoadSegmentContainer network, double depth, double position_from_starting_point, RoadSegment segment, RoadConnection starting_point, boolean allowManyReplies, boolean assumeOrientedSegments)
Deprecated, for removal: This API element is subject to removal in a future version.Constructor.- Parameters:
network
- is the road network to iterator on.depth
- is the maximal depth to reach (in the metric coordiante system).position_from_starting_point
- is the starting position from the starting_point (in meters).segment
- is the segment from which to start.starting_point
- is the segment's point indicating the direction.allowManyReplies
- may betrue
to allow to reply many times the same segment, otherwhisefalse
.assumeOrientedSegments
- indicates if the iterator is taking into account the orientation of the road segments. Iftrue
it assumes that a segment could be reached by both its end points. Iffalse
it assumes that a segment could be reach only one time.
-
DistanceBasedRoadNetworkIterator
DistanceBasedRoadNetworkIterator(RoadSegmentContainer network, double depth, double position_from_starting_point, RoadSegment segment, RoadConnection starting_point, boolean allowManyReplies, boolean assumeOrientedSegments, DynamicDepthUpdater<RoadSegment,RoadConnection> dynamicDepthUpdate)
Constructor.- Parameters:
network
- is the road network to iterator on.depth
- is the maximal depth to reach (in the metric coordiante system).position_from_starting_point
- is the starting position from the starting_point (in meters).segment
- is the segment from which to start.starting_point
- is the segment's point indicating the direction.allowManyReplies
- may betrue
to allow to reply many times the same segment, otherwhisefalse
.assumeOrientedSegments
- indicates if the iterator is taking into account the orientation of the road segments. Iftrue
it assumes that a segment could be reached by both its end points. Iffalse
it assumes that a segment could be reach only one time.dynamicDepthUpdate
- if notnull
, it is used to dynamically update thedepth
.- Since:
- 16.0
-
-
Method Detail
-
createVisitedSegmentComparator
protected Comparator<GraphIterationElement<RoadSegment,RoadConnection>> createVisitedSegmentComparator(boolean assumeOrientedSegments)
Description copied from class:GraphIterator
Invoked when a comparator on visited segments is required.- Overrides:
createVisitedSegmentComparator
in classGraphIterator<RoadSegment,RoadConnection>
- Parameters:
assumeOrientedSegments
- may betrue
to assume that the same segment has two different instances for graph iteration: the first instance is associated the first point of the segment and the second instance is associated to the last point of the segment. If this parameter isfalse
to assume that the end points of a segment are not distinguished.- Returns:
- the graph element iterator, or
null
to use the default comparation behaviour of theGraphIterationElement
.
-
-