edu.iu.iv.modeling.p2p.chord
Class ChordNetwork

java.lang.Object
  |
  +--edu.iu.iv.modeling.p2p.chord.ChordNetwork

public class ChordNetwork
extends java.lang.Object

CHORD Network Modeling Algorithm for Structured P2P Networks.

Author:
Hardik Sheth (hsheth@indiana.edu)

Constructor Summary
ChordNetwork(int networkSize, int fingerTableSize)
          Constructor for ChordNetwork
 
Method Summary
 boolean buildChordNetwork()
          Build the network based on CHORD topology
 float getAvgDegree()
          Get average degree of the network
 java.lang.String getFailReason()
          Get the reason because of which modelig failed
 edu.uci.ics.jung.graph.Graph getGraph()
          Get the Graph object representing the CHORD network
 int getMaxDegree()
          Get max degree of the network
 int getMinDegree()
          Get min degree of the network
 void printNetwork()
          Print graph
 void writeGraph(java.lang.String filename)
          Write the graph to a file
 void writePajekFile(java.lang.String filename)
          Create a Pajek file
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChordNetwork

public ChordNetwork(int networkSize,
                    int fingerTableSize)
Constructor for ChordNetwork

Parameters:
networkSize - : size of the network
fingerTableSize - : minimum number of nodes on the ring a node will connect to
Method Detail

getGraph

public edu.uci.ics.jung.graph.Graph getGraph()
Get the Graph object representing the CHORD network

Returns:
graph

buildChordNetwork

public boolean buildChordNetwork()
Build the network based on CHORD topology

Returns:
true if the network built successfully, false otherwise

printNetwork

public void printNetwork()
Print graph


writePajekFile

public void writePajekFile(java.lang.String filename)
Create a Pajek file


writeGraph

public void writeGraph(java.lang.String filename)
Write the graph to a file


getAvgDegree

public float getAvgDegree()
Get average degree of the network

Returns:
average degree

getMaxDegree

public int getMaxDegree()
Get max degree of the network

Returns:
max degree

getMinDegree

public int getMinDegree()
Get min degree of the network

Returns:
min degree

getFailReason

public java.lang.String getFailReason()
Get the reason because of which modelig failed

Returns:
reason