SemiOpenInterval< N, T > Class Template Reference

An axes-oriented semi-open interval in N dimensions. More...

#include <SemiOpenInterval.h>

Inheritance diagram for SemiOpenInterval< N, T >:
Interval< N, T >

List of all members.

Public Types

typedef T Number
 The number type.
typedef Base::Point Point
 The point type.

Public Member Functions

Constructors etc.

 SemiOpenInterval ()
 Default constructor.
 SemiOpenInterval (const Point &min, const Point &max)
 Construct an interval from the min and max points.
 SemiOpenInterval (const Number xmin, const Number xmax)
 Construct a 1-D interval from the min and max coordinates.
 SemiOpenInterval (const Number xmin, const Number ymin, const Number xmax, const Number ymax)
 Construct an 2-D interval from the min and max coordinates.
 SemiOpenInterval (const Number xmin, const Number ymin, const Number zmin, const Number xmax, const Number ymax, const Number zmax)
 Construct a 3-D interval from the min and max coordinates.
 SemiOpenInterval (const Number *coordinates)
 Construct an interval from an array of the min and max coordinates.
 SemiOpenInterval (const SemiOpenInterval &other)
 Copy Constructor.
 SemiOpenInterval (const Interval< N, T > &x)
 Constructor from an interval.
SemiOpenIntervaloperator= (const SemiOpenInterval &other)
 Assignment operator.
 ~SemiOpenInterval ()
 Trivial destructor. No need for virtual.
Mathematical functions.

bool isEmpty () const
 Return true if the SemiOpenInterval is empty.
template<typename PointType >
bool isIn (const PointType &p) const
 Return true if the point is in this interval.

Related Functions

(Note that these are not member functions.)



template<int N, typename T >
void printFormatted (std::ostream &out, const SemiOpenInterval< N, T > &x)
 Print in a nice format.
template<int N, typename T >
bool doOverlap (const SemiOpenInterval< N, T > &a, const SemiOpenInterval< N, T > &b)
 Return true if semi-open intervals overlap.

Detailed Description

template<int N, typename T = double>
class SemiOpenInterval< N, T >

An axes-oriented semi-open interval in N dimensions.

Parameters:
N is the dimension.
T is the number type. By default it is double.

Constructor & Destructor Documentation

template<int N, typename T = double>
SemiOpenInterval< N, T >::SemiOpenInterval ( const Number coordinates  )  [inline]

Construct an interval from an array of the min and max coordinates.

The coordinates should be in the same order as for the above constructors.


Friends And Related Function Documentation

template<int N, typename T >
bool doOverlap ( const SemiOpenInterval< N, T > &  a,
const SemiOpenInterval< N, T > &  b 
) [related]

Return true if semi-open intervals overlap.

template<int N, typename T >
void printFormatted ( std::ostream &  out,
const SemiOpenInterval< N, T > &  x 
) [related]

Print in a nice format.


The documentation for this class was generated from the following file:
Generated on Thu Jun 30 02:14:58 2016 for Computational Geometry Package by  doxygen 1.6.3