Package casa.lepton.walk
Class GraphWalker
java.lang.Object
casa.lepton.walk.GraphWalker
- All Implemented Interfaces:
Walker
- Direct Known Subclasses:
DynGraphWalker
,LimitedAreaGraphWalker
,TractorWalker
The mobility of a mobile element that moves along an underlying graph.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
computeNextPath
(long time) protected casa.util.geom.CoordCar
getCoord
(org.graphstream.graph.Node node) protected casa.util.geom.CoordCar
getCoordAround
(org.graphstream.graph.Node node) casa.util.geom.CoordCar
getPosition
(long time) Returns aCoordCar
object that defines the position of thisWalker
at the specified time.protected casa.util.geom.Shape
getStep()
protected Step
getStep
(long time, org.graphstream.graph.Node depNode, org.graphstream.graph.Node arrNode, boolean endOfPath) protected double
getUniformValue
(double min, double max) getWalk()
nextStep()
nextStep
(long time) nextStep2
(long time) protected org.graphstream.graph.Node
selectNode
(String pauseType)
-
Field Details
-
walk_
-
pauseType
-
step_
-
speed_
protected double speed_ -
departureNode_
protected org.graphstream.graph.Node departureNode_ -
arrivalNode_
protected org.graphstream.graph.Node arrivalNode_ -
path_
-
-
Constructor Details
-
GraphWalker
protected GraphWalker() -
GraphWalker
-
-
Method Details
-
getWalk
Description copied from interface:Walker
-
getStep
Description copied from interface:Walker
-
getCoord
protected casa.util.geom.CoordCar getCoord(org.graphstream.graph.Node node) -
getShape
-
getCoordAround
protected casa.util.geom.CoordCar getCoordAround(org.graphstream.graph.Node node) -
getUniformValue
protected double getUniformValue(double min, double max) -
getPosition
public casa.util.geom.CoordCar getPosition(long time) Description copied from interface:Walker
Returns aCoordCar
object that defines the position of thisWalker
at the specified time.- Specified by:
getPosition
in interfaceWalker
- Parameters:
time
- the time for which the position is requested- Returns:
- the position of this
Walker
at the specified time
-
selectNode
-
computeNextPath
public void computeNextPath(long time) -
getStep
protected Step getStep(long time, org.graphstream.graph.Node depNode, org.graphstream.graph.Node arrNode, boolean endOfPath) -
nextStep2
-
nextStep
-
nextStep
Description copied from interface:Walker
-