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 E
 
the maximal count of nodes appearing simultaneously in the graph is 4.
  • Constructor Details

  • 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

      public void nodeAdded​(String sourceId, long timeId, String nodeId)
      Specified by:
      nodeAdded in interface org.graphstream.stream.ElementSink
      Overrides:
      nodeAdded in class org.graphstream.stream.SinkAdapter
    • nodeRemoved

      public void nodeRemoved​(String sourceId, long timeId, String nodeId)
      Specified by:
      nodeRemoved in interface org.graphstream.stream.ElementSink
      Overrides:
      nodeRemoved in class org.graphstream.stream.SinkAdapter
    • graphCleared

      public void graphCleared​(String sourceId, long timeId)
      Specified by:
      graphCleared in interface org.graphstream.stream.ElementSink
      Overrides:
      graphCleared in class org.graphstream.stream.SinkAdapter