FreeHEP API
Version current

hep.aida.ref.function
Class RangeSet

java.lang.Object
  extended byhep.aida.ref.function.RangeSet
All Implemented Interfaces:
hep.aida.IRangeSet

public class RangeSet
extends Object
implements hep.aida.IRangeSet

This class handles multiple ranges along one axis. Overlapping ranges are merged in one bigger range.

Author:
Tony Johnson, Victor Serbo, Max Turri
Source Code:
RangeSet.java

Constructor Summary
RangeSet()
          Creates RangeSet with (-infinity, +infinity) valid interval, borders excluded
RangeSet(double[] xMin, double[] xMax)
           
RangeSet(double xMin, double xMax)
           
RangeSet(String range)
          Create a RangeSet from a String.
 
Method Summary
 void exclude(double xMin, double xMax)
           
 void excludeAll()
          Set empty range in all axes.
 double generatePoint()
           
 void include(double xMin, double xMax)
          Additive include/exclude of the range in given axis.
 void includeAll()
          Set full range in all axes.
 boolean isInRange(double point)
           
 double length()
           
 double[] lowerBounds()
          Return array of lower or upper Bounds for the current set of ranges
static void main(String[] args)
           
 double MINUS_INF()
           
 double PLUS_INF()
           
 int size()
          Returns current number of disjoint ranges (non-overlapping intervals)
 double[] upperBounds()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RangeSet

public RangeSet()
Creates RangeSet with (-infinity, +infinity) valid interval, borders excluded


RangeSet

public RangeSet(double xMin,
                double xMax)

RangeSet

public RangeSet(double[] xMin,
                double[] xMax)

RangeSet

public RangeSet(String range)
Create a RangeSet from a String. Ranges can be specified as: (,-9),(-1.,0.),(2.,3.),(5,)

Method Detail

PLUS_INF

public double PLUS_INF()
Specified by:
PLUS_INF in interface hep.aida.IRangeSet

MINUS_INF

public double MINUS_INF()
Specified by:
MINUS_INF in interface hep.aida.IRangeSet

size

public int size()
Returns current number of disjoint ranges (non-overlapping intervals)

Specified by:
size in interface hep.aida.IRangeSet

length

public double length()

generatePoint

public double generatePoint()

lowerBounds

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

Specified by:
lowerBounds in interface hep.aida.IRangeSet

upperBounds

public double[] upperBounds()
Specified by:
upperBounds in interface hep.aida.IRangeSet

include

public void include(double xMin,
                    double xMax)
Additive include/exclude of the range in given axis.

Specified by:
include in interface hep.aida.IRangeSet

exclude

public void exclude(double xMin,
                    double xMax)
Specified by:
exclude in interface hep.aida.IRangeSet

includeAll

public void includeAll()
Set full range in all axes.

Specified by:
includeAll in interface hep.aida.IRangeSet

excludeAll

public void excludeAll()
Set empty range in all axes.

Specified by:
excludeAll in interface hep.aida.IRangeSet

isInRange

public boolean isInRange(double point)
Specified by:
isInRange in interface hep.aida.IRangeSet

main

public static void main(String[] args)

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.