32 #ifndef HURRICANE_INTERVAL_H
33 #define HURRICANE_INTERVAL_H
35 #include "hurricane/DbU.h"
71 inline bool isFull ()
const;
76 bool inferior (
const Interval& ,
bool strict=
true )
const;
77 bool superior (
const Interval& ,
bool strict=
true )
const;
78 bool isConstrainedBy (
const Interval& )
const;
91 inline string _getTypeName ()
const;
92 string _getString ()
const;
93 Record* _getRecord ()
const;
107 inline bool Interval::isFull ()
const {
return (_vMin == DbU::Min) and (_vMax == DbU::Max); };
109 inline string Interval::_getTypeName ()
const {
return _TName(
"Interval"); };
114 if (isFull ())
return DbU::Max;
115 return _vMax - _vMin;
119 inline bool Interval::CompareByMin::operator() (
const Interval& lhs,
const Interval& rhs )
const
123 inline bool Interval::CompareByMin::operator() (
const Interval* lhs,
const Interval* rhs )
const
124 {
return lhs->getVMin() < rhs->getVMin(); }
130 inline void jsonWrite ( JsonWriter* w,
const std::string& key,
const Hurricane::Interval* interval )
134 w->write( &interval->
getVMin() );
135 w->write( &interval->
getVMax() );
std::int64_t Unit
Definition: DbU.h:67
Interval description (API)
Definition: Interval.h:44
Interval(bool makeEmpty=true)
Interval & intersection(const DbU::Unit &vMin, const DbU::Unit &vMax)
Interval & inflate(const DbU::Unit &dv)
bool operator==(const Interval &) const
Interval(const Interval &)
bool operator!=(const Interval &) const
const DbU::Unit & getVMax() const
Definition: Interval.h:101
Interval & operator=(const Interval &)
Interval(const DbU::Unit &v1, const DbU::Unit &v2)
bool isEmpty() const
Definition: Interval.h:106
DbU::Unit getSize() const
Definition: Interval.h:111
DbU::Unit getCenter() const
Definition: Interval.h:104
const DbU::Unit & getVMin() const
Definition: Interval.h:100
Interval getIntersection(const Interval &) const
bool contains(const DbU::Unit &) const
Interval & merge(const Interval &)
Interval & merge(const DbU::Unit &)
DbU::Unit getHalfSize() const
Definition: Interval.h:105
Interval & inflate(const DbU::Unit &dvMin, const DbU::Unit &dvMax)
Interval getUnion(const Interval &) const
Interval(const DbU::Unit &)
Interval & translate(const DbU::Unit &)
bool isPonctual() const
Definition: Interval.h:108
Interval & intersection(const Interval &)
bool intersect(const Interval &, bool strict=false) const
bool contains(const Interval &) const
The namespace dedicated to Hurricane.
Definition: Generalities.dox:5