Class MaxSimultaneousEdgeCount
java.lang.Object
org.graphstream.stream.SinkAdapter
org.graphstream.algorithm.measure.MaxSimultaneousEdgeCount
- All Implemented Interfaces:
org.graphstream.stream.AttributeSink
,org.graphstream.stream.ElementSink
,org.graphstream.stream.Sink
public class MaxSimultaneousEdgeCount
extends org.graphstream.stream.SinkAdapter
A measure to get the maximum count of edges 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 :
ae AB A B ae BC B C ae CD C D de BC ae DE D E de CD ae EF E F ae FG F G de EFthe maximal count of edges appearing simultaneously in the graph is 4.
-
Constructor Summary
Constructors Constructor Description MaxSimultaneousEdgeCount()
-
Method Summary
Modifier and Type Method Description void
edgeAdded(String sourceId, long timeId, String edgeId, String node1, String node2, boolean directed)
void
edgeRemoved(String sourceId, long timeId, String edgeId)
int
getMaxSimultaneousEdgeCount()
Get the max value.void
graphCleared(String sourceId, long timeId)
void
reset()
Reset the max value.
-
Constructor Details
-
MaxSimultaneousEdgeCount
public MaxSimultaneousEdgeCount()
-
-
Method Details
-
reset
public void reset()Reset the max value. -
getMaxSimultaneousEdgeCount
public int getMaxSimultaneousEdgeCount()Get the max value.- Returns:
- the max count of edges appearing simultaneously in the graph
-
edgeAdded
public void edgeAdded(String sourceId, long timeId, String edgeId, String node1, String node2, boolean directed)- Specified by:
edgeAdded
in interfaceorg.graphstream.stream.ElementSink
- Overrides:
edgeAdded
in classorg.graphstream.stream.SinkAdapter
-
edgeRemoved
- Specified by:
edgeRemoved
in interfaceorg.graphstream.stream.ElementSink
- Overrides:
edgeRemoved
in classorg.graphstream.stream.SinkAdapter
-
graphCleared
- Specified by:
graphCleared
in interfaceorg.graphstream.stream.ElementSink
- Overrides:
graphCleared
in classorg.graphstream.stream.SinkAdapter
-