- 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.
- Foudalis Ilias
- Class Constructor. This constructor can be used to call directly the method computeFDGTables , without passing as an argument the vetrices of the graph.
public BuiltFDGTables(java.util.Vector nodes)
- Class constructor.
nodes - Vector This Vector holds the vertices of the graph generaded. The vertices must be of type GraphNode
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.
degrees - double The degree of each node in the graph.
public double getFreqTable()
- Returns the frequency table.
- double Array holding the frequency of the degrees of the graph.
public double getCcdfTable()
- Returns the ccdf table.
- double Array holding the ccdf values of the graph.
public double getDegreeTable()
- Returns the degree table.
- double Array of each node's degree.