Package org.graphstream.algorithm
Class AlgorithmComputationTrigger
java.lang.Object
org.graphstream.stream.SinkAdapter
org.graphstream.algorithm.AlgorithmComputationTrigger
- All Implemented Interfaces:
org.graphstream.stream.AttributeSink
,org.graphstream.stream.ElementSink
,org.graphstream.stream.Sink
public class AlgorithmComputationTrigger
extends org.graphstream.stream.SinkAdapter
Provides a way to trigger the computation of an algorithm according to a type
of events.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AlgorithmComputationTrigger.Mode
Defines when the computation is triggered. -
Constructor Summary
Constructors Constructor Description AlgorithmComputationTrigger(AlgorithmComputationTrigger.Mode mode, Algorithm algo)
-
Method Summary
Modifier and Type Method Description AlgorithmComputationTrigger.Mode
getMode()
Get the trigger mode.void
setMode(AlgorithmComputationTrigger.Mode mode)
Set the trigger mode.void
stepBegins(String sourceId, long timeId, double step)
Methods inherited from class org.graphstream.stream.SinkAdapter
edgeAdded, edgeAttributeAdded, edgeAttributeChanged, edgeAttributeRemoved, edgeRemoved, graphAttributeAdded, graphAttributeChanged, graphAttributeRemoved, graphCleared, nodeAdded, nodeAttributeAdded, nodeAttributeChanged, nodeAttributeRemoved, nodeRemoved
-
Constructor Details
-
Method Details
-
setMode
Set the trigger mode.- Parameters:
mode
- the trigger mode
-
getMode
Get the trigger mode.- Returns:
- the trigger mode
-
stepBegins
- Specified by:
stepBegins
in interfaceorg.graphstream.stream.ElementSink
- Overrides:
stepBegins
in classorg.graphstream.stream.SinkAdapter
-