Class PointsOfInterestGenerator

java.lang.Object
org.graphstream.stream.SourceBase
org.graphstream.algorithm.generator.BaseGenerator
org.graphstream.algorithm.generator.PointsOfInterestGenerator
All Implemented Interfaces:
Generator, org.graphstream.stream.Source

public class PointsOfInterestGenerator
extends BaseGenerator
Generate a social dynamic graph. Graph is composed of high-connected group of nodes, modeling organizations, and few connections between organizations. This is done by creating points of interest. Nodes can be interested by these points or loose them interest. When two nodes are interested by at least one common point, then there are connected. Some probabilities can be set defining the following events :
  • remove a node ;
  • add a node ;
  • remove a point of interest ;
  • add a point of interest.
Initial parameters are :
  • initial count of points of interest ;
  • initial count of nodes ;
Author:
Guilhelm Savin
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  PointsOfInterestGenerator.Parameter  

    Nested classes/interfaces inherited from class org.graphstream.stream.SourceBase

    org.graphstream.stream.SourceBase.ElementType
  • Constructor Summary

    Constructors 
    Constructor Description
    PointsOfInterestGenerator()  
  • Method Summary

    Modifier and Type Method Description
    void begin()
    Add initial count of points of interest, and initial count of people.
    void end()
    End the graph generation by finalizing it.
    static void main​(String... args)  
    boolean nextEvents()
    Step of the generator.
    void setParameter​(PointsOfInterestGenerator.Parameter p, Object value)  

    Methods inherited from class org.graphstream.stream.SourceBase

    addAttributeSink, addElementSink, addSink, attributeSinks, clearAttributeSinks, clearElementSinks, clearSinks, elementSinks, removeAttributeSink, removeElementSink, removeSink, sendAttributeChangedEvent, sendAttributeChangedEvent, sendEdgeAdded, sendEdgeAdded, sendEdgeAttributeAdded, sendEdgeAttributeAdded, sendEdgeAttributeChanged, sendEdgeAttributeChanged, sendEdgeAttributeRemoved, sendEdgeAttributeRemoved, sendEdgeRemoved, sendEdgeRemoved, sendGraphAttributeAdded, sendGraphAttributeAdded, sendGraphAttributeChanged, sendGraphAttributeChanged, sendGraphAttributeRemoved, sendGraphAttributeRemoved, sendGraphCleared, sendGraphCleared, sendNodeAdded, sendNodeAdded, sendNodeAttributeAdded, sendNodeAttributeAdded, sendNodeAttributeChanged, sendNodeAttributeChanged, sendNodeAttributeRemoved, sendNodeAttributeRemoved, sendNodeRemoved, sendNodeRemoved, sendStepBegins, sendStepBegins

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.graphstream.stream.Source

    addAttributeSink, addElementSink, addSink, clearAttributeSinks, clearElementSinks, clearSinks, removeAttributeSink, removeElementSink, removeSink
  • Constructor Details

  • Method Details

    • setParameter

      public void setParameter​(PointsOfInterestGenerator.Parameter p, Object value)
    • begin

      public void begin()
      Add initial count of points of interest, and initial count of people.
      See Also:
      Generator.begin()
    • nextEvents

      public boolean nextEvents()
      Step of the generator. Try to remove a node according to the delPeopleProbability. Try to add a node according to the addPeopleProbability. Try to remove a point of interest according to the delPointOfInterestProbability. Try to add a point of interest according to the addPointOfInterestProbability . Then, step of addicts.
      Returns:
      true while there are elements to add to the graph.
      See Also:
      PointsOfInterestGenerator.Addict.step(), Generator.nextEvents()
    • end

      public void end()
      Description copied from class: BaseGenerator
      End the graph generation by finalizing it. Once the Generator.nextEvents() method returned false (or even if you stop before), this method must be called to finish the graph. In addition, BaseGenerator adds a "clear" operations that removes all the kept edges and nodes identifiers and the associated data.
      Specified by:
      end in interface Generator
      Overrides:
      end in class BaseGenerator
    • main

      public static void main​(String... args)