|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--edu.iu.iv.search.p2p.bfs.BreadthFirstSearch
Breadth First Search Algorithm
| Constructor Summary | |
BreadthFirstSearch()
|
|
BreadthFirstSearch(edu.uci.ics.jung.graph.Graph graph)
Constructor for BreadthFirstSearch. |
|
BreadthFirstSearch(edu.uci.ics.jung.graph.Graph graph,
double threshold)
Constructor for BreadthFirstSearch. |
|
| Method Summary | |
java.lang.String |
getFailReason()
Get the reason because of which modelig failed |
edu.uci.ics.jung.graph.impl.UndirectedSparseGraph |
getGraph()
This method returns the graph on which search is performed |
int |
getNetworkSize()
This method returns the network size |
int |
getSearchCost()
This method returns the search cost (no. of messages for the search) |
double |
getThreshold()
This method returns the threshold used to perform BFS |
boolean |
searchNetwork(int fromId,
int toId)
Perform BFS on the network |
boolean |
searchNetwork(int fromId,
int toId,
double threshold)
Perform BFS on the network |
void |
setGraph(edu.uci.ics.jung.graph.impl.UndirectedSparseGraph graph)
This method sets the graph on which search is to be performed |
void |
setThreshold(double threshold)
This method sets the threhold with which BFS will be performed |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BreadthFirstSearch()
public BreadthFirstSearch(edu.uci.ics.jung.graph.Graph graph)
public BreadthFirstSearch(edu.uci.ics.jung.graph.Graph graph,
double threshold)
| Method Detail |
public boolean searchNetwork(int fromId,
int toId,
double threshold)
fromId - - source node from where search beginstoId - - target node to be foundthreshold - - threshold to perform the BFS
public boolean searchNetwork(int fromId,
int toId)
fromId - - source node from where search beginstoId - - target node to be found
public edu.uci.ics.jung.graph.impl.UndirectedSparseGraph getGraph()
public int getNetworkSize()
public int getSearchCost()
public double getThreshold()
public void setGraph(edu.uci.ics.jung.graph.impl.UndirectedSparseGraph graph)
graph - public void setThreshold(double threshold)
threshold - public java.lang.String getFailReason()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||