Inheritance diagram for Rectangle:
Definition at line 39 of file Rectangle.H.
Public Member Functions | |
Rectangle (const int dimension) | |
Rectangle (const RnPoint min_bound, const RnPoint max_bound) | |
Rectangle (const Rectangle &rectangle) | |
virtual | ~Rectangle () |
Rectangle & | operator= (const Rectangle &rectangle) |
bool | operator== (const Rectangle &rectangle) const |
bool | valid () const |
virtual void | drawGnuplot (std::ostream &out, const int di=0, const int dj=1) const |
Geometry accessors. | |
RnPoint & | minBound () |
RnPoint & | maxBound () |
const RnPoint & | minBound () const |
const RnPoint & | maxBound () const |
double | volume () const |
Topological queries. | |
bool | interior (const RnPoint &point) const |
bool | boundary (const RnPoint &point) const |
bool | closure (const RnPoint &point) const |
Private Attributes | |
RnPoint | m_min_bound |
Lower corner - min bound on intervals. | |
RnPoint | m_max_bound |
Upper corner - max bound on intervals. | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const Rectangle &rectangle) |
Rectangle | ( | const int | dimension | ) | [inline, explicit] |
Allocate a hyperrectangle of the given dimension.
[in] | dimension | The hyperrectangle dimension. |
Definition at line 53 of file Rectangle.H.
Allocate a hyperrectangle with the given min and max bounds.
[in] | min_bound | The minimum value of each interval. |
[in] | max_bound | The maximum value of each interval. |
Definition at line 61 of file Rectangle.H.
References m_max_bound, m_min_bound, and NdSubspace::n().
Allocate a copy of a rectangle.
[in] | rectangle | The instance to copy. |
Definition at line 73 of file Rectangle.H.
virtual ~Rectangle | ( | ) | [inline, virtual] |
Deallocate the instance.
Definition at line 79 of file Rectangle.H.
Copy an instance. The instances must have the same dimension.
[in] | rectangle | The instance to copy. |
Definition at line 84 of file Rectangle.H.
References m_max_bound, m_min_bound, maxBound(), minBound(), NdSubspace::n(), and NdSubspace< double >::operator=().
bool operator== | ( | const Rectangle & | rectangle | ) | const [inline] |
Check if two hyperrectangles are the same.
[in] | rectangle | The hyperrectangle to compare against. |
Definition at line 95 of file Rectangle.H.
References m_max_bound, m_min_bound, maxBound(), and minBound().
RnPoint& minBound | ( | ) | [inline] |
Definition at line 104 of file Rectangle.H.
References m_min_bound.
Referenced by operator=(), operator==(), and volume().
RnPoint& maxBound | ( | ) | [inline] |
Definition at line 106 of file Rectangle.H.
References m_max_bound.
Referenced by operator=(), operator==(), and volume().
const RnPoint& minBound | ( | ) | const [inline] |
const RnPoint& maxBound | ( | ) | const [inline] |
double volume | ( | ) | const [inline] |
Definition at line 114 of file Rectangle.H.
References maxBound(), minBound(), and NdSubspace::n().
bool valid | ( | ) | const [inline] |
Check that each hyperrectangle interval is valid, i.e., of the form (a,b), where a <= b.
Definition at line 123 of file Rectangle.H.
References m_max_bound, m_min_bound, and NdSubspace::n().
bool interior | ( | const RnPoint & | point | ) | const [inline, virtual] |
Check if a point lies in the hyperrectangle interior.
[in] | point | The query point. |
Implements NdSubspace.
Definition at line 134 of file Rectangle.H.
References m_max_bound, m_min_bound, NdSubspace::n(), and NdPoint::n().
bool boundary | ( | const RnPoint & | point | ) | const [inline, virtual] |
Check if a point lies on the hyperrectangle boundary.
[in] | point | The query point. |
Implements NdSubspace.
Definition at line 145 of file Rectangle.H.
References m_max_bound, m_min_bound, NdSubspace::n(), and NdPoint::n().
bool closure | ( | const RnPoint & | point | ) | const [inline, virtual] |
Check if a point lies in the hyperrectangle closure.
[in] | point | The query point. |
Implements NdSubspace.
Definition at line 160 of file Rectangle.H.
References m_max_bound, m_min_bound, NdSubspace::n(), and NdPoint::n().
virtual void drawGnuplot | ( | std::ostream & | out, | |
const int | di = 0 , |
|||
const int | dj = 1 | |||
) | const [inline, virtual] |
Draw the hyperrectangle projected down to two dimensions.
[in] | out | The output stream. |
[in] | di | The first projection dimension. |
[in] | dj | The second projection dimension. |
Implements NdSubspace.
Definition at line 173 of file Rectangle.H.
References m_max_bound, and m_min_bound.
std::ostream& operator<< | ( | std::ostream & | out, | |
const Rectangle & | rectangle | |||
) | [friend] |
Write a hyperrectangle out on an ostream.
[in] | out | The output stream. |
[in] | rectangle | The hyperrectangle. |
Definition at line 46 of file Rectangle.H.
RnPoint m_min_bound [private] |
Lower corner - min bound on intervals.
Definition at line 185 of file Rectangle.H.
Referenced by boundary(), closure(), drawGnuplot(), interior(), minBound(), operator=(), operator==(), Rectangle(), and valid().
RnPoint m_max_bound [private] |
Upper corner - max bound on intervals.
Definition at line 188 of file Rectangle.H.
Referenced by boundary(), closure(), drawGnuplot(), interior(), maxBound(), operator=(), operator==(), Rectangle(), and valid().