Gephi Toolkit Javadoc

org.gephi.io.generator.plugin
Class WattsStrogatz

java.lang.Object
  extended by org.gephi.io.generator.plugin.WattsStrogatz
All Implemented Interfaces:
Generator, LongTask

public class WattsStrogatz
extends java.lang.Object
implements Generator

Author:
Mathieu Bastian

Field Summary
protected  boolean cancel
           
protected  int numberOfNeighbors
           
protected  int numberOfNodes
           
protected  ProgressTicket progress
           
protected  double rewiringProbability
           
 
Constructor Summary
WattsStrogatz()
           
 
Method Summary
 boolean cancel()
          Cancel the task.
 void generate(ContainerLoader container)
          Main method that generates the graph and put it in the container.
 java.lang.String getName()
          Returns the generator display name.
 int getNumberOfNeighbors()
           
 int getNumberOfNodes()
           
 double getRewiringProbability()
           
 GeneratorUI getUI()
          Returns the UI that belongs to this generator, or null if UI is not needed.
 void setNumberOfNeighbors(int numberOfNeighbors)
           
 void setNumberOfNodes(int numberOfNodes)
           
 void setProgressTicket(ProgressTicket progressTicket)
          Set the progress ticket for the long task.
 void setRewiringProbability(double rewiringProbability)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numberOfNodes

protected int numberOfNodes

numberOfNeighbors

protected int numberOfNeighbors

rewiringProbability

protected double rewiringProbability

progress

protected ProgressTicket progress

cancel

protected boolean cancel
Constructor Detail

WattsStrogatz

public WattsStrogatz()
Method Detail

generate

public void generate(ContainerLoader container)
Description copied from interface: Generator
Main method that generates the graph and put it in the container.

From the container content, the controller makes verification and append the graph to GraphAPI.

Specified by:
generate in interface Generator
Parameters:
container - the container the graph is to be pushed

getNumberOfNeighbors

public int getNumberOfNeighbors()

setNumberOfNeighbors

public void setNumberOfNeighbors(int numberOfNeighbors)

getNumberOfNodes

public int getNumberOfNodes()

setNumberOfNodes

public void setNumberOfNodes(int numberOfNodes)

getRewiringProbability

public double getRewiringProbability()

setRewiringProbability

public void setRewiringProbability(double rewiringProbability)

getName

public java.lang.String getName()
Description copied from interface: Generator
Returns the generator display name.

Specified by:
getName in interface Generator
Returns:
returns the generator name

getUI

public GeneratorUI getUI()
Description copied from interface: Generator
Returns the UI that belongs to this generator, or null if UI is not needed.

Specified by:
getUI in interface Generator
Returns:
the UI thet belongs to this generator, or null

cancel

public boolean cancel()
Description copied from interface: LongTask
Cancel the task. Returns true if the task has been sucessfully cancelled, false otherwise.

Specified by:
cancel in interface LongTask
Returns:
true if the task has been sucessfully cancelled, false otherwise

setProgressTicket

public void setProgressTicket(ProgressTicket progressTicket)
Description copied from interface: LongTask
Set the progress ticket for the long task. Can't be null.

Specified by:
setProgressTicket in interface LongTask
Parameters:
progressTicket - the progress ticket for this task

Gephi Toolkit Javadoc