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

java.lang.Object
  extended by sbrt.kernel.utilities.proc.VectorComparison<V>
Type Parameters:
V - the variable type.
All Implemented Interfaces:
KernelProcess<java.util.Map<V,java.lang.Double>>, MonitoredProcess<java.util.Map<V,java.lang.Double>>

public class VectorComparison<V>
extends java.lang.Object
implements MonitoredProcess<java.util.Map<V,java.lang.Double>>

This class is used to compare numerical vectors.

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

Constructor Summary
VectorComparison()
          Constructs a new numerical 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.Map<V,java.lang.Double>> resultsManager)
          Adds to the provided results manager the variables (keys) whose intervals (values) are unequal within the provided tolerance.
 void setTolerance(double tolerance)
          Sets the equivalence tolerance.
 void setVectorSource(java.lang.Iterable<java.util.Map<V,java.lang.Double>> source)
          Sets of the source of numerical vectors.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VectorComparison

public VectorComparison()
Constructs a new numerical vector comparison process.

Method Detail

setTolerance

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

Parameters:
tolerance - the amount by which two numerical values can differ but still be considered equivalent.

getTolerance

public double getTolerance()
Returns the equivalence tolerance.

Returns:
the equivalence tolerance.

setVectorSource

public void setVectorSource(java.lang.Iterable<java.util.Map<V,java.lang.Double>> source)
Sets of the source of numerical vectors.

Parameters:
source - a numerical vector source.

getProgress

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

Specified by:
getProgress in interface MonitoredProcess<java.util.Map<V,java.lang.Double>>
Returns:
a progress monitor for this process.

run

public void run(ResultsManager<java.util.Map<V,java.lang.Double>> resultsManager)
Adds to the provided results manager the variables (keys) whose intervals (values) are unequal within the provided tolerance.

Specified by:
run in interface KernelProcess<java.util.Map<V,java.lang.Double>>
Parameters:
resultsManager - the results manager to sets of variables are added.