AIDA API
Version 3.3

hep.aida
Interface IRangeSet


public interface IRangeSet

User level interface to RangeSet. Proposed rules for ranges: - By default (no arguments) RangeSet object is created with one valid range: (-infinity, +infinity). - size=0 means no valid ranges (isInRange(double point) will return false for any point). It also can be used to check if any range is set - RangeSet include valid interval only if size!=0. - RangeSet can be smart, e.g merge overlapping valid ranges. So size() does not always equal to the number of times user call include method.

Author:
The AIDA team (http://aida.freehep.org/)

Method Summary
 void exclude(double xMin, double xMax)
          Exclude [xMin, xMax] interval from the existing set of valid ranges
 void excludeAll()
          Set empty range.
 void include(double xMin, double xMax)
          Add [xMin, xMax] interval to existing set of valid ranges
 void includeAll()
          Set full range (from MINUS_INF to PLUS_INF ).
 boolean isInRange(double point)
           
 double[] lowerBounds()
          Return array of lower Bounds for the current set of ranges
 double MINUS_INF()
           
 double MINUS_INFINITY()
           
 double PLUS_INF()
           
 double PLUS_INFINITY()
           
 int size()
          Return current number of disjoint ranges (non-overlapping intervals).
 double[] upperBounds()
          Return array of upper Bounds for the current set of ranges
 

Method Detail

lowerBounds

public double[] lowerBounds()
Return array of lower Bounds for the current set of ranges

Returns:
Array of lower bounds for all valid ranges

upperBounds

public double[] upperBounds()
Return array of upper Bounds for the current set of ranges

Returns:
Array of upper bounds for all valid ranges

include

public void include(double xMin,
                    double xMax)
Add [xMin, xMax] interval to existing set of valid ranges

Parameters:
xMin - - lower bound of a new valid range
xMax - - upper bound of a new valid range

exclude

public void exclude(double xMin,
                    double xMax)
Exclude [xMin, xMax] interval from the existing set of valid ranges

Parameters:
xMin - - lower bound of range to be excluded
xMax - - upper bound of range to be excluded

includeAll

public void includeAll()
Set full range (from MINUS_INF to PLUS_INF ).


excludeAll

public void excludeAll()
Set empty range.


isInRange

public boolean isInRange(double point)

size

public int size()
Return current number of disjoint ranges (non-overlapping intervals). Note: it is not always equal to the number of times user set the range

Returns:
Number of disjoint ranges

PLUS_INF

public double PLUS_INF()

PLUS_INFINITY

public double PLUS_INFINITY()

MINUS_INF

public double MINUS_INF()

MINUS_INFINITY

public double MINUS_INFINITY()

AIDA API
Version 3.3

Copyright © 2000-2004 AIDA Team, All Rights Reserved.