org.graphstream.algorithm.measure
Class MaxSimultaneousNodeCount

java.lang.Object
  extended by org.graphstream.stream.SinkAdapter
      extended by 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 Summary
MaxSimultaneousNodeCount()
           
 
Method Summary
 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.
 
Methods inherited from class org.graphstream.stream.SinkAdapter
edgeAdded, edgeAttributeAdded, edgeAttributeChanged, edgeAttributeRemoved, edgeRemoved, graphAttributeAdded, graphAttributeChanged, graphAttributeRemoved, nodeAttributeAdded, nodeAttributeChanged, nodeAttributeRemoved, stepBegins
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaxSimultaneousNodeCount

public MaxSimultaneousNodeCount()
Method Detail

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


Copyright © 2012. All Rights Reserved.