org.graphstream.algorithm.measure
Class MaxSimultaneousEdgeCount

java.lang.Object
  extended by org.graphstream.stream.SinkAdapter
      extended by 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 EF
 
the maximal count of edges appearing simultaneously in the graph is 4.


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

Constructor Detail

MaxSimultaneousEdgeCount

public MaxSimultaneousEdgeCount()
Method Detail

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 interface org.graphstream.stream.ElementSink
Overrides:
edgeAdded in class org.graphstream.stream.SinkAdapter

edgeRemoved

public void edgeRemoved(String sourceId,
                        long timeId,
                        String edgeId)
Specified by:
edgeRemoved in interface org.graphstream.stream.ElementSink
Overrides:
edgeRemoved 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.