|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.graphstream.stream.SinkAdapter
org.graphstream.util.StepCounter
public class StepCounter
Count the step of a stream.
Constructor Summary | |
---|---|
StepCounter()
Default constructor. |
Method Summary | |
---|---|
static int |
countStepInFile(String path)
Count step contains in a file. |
int |
getStepCount()
Get the step count. |
void |
reset()
Reset the step count to zero. |
void |
stepBegins(String sourceId,
long timeId,
double time)
Since dynamic graphs are based on discrete event modifications, the notion of step is defined to simulate elapsed time between events. |
Methods inherited from class org.graphstream.stream.SinkAdapter |
---|
edgeAdded, edgeAttributeAdded, edgeAttributeChanged, edgeAttributeRemoved, edgeRemoved, graphAttributeAdded, graphAttributeChanged, graphAttributeRemoved, graphCleared, nodeAdded, nodeAttributeAdded, nodeAttributeChanged, nodeAttributeRemoved, nodeRemoved |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StepCounter()
Method Detail |
---|
public static int countStepInFile(String path) throws IOException
path
- path to the file
IOException
FileSourceFactory
public void reset()
public int getStepCount()
public void stepBegins(String sourceId, long timeId, double time)
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |