Rectangle Class Reference

Inheritance diagram for Rectangle:

NdSubspace List of all members.

Detailed Description

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 ()
Rectangleoperator= (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.
RnPointminBound ()
RnPointmaxBound ()
const RnPointminBound () const
const RnPointmaxBound () 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)


Constructor & Destructor Documentation

Rectangle ( const int  dimension  )  [inline, explicit]

Allocate a hyperrectangle of the given dimension.

Parameters:
[in] dimension The hyperrectangle dimension.

Definition at line 53 of file Rectangle.H.

Rectangle ( const RnPoint  min_bound,
const RnPoint  max_bound 
) [inline]

Allocate a hyperrectangle with the given min and max bounds.

Parameters:
[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().

Rectangle ( const Rectangle rectangle  )  [inline]

Allocate a copy of a rectangle.

Parameters:
[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.


Member Function Documentation

Rectangle& operator= ( const Rectangle rectangle  )  [inline]

Copy an instance. The instances must have the same dimension.

Parameters:
[in] rectangle The instance to copy.
Returns:
the newly-assigned instance.

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.

Parameters:
[in] rectangle The hyperrectangle to compare against.
Returns:
true if the hyperrectangles are the same, false otherwise.

Definition at line 95 of file Rectangle.H.

References m_max_bound, m_min_bound, maxBound(), and minBound().

RnPoint& minBound (  )  [inline]

Returns:
the minimum bounds.

Definition at line 104 of file Rectangle.H.

References m_min_bound.

Referenced by operator=(), operator==(), and volume().

RnPoint& maxBound (  )  [inline]

Returns:
the maximum bounds.

Definition at line 106 of file Rectangle.H.

References m_max_bound.

Referenced by operator=(), operator==(), and volume().

const RnPoint& minBound (  )  const [inline]

Returns:
the minimum bounds.

Definition at line 109 of file Rectangle.H.

References m_min_bound.

const RnPoint& maxBound (  )  const [inline]

Returns:
the maximum bounds.

Definition at line 111 of file Rectangle.H.

References m_max_bound.

double volume (  )  const [inline]

Returns:
the generalized volume of space contained in the rectangle.

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.

Returns:
true if all intervals are valid, false otherwise.

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.

Parameters:
[in] point The query point.
Returns:
true if the point lies in the interior, false otherwise.

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.

Parameters:
[in] point The query point.
Returns:
true if the point lies on the boundary, false otherwise.

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.

Parameters:
[in] point The query point.
Returns:
true if the point lies in the closure, false otherwise.

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.

Parameters:
[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.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const Rectangle rectangle 
) [friend]

Write a hyperrectangle out on an ostream.

Parameters:
[in] out The output stream.
[in] rectangle The hyperrectangle.
Returns:
the modified output stream.

Definition at line 46 of file Rectangle.H.


Member Data Documentation

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().


The documentation for this class was generated from the following file:
Generated on Thu Feb 1 15:31:55 2007 for WURDE by  doxygen 1.5.1