org.graphstream.algorithm
Class AlgorithmComputationTrigger

java.lang.Object
  extended by org.graphstream.stream.SinkAdapter
      extended by org.graphstream.algorithm.AlgorithmComputationTrigger
All Implemented Interfaces:
org.graphstream.stream.AttributeSink, org.graphstream.stream.ElementSink, org.graphstream.stream.Sink

public class AlgorithmComputationTrigger
extends org.graphstream.stream.SinkAdapter

Provides a way to trigger the computation of an algorithm according to a type of events.


Nested Class Summary
static class AlgorithmComputationTrigger.Mode
          Defines when the computation is triggered.
 
Constructor Summary
AlgorithmComputationTrigger(AlgorithmComputationTrigger.Mode mode, Algorithm algo)
           
 
Method Summary
 AlgorithmComputationTrigger.Mode getMode()
          Get the trigger mode.
 void setMode(AlgorithmComputationTrigger.Mode mode)
          Set the trigger mode.
 void stepBegins(String sourceId, long timeId, double step)
           
 
Methods inherited from class org.graphstream.stream.SinkAdapter
edgeAdded, edgeAttributeAdded, edgeAttributeChanged, edgeAttributeRemoved, edgeRemoved, graphAttributeAdded, graphAttributeChanged, graphAttributeRemoved, graphCleared, nodeAdded, nodeAttributeAdded, nodeAttributeChanged, nodeAttributeRemoved, nodeRemoved
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlgorithmComputationTrigger

public AlgorithmComputationTrigger(AlgorithmComputationTrigger.Mode mode,
                                   Algorithm algo)
Method Detail

setMode

public void setMode(AlgorithmComputationTrigger.Mode mode)
Set the trigger mode.

Parameters:
mode -

getMode

public AlgorithmComputationTrigger.Mode getMode()
Get the trigger mode.

Returns:

stepBegins

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


Copyright © 2012. All Rights Reserved.