Package org.graphstream.algorithm
Class DStar
java.lang.Object
org.graphstream.algorithm.DStar
- All Implemented Interfaces:
Algorithm
,DynamicAlgorithm
,org.graphstream.stream.AttributeSink
,org.graphstream.stream.ElementSink
,org.graphstream.stream.Sink
public class DStar extends Object implements DynamicAlgorithm, org.graphstream.stream.Sink
An implementation of the D* algorithm.
- Author:
- Guilhelm Savin
- Scientific Reference :
- Stentz, Anthony (1994), "Optimal and Efficient Path Planning for Partially-Known Environments" , Proceedings of the International Conference on Robotics and Automation: 3310–3317
-
Field Summary
Fields Modifier and Type Field Description static String
COST_ATTRIBUTE
static String
STATE_ATTRIBUTE
-
Constructor Summary
Constructors Constructor Description DStar()
-
Method Summary
Modifier and Type Method Description void
compute()
Run the algorithm.String
defaultResult()
void
edgeAdded(String sourceId, long timeId, String edgeId, String fromNodeId, String toNodeId, boolean directed)
void
edgeAttributeAdded(String sourceId, long timeId, String edgeId, String attribute, Object value)
void
edgeAttributeChanged(String sourceId, long timeId, String edgeId, String attribute, Object oldValue, Object newValue)
void
edgeAttributeRemoved(String sourceId, long timeId, String edgeId, String attribute)
void
edgeRemoved(String sourceId, long timeId, String edgeId)
org.graphstream.algorithm.DStar.State
getState(org.graphstream.graph.Node n)
void
graphAttributeAdded(String sourceId, long timeId, String attribute, Object value)
void
graphAttributeChanged(String sourceId, long timeId, String attribute, Object oldValue, Object newValue)
void
graphAttributeRemoved(String sourceId, long timeId, String attribute)
void
graphCleared(String sourceId, long timeId)
void
init(org.graphstream.graph.Graph graph)
Initialization of the algorithm.void
init(org.graphstream.graph.Node source, org.graphstream.graph.Node target, org.graphstream.graph.Graph graph)
static void
main(String... args)
void
markPath(String attribute, Object on, Object off)
void
nodeAdded(String sourceId, long timeId, String nodeId)
void
nodeAttributeAdded(String sourceId, long timeId, String nodeId, String attribute, Object value)
void
nodeAttributeChanged(String sourceId, long timeId, String nodeId, String attribute, Object oldValue, Object newValue)
void
nodeAttributeRemoved(String sourceId, long timeId, String nodeId, String attribute)
void
nodeRemoved(String sourceId, long timeId, String nodeId)
void
setSource(String source)
void
setTarget(String target)
void
stepBegins(String sourceId, long timeId, double step)
void
terminate()
Terminate the dynamic algorithm.
-
Field Details
-
STATE_ATTRIBUTE
- See Also:
- Constant Field Values
-
COST_ATTRIBUTE
- See Also:
- Constant Field Values
-
-
Constructor Details
-
DStar
public DStar()
-
-
Method Details
-
terminate
public void terminate()Description copied from interface:DynamicAlgorithm
Terminate the dynamic algorithm.- Specified by:
terminate
in interfaceDynamicAlgorithm
- See Also:
Algorithm.init(org.graphstream.graph.Graph)
-
compute
public void compute()Description copied from interface:Algorithm
Run the algorithm. TheAlgorithm.init(Graph)
method has to be called before computing.- Specified by:
compute
in interfaceAlgorithm
- See Also:
Algorithm.init(Graph)
-
init
public void init(org.graphstream.graph.Graph graph)Description copied from interface:Algorithm
Initialization of the algorithm. This method has to be called before theAlgorithm.compute()
method to initialize or reset the algorithm according to the new given graph. -
init
public void init(org.graphstream.graph.Node source, org.graphstream.graph.Node target, org.graphstream.graph.Graph graph) -
setTarget
-
setSource
-
getState
public org.graphstream.algorithm.DStar.State getState(org.graphstream.graph.Node n) -
markPath
-
edgeAttributeAdded
public void edgeAttributeAdded(String sourceId, long timeId, String edgeId, String attribute, Object value)- Specified by:
edgeAttributeAdded
in interfaceorg.graphstream.stream.AttributeSink
-
edgeAttributeChanged
public void edgeAttributeChanged(String sourceId, long timeId, String edgeId, String attribute, Object oldValue, Object newValue)- Specified by:
edgeAttributeChanged
in interfaceorg.graphstream.stream.AttributeSink
-
edgeAttributeRemoved
- Specified by:
edgeAttributeRemoved
in interfaceorg.graphstream.stream.AttributeSink
-
graphAttributeAdded
- Specified by:
graphAttributeAdded
in interfaceorg.graphstream.stream.AttributeSink
-
graphAttributeChanged
public void graphAttributeChanged(String sourceId, long timeId, String attribute, Object oldValue, Object newValue)- Specified by:
graphAttributeChanged
in interfaceorg.graphstream.stream.AttributeSink
-
graphAttributeRemoved
- Specified by:
graphAttributeRemoved
in interfaceorg.graphstream.stream.AttributeSink
-
nodeAttributeAdded
public void nodeAttributeAdded(String sourceId, long timeId, String nodeId, String attribute, Object value)- Specified by:
nodeAttributeAdded
in interfaceorg.graphstream.stream.AttributeSink
-
nodeAttributeChanged
public void nodeAttributeChanged(String sourceId, long timeId, String nodeId, String attribute, Object oldValue, Object newValue)- Specified by:
nodeAttributeChanged
in interfaceorg.graphstream.stream.AttributeSink
-
nodeAttributeRemoved
- Specified by:
nodeAttributeRemoved
in interfaceorg.graphstream.stream.AttributeSink
-
edgeAdded
public void edgeAdded(String sourceId, long timeId, String edgeId, String fromNodeId, String toNodeId, boolean directed)- Specified by:
edgeAdded
in interfaceorg.graphstream.stream.ElementSink
-
edgeRemoved
- Specified by:
edgeRemoved
in interfaceorg.graphstream.stream.ElementSink
-
graphCleared
- Specified by:
graphCleared
in interfaceorg.graphstream.stream.ElementSink
-
nodeAdded
- Specified by:
nodeAdded
in interfaceorg.graphstream.stream.ElementSink
-
nodeRemoved
- Specified by:
nodeRemoved
in interfaceorg.graphstream.stream.ElementSink
-
stepBegins
- Specified by:
stepBegins
in interfaceorg.graphstream.stream.ElementSink
-
main
-
defaultResult
-