gov.sandia.cognition.statistics.method
Interface Binner<ValueType,BinnedType>

Type Parameters:
ValueType - Value type to be binned.
BinnedType - Type that values are binned as.
All Known Implementing Classes:
TreeSetBinner

@CodeReview(reviewer="Justin Basilico",
            date="2009-05-29",
            changesNeeded=false,
            comments="Changed the interface slightly. Cleaned up the javadoc.")
public interface Binner<ValueType,BinnedType>

Defines the functionality for a class that assigns values to some sort of bin.

Since:
2.0
Author:
Zachary Benz

Method Summary
 BinnedType findBin(ValueType value)
          Finds the bin for the provided value, or null if a corresponding bin for the value does not exist.
 int getBinCount()
          Gets the total number of bins.
 Set<BinnedType> getBinSet()
          Gets the set of bins that the binner is using.
 

Method Detail

findBin

BinnedType findBin(ValueType value)
Finds the bin for the provided value, or null if a corresponding bin for the value does not exist.

Parameters:
value - The value to get the bin for.
Returns:
The bin for the provided value, or null if a corresponding bin for the value does not exist

getBinCount

int getBinCount()
Gets the total number of bins.

Returns:
The total number of bins.

getBinSet

Set<BinnedType> getBinSet()
Gets the set of bins that the binner is using.

Returns:
The set of bins.