Pandora
Class BuiltFDGTables

public class BuiltFDGTables

BuiltFDGTables was implemented to help us having a quick way to compute the degree, ccdf and frequency values of the graph ( since when computing graph metrics these values are used all the time). There are 2 ways to use an object of that class. The first way is to pass as a parameter uopn the creation of the object the graph vertices. The second way is not to pass any argument.

For example the first way would be like:

  • 1) BuiltFDGTables fdgtables = new BuiltFDGTables(nodes); nodes is a vector holding ojects of type GraphNode.
  • Using the second way the following 2 steps have to be made:

  • 1) BuiltFDGTables fdgtables = new BuiltFDGTables();
  • 2) fdgtables.computeFDGTables(degrees); degrees is a double array holding the degree of each node.
  • Version:
    0.1
    Author:
    Foudalis Ilias
    Constructor Detail

    BuiltFDGTables

    public BuiltFDGTables()
    Class Constructor. This constructor can be used to call directly the method computeFDGTables , without passing as an argument the vetrices of the graph.

    BuiltFDGTables

    public BuiltFDGTables(java.util.Vector nodes)
    Class constructor.
    Parameters:
    nodes - Vector This Vector holds the vertices of the graph generaded. The vertices must be of type GraphNode

    Method Detail

    computeFDGTables

    public void computeFDGTables(double[] degrees)
    This method contsructs the frequency and ccdf tables (The degree table is computed when calling the constructor BuiltFDGTables. This method can be called directly if we decide to use BuiltFDGTables.
    Parameters:
    degrees - double[] The degree of each node in the graph.

    getFreqTable

    public double[] getFreqTable()
    Returns the frequency table.
    Returns:
    double[] Array holding the frequency of the degrees of the graph.

    getCcdfTable

    public double[] getCcdfTable()
    Returns the ccdf table.
    Returns:
    double[] Array holding the ccdf values of the graph.

    getDegreeTable

    public double[] getDegreeTable()
    Returns the degree table.
    Returns:
    double[] Array of each node's degree.