edu.iu.iv.modeling.p2p.attackTolerance
Class AttackTolerance

java.lang.Object
  |
  +--edu.iu.iv.modeling.p2p.attackTolerance.AttackTolerance

public class AttackTolerance
extends java.lang.Object

Perform Attack Tolerance Test on the network graph. Randomly deletes nodes in the graph.

Author:
Hardik Sheth (hsheth@indiana.edu)

Constructor Summary
AttackTolerance(edu.uci.ics.jung.graph.Graph graph, int numNodes)
          Constructor for AttackTolerance.
 
Method Summary
 edu.uci.ics.jung.graph.Graph getGraph()
          Get the graph representing the network
 int getNumNodes()
          Get the number of highly-connected nodes that are deleted
 void setGraph(edu.uci.ics.jung.graph.Graph graph)
          Set the graph representing the network
 void setNumNodes(int i)
          Set the number of highly-connected nodes that are deleted
 boolean testAttackTolerance()
          Perform attack tolerance test on the graph.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttackTolerance

public AttackTolerance(edu.uci.ics.jung.graph.Graph graph,
                       int numNodes)
Constructor for AttackTolerance. Requires a graph to be passed that represents the network and the number of highly connected nodes to be deleted.

Method Detail

testAttackTolerance

public boolean testAttackTolerance()
Perform attack tolerance test on the graph.

Returns:
true when test done.

getGraph

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

Returns:
graph

getNumNodes

public int getNumNodes()
Get the number of highly-connected nodes that are deleted

Returns:

setGraph

public void setGraph(edu.uci.ics.jung.graph.Graph graph)
Set the graph representing the network

Parameters:
graph -

setNumNodes

public void setNumNodes(int i)
Set the number of highly-connected nodes that are deleted

Parameters:
i -