5 #ifndef _MGInterval_HH_
6 #define _MGInterval_HH_
37 MG_DLL_DECLR
friend bool operator>(
double,
const MGInterval& i);
38 MG_DLL_DECLR
friend bool operator<(
double,
const MGInterval& i);
78 const MGEReal& operator() (
int i)
const;
80 const MGEReal& operator[] (
int i)
const;
182 bool operator>> (
const MGInterval& intrval2)
const;
188 bool operator>> (
const MGEReal& t)
const;
220 bool operator< (
const MGEReal& )
const;
221 bool operator> (
const MGEReal&)
const;
222 bool operator<= (
const MGEReal&)
const;
223 bool operator>= (
const MGEReal&)
const;
226 bool operator< (
double t)
const;
229 bool operator> (
double t)
const;
246 void expand(
const MGEReal& val);
254 bool finite_above()
const;
258 bool finite_below()
const;
266 double high_point()
const;
271 bool includes(
double t)
const;
275 bool infinite()
const;
278 bool infinite_above()
const;
281 bool infinite_below()
const;
289 double interpolate(
double t)
const;
307 double low_point()
const;
311 double mid_point()
const;
314 double relative_error()
const;
319 double round_into_interval(
double t)
const;
322 void set_length(
double len);
325 void set_null(
double t=0.);
332 void set_high_point(
const MGEReal&);
339 void set_low_point(
const MGEReal&);
348 int dump_size()
const;
MGIfstream is a class to read the serialized data generated by MGOfstream.
Definition: Ifstream.h:30
std::ostream & operator<<(std::ostream &ostrm, const MGisect &is)
Debug Function.
Definition: isect.h:95
void set_empty(double t=0.)
Definition: Interval.h:326
MG_DLL_DECLR MGVector & operator*=(MGVector &v, const MGMatrix &m)
Interval of 1 dimension, i.e. MGInterval is a real line.
Definition: Interval.h:22
MG_DLL_DECLR MGVector operator*(const MGVector &v, const MGMatrix &m)
void set_low(const MGEReal &t)
Definition: Interval.h:340
const MGEReal & low() const
Definition: Interval.h:300
MGEReal is extended real number to define infinity.
Definition: EReal.h:22
MGOfstream is a class to serialize all of the subclasses of MGGel.
Definition: Ofstream.h:31
void set_high(const MGEReal &t)
Definition: Interval.h:333
MGEReal & low()
Definition: Interval.h:301
MGINTERVAL_TYPE
MGInterval type.
Definition: MGCL.h:117
MGEReal & high()
Definition: Interval.h:261
const MGEReal & high() const
Definition: Interval.h:260
bool is_null() const
Test if this is empty interval.
Definition: Interval.h:292