sbrt.kernel.math
Class IntervalComparer

java.lang.Object
  extended by sbrt.kernel.math.IntervalComparer

public class IntervalComparer
extends java.lang.Object

This class is used to compare vectors of intervals.

Author:
This class was written and documented by Jeremiah Wright while in the Wagner lab.

Nested Class Summary
static class IntervalComparer.Diff<V>
          Instances of this class are used to hold a variable and a pair of corresponding intervals.
 
Constructor Summary
IntervalComparer()
           
 
Method Summary
<V> java.util.Set<IntervalComparer.Diff<V>>
getDiffs(java.util.Map<? extends V,Interval> m1, java.util.Map<? extends V,Interval> m2, double tolerance)
          Returns the set of differences between the provided interval vectors.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntervalComparer

public IntervalComparer()
Method Detail

getDiffs

public <V> java.util.Set<IntervalComparer.Diff<V>> getDiffs(java.util.Map<? extends V,Interval> m1,
                                                            java.util.Map<? extends V,Interval> m2,
                                                            double tolerance)
Returns the set of differences between the provided interval vectors. Intervals are compared for equivalence for each variable that occurs in both provided vectors.

Type Parameters:
V - the variable type.
Parameters:
m1 - variables mapped to intervals.
m2 - variables mapped to intervals.
tolerance - the amount by which a bound of two intervals can differ but still be considered equivalent.
Returns:
the set of differences between the provided interval vectors.
See Also:
IntervalEquiv.areEquiv(Interval, Interval)