graph
Interface Weighter


public interface Weighter

A class used to find the weight of objects, such as graph edges.

Remember that a comparator is passed to methods that need to regard certain objects as comparable. Similarly, a weighter is passed to methods that need to regard certain objects as weighted.

For example, an implementation might use any of the following methods to find the weight of a graph edge e:


Method Summary
 double weight(java.lang.Object o)
          Find the weight of this object in an appropriate way.
 

Method Detail

weight

public double weight(java.lang.Object o)
Find the weight of this object in an appropriate way.

Throws:
java.lang.ClassCastException - - if we don't know how.