Hurricane VLSI Database


Hurricane::Interval Class Reference

Interval description (API). More...

Public Member Functions

 Interval (bool makeEmpty=true)
 Interval (const DbU::Unit &)
 Interval (const DbU::Unit &v1, const DbU::Unit &v2)
 Interval (const Interval &)
Intervaloperator= (const Interval &)
bool operator== (const Interval &) const
bool operator!= (const Interval &) const
const DbU::UnitgetVMin () const
const DbU::UnitgetVMax () const
DbU::Unit getCenter () const
DbU::Unit getSize () const
DbU::Unit getHalfSize () const
Interval getUnion (const Interval &) const
Interval getIntersection (const Interval &) const
bool isEmpty () const
bool isPonctual () const
bool contains (const DbU::Unit &) const
bool contains (const Interval &) const
bool intersect (const Interval &, bool strict=false) const
IntervalmakeEmpty ()
Intervalinflate (const DbU::Unit &dv)
Intervalinflate (const DbU::Unit &dvMin, const DbU::Unit &dvMax)
Intervalmerge (const DbU::Unit &)
Intervalmerge (const Interval &)
Intervalintersection (const DbU::Unit &vMin, const DbU::Unit &vMax)
Intervalintersection (const Interval &)
Intervaltranslate (const DbU::Unit &)

Detailed Description

Interval description (API).

Introduction

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.

Remark

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.

Constructor & Destructor Documentation

◆ Interval() [1/4]

Hurricane::Interval::Interval ( bool makeEmpty = true)

Default constructor : the returned interval is empty if makeEmpy is set to true (default) or full span otherwise.

References makeEmpty().

Referenced by contains(), getIntersection(), getUnion(), inflate(), inflate(), intersect(), intersection(), intersection(), Interval(), makeEmpty(), merge(), merge(), operator!=(), operator=(), operator==(), and translate().

◆ Interval() [2/4]

Hurricane::Interval::Interval ( const DbU::Unit & v)

Builds an interval of null size centered on the value defined by <v>.

◆ Interval() [3/4]

Hurricane::Interval::Interval ( const DbU::Unit & v1,
const DbU::Unit & v2 )

Builds the minimal interval enclosing the two values defined by <v1> and <v2>.

◆ Interval() [4/4]

Hurricane::Interval::Interval ( const Interval & interval)

Copy constructor.

References Interval().

Member Function Documentation

◆ operator=()

Interval & Hurricane::Interval::operator= ( const Interval & interval)

Assignment operator.

References Interval().

◆ operator==()

bool Hurricane::Interval::operator== ( const Interval & interval) const

Equality operator.

Remarks
Two empty intervals are always different.

References Interval().

◆ operator!=()

bool Hurricane::Interval::operator!= ( const Interval & interval) const

Difference operator.

References Interval().

◆ getVMin()

const DbU::Unit & Hurricane::Interval::getVMin ( ) const
inline

Returns: the VMin value : meaningful only for a non empty interval.

◆ getVMax()

const DbU::Unit & Hurricane::Interval::getVMax ( ) const
inline

Returns: the VMax value : meaningful only for a non empty interval.

◆ getCenter()

DbU::Unit Hurricane::Interval::getCenter ( ) const
inline

Returns: the interval center value : meaningful only for a non empty interval.

◆ getSize()

DbU::Unit Hurricane::Interval::getSize ( ) const
inline

Returns: the interval size : meaningful only for a non empty interval.

References isEmpty().

Referenced by getHalfSize().

◆ getHalfSize()

DbU::Unit Hurricane::Interval::getHalfSize ( ) const
inline

Returns: the half interval width : meaningful only for a non empty interval.

References getSize().

◆ getUnion()

Interval Hurricane::Interval::getUnion ( const Interval & interval) const

Returns: the smallest enclosing interval containing the intervals <this> and <interval>. The returned interval may be empty if both are.

References Interval().

◆ getIntersection()

Interval Hurricane::Interval::getIntersection ( const Interval & interval) const

Returns: interval representing the overlapping region. This interval is empty if either one of the two intervals is empty or if they are disjoint.

References Interval().

◆ isEmpty()

bool Hurricane::Interval::isEmpty ( ) const
inline

Returns: true if the interval is empty, else false.

Referenced by getSize().

◆ isPonctual()

bool Hurricane::Interval::isPonctual ( ) const
inline

Returns: true if the interval is reduced to a value, else false.

◆ contains() [1/2]

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.

◆ contains() [2/2]

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.

References Interval().

◆ intersect()

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.

References Interval().

◆ makeEmpty()

Interval & Hurricane::Interval::makeEmpty ( )

Transforms the interval into an empty one.

References Interval().

Referenced by Interval().

◆ inflate() [1/2]

Interval & Hurricane::Interval::inflate ( const DbU::Unit & dv)

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.

References Interval().

◆ inflate() [2/2]

Interval & Hurricane::Interval::inflate ( const DbU::Unit & dvMin,
const DbU::Unit & dvMax )

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.

References Interval().

◆ merge() [1/2]

Interval & Hurricane::Interval::merge ( const DbU::Unit & v)

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.

References Interval().

◆ merge() [2/2]

Interval & Hurricane::Interval::merge ( const Interval & interval)

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.

References Interval().

◆ intersection() [1/2]

Interval & Hurricane::Interval::intersection ( const DbU::Unit & vMin,
const DbU::Unit & vMax )

The interval becomes the intersection of itself and [vMin,vMax].

References Interval().

◆ intersection() [2/2]

Interval & Hurricane::Interval::intersection ( const Interval & interval)

The interval becomes the intersection of itself and interval.

References Interval().

◆ translate()

Interval & Hurricane::Interval::translate ( const DbU::Unit & dv)

translates the interval, if not empty, of the quantity <dv>.

Exemple :

Interval interval1 = Interval(10, 100);
Interval interval2 = interval1;
assert(interval1.translate(10) == interval2.inflate(-10, 10));
Interval(bool makeEmpty=true)
Interval & inflate(const DbU::Unit &dv)
Interval & translate(const DbU::Unit &)

References Interval().


The documentation for this class was generated from the following files:


Generated by doxygen 1.16.1 on Return to top of page
Hurricane VLSI Database Copyright © 2000-2020 Bull S.A. All rights reserved