sbrt.kernel.utilities.proc
Class IntervalComparison<V>

java.lang.Object
  extended by sbrt.kernel.utilities.proc.IntervalComparison<V>
Type Parameters:
V - the variable type.
All Implemented Interfaces:
KernelProcess<java.util.Set<IntervalComparer.Diff<V>>>, MonitoredProcess<java.util.Set<IntervalComparer.Diff<V>>>

public class IntervalComparison<V>
extends java.lang.Object
implements MonitoredProcess<java.util.Set<IntervalComparer.Diff<V>>>

This class is used to compare vectors of intervals.

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

Constructor Summary
IntervalComparison()
          Constructs a new interval vector comparison process.
 
Method Summary
 ProgressMonitor getProgress()
          Returns a progress monitor for this process.
 double getTolerance()
          Returns the equivalence tolerance.
 void run(ResultsManager<java.util.Set<IntervalComparer.Diff<V>>> resultsManager)
          Adds to the provided results manager the variables (keys) whose intervals (values) are not considered equivalent.
 void setIntervalSources(java.lang.Iterable<java.util.Map<V,Interval>> source1, java.lang.Iterable<java.util.Map<V,Interval>> source2)
          Sets of the sources of interval vectors.
 void setTolerance(double tolerance)
          Sets the equivalence tolerance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntervalComparison

public IntervalComparison()
Constructs a new interval vector comparison process.

Method Detail

setTolerance

public void setTolerance(double tolerance)
Sets the equivalence tolerance.

Parameters:
tolerance - the amount by which a bound of two intervals can differ but still be considered equivalent.

getTolerance

public double getTolerance()
Returns the equivalence tolerance.

Returns:
the equivalence tolerance.

setIntervalSources

public void setIntervalSources(java.lang.Iterable<java.util.Map<V,Interval>> source1,
                               java.lang.Iterable<java.util.Map<V,Interval>> source2)
Sets of the sources of interval vectors.

Parameters:
source1 - an interval vector source.
source2 - an interval vector source.

getProgress

public ProgressMonitor getProgress()
Returns a progress monitor for this process.

Specified by:
getProgress in interface MonitoredProcess<java.util.Set<IntervalComparer.Diff<V>>>
Returns:
a progress monitor for this process.

run

public void run(ResultsManager<java.util.Set<IntervalComparer.Diff<V>>> resultsManager)
Adds to the provided results manager the variables (keys) whose intervals (values) are not considered equivalent.

Specified by:
run in interface KernelProcess<java.util.Set<IntervalComparer.Diff<V>>>
Parameters:
resultsManager - the results manager to sets of variables are added.