// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
// //
-// Written by Francois Fleuret, (C) IDIAP //
+// Written by Francois Fleuret //
+// (C) Idiap Research Institute //
+// //
// Contact <francois.fleuret@idiap.ch> for comments & bug reports //
///////////////////////////////////////////////////////////////////////////
+/*
+
+ An interval class.
+
+ */
+
#ifndef INTERVAL_H
#define INTERVAL_H
return x >= min && x < max;
}
- inline void include(scalar_t x) {
- if(x < min) min = x;
- if(x > max) max = x;
- }
-
inline scalar_t middle() {
return (min + max) / 2;
}
-
- inline scalar_t length() {
- return max - min;
- }
};
ostream &operator << (ostream &out, const Interval &i);