vclip
Class ClosestFeaturesHT

java.lang.Object
  extended byvclip.ClosestFeaturesHT

public class ClosestFeaturesHT
extends java.lang.Object

Implements a hash table for use by vclip to store the most recent closest features between pairs of PolyTrees. Use of this information generally improves the performance of subsequent calls to vclip, provided that the spatial relationship between PolyTrees is not changing too rapidly.

Author:
Brian Mirtich (C++ version), Eddy Boxerman, John E. Lloyd (Java port)
See Also:
Copyright information

Field Summary
static int DEFAULT_SIZE
          Default size of the hash table.
 
Constructor Summary
ClosestFeaturesHT()
          Creates a ClosestFeaturesHT with a default size.
ClosestFeaturesHT(int size)
          Creates a ClosestFeaturesHT with a user-supplied size.
 
Method Summary
 FeaturePair get(PolyTree ptree1, PolyTree ptree2)
           
 void put(PolyTree ptree1, PolyTree ptree2, FeaturePair feats)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SIZE

public static final int DEFAULT_SIZE
Default size of the hash table.

See Also:
Constant Field Values
Constructor Detail

ClosestFeaturesHT

public ClosestFeaturesHT()
Creates a ClosestFeaturesHT with a default size. An application will generally create just one of these objects and use it in all subsequent calls to vclip.

See Also:
DEFAULT_SIZE

ClosestFeaturesHT

public ClosestFeaturesHT(int size)
Creates a ClosestFeaturesHT with a user-supplied size.

Parameters:
size - size of the hash table
Method Detail

get

public FeaturePair get(PolyTree ptree1,
                       PolyTree ptree2)

put

public void put(PolyTree ptree1,
                PolyTree ptree2,
                FeaturePair feats)