//#  eulerN -- program for statistical estimation of Euler characteristic of a 3-dimensional body
//#  given as a sufficiently dense "volumetric" point sampling
//#
//#  Copyright (c) 2005-2007 Bradford Jones, Konstantin Rybnikov, Karen Daniels, Daniel Klain
//#  Release 2: 1 June 2007 
//#
//#  This program is free software; you can redistribute it and/or modify it
//#  under the terms of the GNU General Public License as published by the
//#  Free Software Foundation; either version 2, or (at your option) any
//#  later version: http://www.gnu.org/licenses/gpl.txt.
//#
//#  This program is distributed in the hope that it will be useful,
//#  but WITHOUT ANY WARRANTY; without even the implied warranty of
//#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//#  GNU General Public License for more details.
//#-----------------------------------------------------------------------------

#ifndef INTERVAL
#define INTERVAL
	#include <iostream>
	using namespace std;
class Interval
{
	private:
		double upperBound;
		double lowerBound;
		friend ostream& operator << (ostream &os, const Interval &i);
	public:
		/*--------------------------------------*/
		/// Constructors / destructor
		/*--------------------------------------*/
		Interval();
		Interval(double lower, double upper);
		Interval(const Interval &i);
		/*--------------------------------------*/
		/// Class Functions
		/*--------------------------------------*/
		void setUpper(double u);
		void setLower(double l);
		double getUpper();
		double getLower();
		double getLength();
		bool overlap (Interval &rhs);
		Interval intersection( Interval &rhs);
		/*--------------------------------------*/
		/// Overloaded Operators
		/*--------------------------------------*/
		Interval& operator = (const Interval &rhs);
};
#endif

