public class AlgorithmComputationTrigger extends SinkAdapter
Modifier and Type | Class and Description |
---|---|
static class |
AlgorithmComputationTrigger.Mode
Defines when the computation is triggered.
|
Modifier and Type | Field and Description |
---|---|
protected Algorithm |
algo
Algorithm computed.
|
protected AlgorithmComputationTrigger.Mode |
mode
Mode of this trigger.
|
Constructor and Description |
---|
AlgorithmComputationTrigger(AlgorithmComputationTrigger.Mode mode,
Algorithm algo) |
Modifier and Type | Method and 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)
Since dynamic graphs are based on discrete event modifications, the
notion of step is defined to simulate elapsed time between events.
|
edgeAdded, edgeAttributeAdded, edgeAttributeChanged, edgeAttributeRemoved, edgeRemoved, graphAttributeAdded, graphAttributeChanged, graphAttributeRemoved, graphCleared, nodeAdded, nodeAttributeAdded, nodeAttributeChanged, nodeAttributeRemoved, nodeRemoved
protected AlgorithmComputationTrigger.Mode mode
public AlgorithmComputationTrigger(AlgorithmComputationTrigger.Mode mode, Algorithm algo)
public void setMode(AlgorithmComputationTrigger.Mode mode)
mode
- public AlgorithmComputationTrigger.Mode getMode()
public void stepBegins(String sourceId, long timeId, double step)
ElementSink
Since dynamic graphs are based on discrete event modifications, the notion of step is defined to simulate elapsed time between events. So a step is a event that occurs in the graph, it does not modify it but it gives a kind of timestamp that allow the tracking of the progress of the graph over the time.
This kind of event is useful for dynamic algorithms that listen to the dynamic graph and need to measure the time in the graph's evolution.
stepBegins
in interface ElementSink
stepBegins
in class SinkAdapter
sourceId
- Identifier of the graph where the step starts.timeId
- A numerical value that may give a timestamp to track the
evolution of the graph over the time.WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses