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 StringCOST_ATTRIBUTEstatic StringSTATE_ATTRIBUTE -
Constructor Summary
Constructors Constructor Description DStar() -
Method Summary
Modifier and Type Method Description voidcompute()Run the algorithm.StringdefaultResult()voidedgeAdded(String sourceId, long timeId, String edgeId, String fromNodeId, String toNodeId, boolean directed)voidedgeAttributeAdded(String sourceId, long timeId, String edgeId, String attribute, Object value)voidedgeAttributeChanged(String sourceId, long timeId, String edgeId, String attribute, Object oldValue, Object newValue)voidedgeAttributeRemoved(String sourceId, long timeId, String edgeId, String attribute)voidedgeRemoved(String sourceId, long timeId, String edgeId)org.graphstream.algorithm.DStar.StategetState(org.graphstream.graph.Node n)voidgraphAttributeAdded(String sourceId, long timeId, String attribute, Object value)voidgraphAttributeChanged(String sourceId, long timeId, String attribute, Object oldValue, Object newValue)voidgraphAttributeRemoved(String sourceId, long timeId, String attribute)voidgraphCleared(String sourceId, long timeId)voidinit(org.graphstream.graph.Graph graph)Initialization of the algorithm.voidinit(org.graphstream.graph.Node source, org.graphstream.graph.Node target, org.graphstream.graph.Graph graph)static voidmain(String... args)voidmarkPath(String attribute, Object on, Object off)voidnodeAdded(String sourceId, long timeId, String nodeId)voidnodeAttributeAdded(String sourceId, long timeId, String nodeId, String attribute, Object value)voidnodeAttributeChanged(String sourceId, long timeId, String nodeId, String attribute, Object oldValue, Object newValue)voidnodeAttributeRemoved(String sourceId, long timeId, String nodeId, String attribute)voidnodeRemoved(String sourceId, long timeId, String nodeId)voidsetSource(String source)voidsetTarget(String target)voidstepBegins(String sourceId, long timeId, double step)voidterminate()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:DynamicAlgorithmTerminate the dynamic algorithm.- Specified by:
terminatein interfaceDynamicAlgorithm- See Also:
Algorithm.init(org.graphstream.graph.Graph)
-
compute
public void compute()Description copied from interface:AlgorithmRun the algorithm. TheAlgorithm.init(Graph)method has to be called before computing.- Specified by:
computein interfaceAlgorithm- See Also:
Algorithm.init(Graph)
-
init
public void init(org.graphstream.graph.Graph graph)Description copied from interface:AlgorithmInitialization 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:
edgeAttributeAddedin interfaceorg.graphstream.stream.AttributeSink
-
edgeAttributeChanged
public void edgeAttributeChanged(String sourceId, long timeId, String edgeId, String attribute, Object oldValue, Object newValue)- Specified by:
edgeAttributeChangedin interfaceorg.graphstream.stream.AttributeSink
-
edgeAttributeRemoved
- Specified by:
edgeAttributeRemovedin interfaceorg.graphstream.stream.AttributeSink
-
graphAttributeAdded
- Specified by:
graphAttributeAddedin interfaceorg.graphstream.stream.AttributeSink
-
graphAttributeChanged
public void graphAttributeChanged(String sourceId, long timeId, String attribute, Object oldValue, Object newValue)- Specified by:
graphAttributeChangedin interfaceorg.graphstream.stream.AttributeSink
-
graphAttributeRemoved
- Specified by:
graphAttributeRemovedin interfaceorg.graphstream.stream.AttributeSink
-
nodeAttributeAdded
public void nodeAttributeAdded(String sourceId, long timeId, String nodeId, String attribute, Object value)- Specified by:
nodeAttributeAddedin interfaceorg.graphstream.stream.AttributeSink
-
nodeAttributeChanged
public void nodeAttributeChanged(String sourceId, long timeId, String nodeId, String attribute, Object oldValue, Object newValue)- Specified by:
nodeAttributeChangedin interfaceorg.graphstream.stream.AttributeSink
-
nodeAttributeRemoved
- Specified by:
nodeAttributeRemovedin interfaceorg.graphstream.stream.AttributeSink
-
edgeAdded
public void edgeAdded(String sourceId, long timeId, String edgeId, String fromNodeId, String toNodeId, boolean directed)- Specified by:
edgeAddedin interfaceorg.graphstream.stream.ElementSink
-
edgeRemoved
- Specified by:
edgeRemovedin interfaceorg.graphstream.stream.ElementSink
-
graphCleared
- Specified by:
graphClearedin interfaceorg.graphstream.stream.ElementSink
-
nodeAdded
- Specified by:
nodeAddedin interfaceorg.graphstream.stream.ElementSink
-
nodeRemoved
- Specified by:
nodeRemovedin interfaceorg.graphstream.stream.ElementSink
-
stepBegins
- Specified by:
stepBeginsin interfaceorg.graphstream.stream.ElementSink
-
main
-
defaultResult
-