edu.iu.iv.search.p2p.chord
Class ChordSearchAlgorithm

java.lang.Object
  |
  +--edu.iu.iv.search.p2p.chord.ChordSearchAlgorithm
All Implemented Interfaces:
Algorithm

public class ChordSearchAlgorithm
extends java.lang.Object
implements Algorithm

Wrapper for the CHORD Search Algorithm

Author:
Hardik Sheth (hsheth@indiana.edu)

Constructor Summary
ChordSearchAlgorithm()
          Empty Constructor
ChordSearchAlgorithm(edu.uci.ics.jung.graph.Graph graph, int sourceNode, int targetNode)
          Constructor for CanSearchAlgorithm.
 
Method Summary
 boolean execute()
          Runs the algorithm.
 int getSourceNode()
          Get the source node
 int getTargetNode()
          Get the target node
 void setSourceNode(int sourceNode)
          Set the starting node for search
 void setTargetNode(int targetNode)
          Set the target node to search
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChordSearchAlgorithm

public ChordSearchAlgorithm(edu.uci.ics.jung.graph.Graph graph,
                            int sourceNode,
                            int targetNode)
Constructor for CanSearchAlgorithm. Sets the source and target nodes for search and the file containing the graph.

Parameters:
sourceNode -
targetNode -

ChordSearchAlgorithm

public ChordSearchAlgorithm()
Empty Constructor

Method Detail

execute

public boolean execute()
Description copied from interface: Algorithm
Runs the algorithm.

Specified by:
execute in interface Algorithm
Returns:
true if the algorithm ran successfully, false otherwise.
See Also:
Algorithm.execute()

getSourceNode

public int getSourceNode()
Get the source node

Returns:
source node

getTargetNode

public int getTargetNode()
Get the target node

Returns:
target node

setSourceNode

public void setSourceNode(int sourceNode)
Set the starting node for search

Parameters:
sourceNode -

setTargetNode

public void setTargetNode(int targetNode)
Set the target node to search

Parameters:
targetNode -