cmsc433.p4
Interface Explorer<N extends Node<N,V>,V>

All Known Implementing Classes:
ForkJoinExplorer, SequentialExplorer

public interface Explorer<N extends Node<N,V>,V>

interface for object that can explore a graph; do not change this file


Method Summary
 GraphExploration<N,V> explore(N start)
          Explore the graph from the designated start node.
 void setParallelism(int parallelism)
          Set the number of threads the explorer should use when exploring graphs.
 

Method Detail

explore

GraphExploration<N,V> explore(N start)
                                                throws InterruptedException
Explore the graph from the designated start node. It may return before all computations have completed, but it all computations should have been initiated (e.g., don't postpone performing any computations under a request is made for the value associated with a node). The exploration should call neighbors() and compute() exactly once for each reached node. If interrupted, it should try to cancel the computation and return quickly.

Throws:
InterruptedException

setParallelism

void setParallelism(int parallelism)
Set the number of threads the explorer should use when exploring graphs. Only used by parallel explorers