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

Type Parameters:
N - The actual type of any subclass that implements Node
V - The value returned by the compute() function.

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

Represents a node in a graph. Do not change this interface.


Method Summary
 V compute()
          Returns the value of some computation.
 Collection<N> neighbors()
          Returns the neighbors of this.
 

Method Detail

compute

V compute()
Returns the value of some computation. This method might take a while to run.


neighbors

Collection<N> neighbors()
Returns the neighbors of this. This method might take a while to run. The returned collection should not be modified.