Interval description (API) More...
Interval description (API)
Those objects represent intervals. They are defined by the values VMin and VMax which are representatives only when the interval is not empty. An interval is considered empty whenever it is not initialized or when it doesn't represent a real interval like the intersection of two disjoint intervals.
All the function described in the chapter above return a reference on the modified interval, providing so the capability to apply to it a new modification.
Hurricane::Interval::Interval | ( | bool | makeEmpty = true | ) |
Default constructor : the returned interval is empty if makeEmpy is set to true (default) or full span otherwise.
Hurricane::Interval::Interval | ( | const DbU::Unit & | v | ) |
Builds an interval of null size centered on the value defined by <v>
.
Builds the minimal interval enclosing the two values defined by <v1>
and <v2>
.
Hurricane::Interval::Interval | ( | const Interval & | interval | ) |
Copy constructor.
bool Hurricane::Interval::operator== | ( | const Interval & | interval | ) | const |
Equality operator.
bool Hurricane::Interval::operator!= | ( | const Interval & | interval | ) | const |
Difference operator.
|
inline |
Returns: the VMin value : meaningful only for a non empty interval.
|
inline |
Returns: the VMax value : meaningful only for a non empty interval.
|
inline |
Returns: the interval center value : meaningful only for a non empty interval.
|
inline |
Returns: the interval size : meaningful only for a non empty interval.
References isEmpty().
Referenced by getHalfSize().
|
inline |
Returns: the half interval width : meaningful only for a non empty interval.
References getSize().
Returns: the smallest enclosing interval containing the intervals <this>
and <interval>
. The returned interval may be empty if both are.
Returns: interval representing the overlapping region. This interval is empty if either one of the two intervals is empty or if they are disjoint.
|
inline |
Returns: true if the interval is empty, else false.
Referenced by getSize().
|
inline |
Returns: true if the interval is reduced to a value, else false.
bool Hurricane::Interval::contains | ( | const DbU::Unit & | v | ) | const |
Returns: true if the interval is non empty and contains the value defined by <v>
else false.
bool Hurricane::Interval::contains | ( | const Interval & | interval | ) | const |
Returns: true if the two intervals are non empty and if the interval <this>
contains the interval <interval>
, else false.
bool Hurricane::Interval::intersect | ( | const Interval & | , |
bool | strict = false |
||
) | const |
Returns: true if the two intervals are non empty and if they overlap, else false.
Interval & Hurricane::Interval::makeEmpty | ( | ) |
Transforms the interval into an empty one.
Expands (or contracts) the interval, if not empty, in each direction of the quantity <dv>
. This quantity might be negative enough to transform it into an empty interval.
Expands (or contracts) the interval, if not empty, on the left of the quantity <dvMin>
and on the right of the quantity <dvMax>
. Those quantities might be negative enough to transform it into an empty interval.
Expands the interval in order that it encloses the value defined <v>
. If the interval was initially empty it becomes reduced to the enclosed value.
Expands the interval in order that it encloses, if not empty, the interval <interval>
. If the interval <this>
was initially empty it becomes reduced to the enclosed interval.
The interval becomes the intersection of itself and [vMin,vMax].
The interval becomes the intersection of itself and interval.
translates the interval, if not empty, of the quantity <dv>
.
Exemple :
Generated by doxygen 1.9.1 on Thu Aug 11 2022 | Return to top of page |
Hurricane VLSI Database | Copyright © 2000-2020 Bull S.A. All rights reserved |