Class MaxSimultaneousNodeCount
java.lang.Object
org.graphstream.stream.SinkAdapter
org.graphstream.algorithm.measure.MaxSimultaneousNodeCount
- All Implemented Interfaces:
org.graphstream.stream.AttributeSink
,org.graphstream.stream.ElementSink
,org.graphstream.stream.Sink
public class MaxSimultaneousNodeCount
extends org.graphstream.stream.SinkAdapter
A measure to get the maximum count of nodes appearing simultaneously in the
dynamic graph. It works as a sink, so it just needs to be added to the source
providing graph informations.
For example, in the graph :
an A an B an C dn B an D dn C an E an F dn Ethe maximal count of nodes appearing simultaneously in the graph is 4.
-
Constructor Summary
Constructors Constructor Description MaxSimultaneousNodeCount()
-
Method Summary
Modifier and Type Method Description int
getMaxSimultaneousNodeCount()
Get the max value.void
graphCleared(String sourceId, long timeId)
void
nodeAdded(String sourceId, long timeId, String nodeId)
void
nodeRemoved(String sourceId, long timeId, String nodeId)
void
reset()
Reset the max value.
-
Constructor Details
-
MaxSimultaneousNodeCount
public MaxSimultaneousNodeCount()
-
-
Method Details
-
reset
public void reset()Reset the max value. -
getMaxSimultaneousNodeCount
public int getMaxSimultaneousNodeCount()Get the max value.- Returns:
- the max count of nodes appearing simultaneously in the graph
-
nodeAdded
- Specified by:
nodeAdded
in interfaceorg.graphstream.stream.ElementSink
- Overrides:
nodeAdded
in classorg.graphstream.stream.SinkAdapter
-
nodeRemoved
- Specified by:
nodeRemoved
in interfaceorg.graphstream.stream.ElementSink
- Overrides:
nodeRemoved
in classorg.graphstream.stream.SinkAdapter
-
graphCleared
- Specified by:
graphCleared
in interfaceorg.graphstream.stream.ElementSink
- Overrides:
graphCleared
in classorg.graphstream.stream.SinkAdapter
-