|
||||
File indexing completed on 2025-01-18 09:28:09
0001 // -*- C++ -*- 0002 // AID-GENERATED 0003 // ========================================================================= 0004 // This class was generated by AID - Abstract Interface Definition 0005 // DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it. 0006 // ========================================================================= 0007 #ifndef AIDA_IRANGESET_H 0008 #define AIDA_IRANGESET_H 1 0009 0010 // This file is part of the AIDA library 0011 // Copyright (C) 2002 by the AIDA team. All rights reserved. 0012 // This library is free software and under the terms of the 0013 // GNU Library General Public License described in the LGPL.txt 0014 0015 #include <vector> 0016 0017 namespace AIDA { 0018 0019 /** 0020 * User level interface to RangeSet. 0021 * 0022 * 0023 * Proposed rules for ranges: 0024 * 0025 * - By default (no arguments) RangeSet object is created with 0026 * one valid range: (-infinity, +infinity). 0027 * 0028 * - size=0 means no valid ranges (isInRange(double point) will 0029 * return false for any point). It also can be used to check if 0030 * any range is set - RangeSet include valid interval only 0031 * if size!=0. 0032 * 0033 * - RangeSet can be smart, e.g merge overlapping valid ranges. 0034 * So size() does not always equal to the number of times 0035 * user call include method. 0036 * 0037 * 0038 * @author The AIDA team (http://aida.freehep.org/) 0039 * 0040 */ 0041 0042 class IRangeSet { 0043 0044 public: 0045 /// Destructor. 0046 virtual ~IRangeSet() { /* nop */; } 0047 0048 /** 0049 * Return array of lower Bounds for the current set of ranges 0050 * @return Array of lower bounds for all valid ranges 0051 */ 0052 virtual const std::vector<double> & lowerBounds() = 0; 0053 0054 /** 0055 * Return array of upper Bounds for the current set of ranges 0056 * @return Array of upper bounds for all valid ranges 0057 */ 0058 virtual const std::vector<double> & upperBounds() = 0; 0059 0060 /** 0061 * Add [xMin, xMax] interval to existing set of valid ranges 0062 * @param xMin - lower bound of a new valid range 0063 * @param xMax - upper bound of a new valid range 0064 */ 0065 virtual void include(double xMin, double xMax) = 0; 0066 0067 /** 0068 * Exclude [xMin, xMax] interval from the existing set of valid ranges 0069 * @param xMin - lower bound of range to be excluded 0070 * @param xMax - upper bound of range to be excluded 0071 */ 0072 virtual void exclude(double xMin, double xMax) = 0; 0073 0074 /** 0075 * Set full range (from MINUS_INF to PLUS_INF ). 0076 */ 0077 virtual void includeAll() = 0; 0078 0079 /** 0080 * Set empty range. 0081 */ 0082 virtual void excludeAll() = 0; 0083 0084 /* 0085 * @return Return true if the point is in range 0086 */ 0087 virtual bool isInRange(double point) = 0; 0088 0089 /** 0090 * Return current number of disjoint ranges (non-overlapping intervals). 0091 * Note: it is not always equal to the number of times user set the range 0092 * @return Number of disjoint ranges 0093 */ 0094 virtual int size() = 0; 0095 0096 /* 0097 * Define +infinity according to specific implementation 0098 * @return Numeric definition for +infinity 0099 */ 0100 virtual double PLUS_INF() = 0; 0101 0102 /* 0103 * Define -infinity according to specific implementation 0104 * @return Numeric definition for -infinity 0105 */ 0106 virtual double MINUS_INF() = 0; 0107 }; // class 0108 } // namespace AIDA 0109 #endif /* ifndef AIDA_IRANGESET_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |