@@ -0,0 +1,1635 @@
+%0Apackage galileo.graph;%0A%0Aimport galileo.dataset.feature.Feature;%0A%0Aimport java.util.NavigableSet;%0Aimport java.util.TreeSet;%0A%0A/**%0A * Represents the buckets described by %22Tick Marks%22 in the system.  For example,%0A * a TickHash with values 0, 10, 20, and 30 would output %2230%22 for an input of%0A * 33, %220%22 for an input of 5, etc.  It allows incoming samples to be placed into%0A * coarser-grained buckets.  Additionally, the first and last ticks stretch off%0A * to infinity; Feature-specific constraints on the tick marks should be managed%0A * by classes using TickHash.%0A *%0A * @author malensek%0A */%0Apublic class TickHash %7B%0A%0A    private NavigableSet%3CFeature%3E tickSet = new TreeSet%3C%3E();%0A    private Feature low;%0A    private Feature high;%0A%0A    public TickHash(Feature... features) %7B%0A        for (Feature f : features) %7B%0A            addTick(f);%0A        %7D%0A    %7D%0A%0A    public void addTick(Feature feature) %7B%0A        if (low == null %7C%7C feature.less(low)) %7B%0A            low = feature;%0A        %7D%0A%0A        if (high == null %7C%7C feature.greater(high)) %7B%0A            high = feature;%0A        %7D%0A%0A        tickSet.add(feature);%0A    %7D%0A%0A    public NavigableSet%3CFeature%3E getTicks() %7B%0A        return tickSet;%0A    %7D%0A%0A    public Feature getBucket(Feature feature) %7B%0A        if (feature.greater(high)) %7B%0A            return high;%0A        %7D%0A%0A        if (feature.less(low)) %7B%0A            return low;%0A        %7D%0A%0A        return tickSet.floor(feature);%0A    %7D%0A%0A    @Override%0A    public String toString() %7B%0A        String str = %22%22;%0A        for (Feature f : tickSet) %7B%0A            str += f.dataToString() + %22 - %22;%0A        %7D%0A        return str.substring(0, str.length() - 3);%0A    %7D%0A%7D%0A

Add managing class for tick mark generation