edu.iu.iv.modeling.p2p.can
Class CanNetwork

java.lang.Object
  |
  +--edu.iu.iv.modeling.p2p.can.CanNetwork

public class CanNetwork
extends java.lang.Object

This class implements the CAN network modelling algorithm

Author:
Hardik Sheth (hsheth@indiana.edu)

Constructor Summary
CanNetwork(int networkSize)
          Constructor for CanNetwork.
 
Method Summary
 boolean buildCanNetwork()
          This method builds the network based on CAN 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()
          This method returns the Graph object built on CAN network
 int getMaxDegree()
          Get max degree of the network
 int getMinDegree()
          Get min degree of the network
 void printNetwork()
          Print the network 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

CanNetwork

public CanNetwork(int networkSize)
Constructor for CanNetwork. Initializes an UndirectedSparseGraph and sets the network size

Parameters:
networkSize -
Method Detail

getGraph

public edu.uci.ics.jung.graph.Graph getGraph()
This method returns the Graph object built on CAN network

Returns:
graph

buildCanNetwork

public boolean buildCanNetwork()
This method builds the network based on CAN topology

Returns:
boolean

printNetwork

public void printNetwork()
Print the network 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