DGtal
0.6.devel
|
#include <DigitalSetBySTLVector.h>
Public Types | |
typedef TDomain | Domain |
typedef DigitalSetBySTLVector < Domain > | Self |
typedef Domain::Space | Space |
typedef Domain::Point | Point |
typedef Domain::Size | Size |
typedef std::vector< Point > ::iterator | Iterator |
typedef std::vector< Point > ::const_iterator | ConstIterator |
Public Member Functions | |
~DigitalSetBySTLVector () | |
DigitalSetBySTLVector (const Domain &d) | |
DigitalSetBySTLVector (const DigitalSetBySTLVector &other) | |
DigitalSetBySTLVector & | operator= (const DigitalSetBySTLVector &other) |
const Domain & | domain () const |
Size | size () const |
bool | empty () const |
void | insert (const Point &p) |
template<typename PointInputIterator > | |
void | insert (PointInputIterator first, PointInputIterator last) |
void | insertNew (const Point &p) |
template<typename PointInputIterator > | |
void | insertNew (PointInputIterator first, PointInputIterator last) |
Size | erase (const Point &p) |
void | erase (Iterator it) |
void | erase (Iterator first, Iterator last) |
void | clear () |
ConstIterator | find (const Point &p) const |
Iterator | find (const Point &p) |
ConstIterator | begin () const |
ConstIterator | end () const |
Iterator | begin () |
Iterator | end () |
DigitalSetBySTLVector< Domain > & | operator+= (const DigitalSetBySTLVector< Domain > &aSet) |
template<typename TOutputIterator > | |
void | computeComplement (TOutputIterator &ito) const |
void | assignFromComplement (const DigitalSetBySTLVector< Domain > &other_set) |
void | computeBoundingBox (Point &lower, Point &upper) const |
void | selfDisplay (std::ostream &out) const |
bool | isValid () const |
std::string | className () const |
Protected Member Functions | |
DigitalSetBySTLVector () |
Protected Attributes | |
const Domain & | myDomain |
std::vector< Point > | myVector |
Aim: Realizes the concept CDigitalSet by using the STL container std::vector.
Description of template class 'DigitalSetBySTLVector'
It thus describes a modifiable set of points within the given domain [Domain].
Domain | a realization of the concept CDomain. |
Definition at line 70 of file DigitalSetBySTLVector.h.
typedef std::vector<Point>::const_iterator DGtal::DigitalSetBySTLVector< TDomain >::ConstIterator |
Definition at line 79 of file DigitalSetBySTLVector.h.
typedef TDomain DGtal::DigitalSetBySTLVector< TDomain >::Domain |
Definition at line 73 of file DigitalSetBySTLVector.h.
typedef std::vector<Point>::iterator DGtal::DigitalSetBySTLVector< TDomain >::Iterator |
Definition at line 78 of file DigitalSetBySTLVector.h.
typedef Domain::Point DGtal::DigitalSetBySTLVector< TDomain >::Point |
Definition at line 76 of file DigitalSetBySTLVector.h.
typedef DigitalSetBySTLVector<Domain> DGtal::DigitalSetBySTLVector< TDomain >::Self |
Definition at line 74 of file DigitalSetBySTLVector.h.
typedef Domain::Size DGtal::DigitalSetBySTLVector< TDomain >::Size |
Definition at line 77 of file DigitalSetBySTLVector.h.
typedef Domain::Space DGtal::DigitalSetBySTLVector< TDomain >::Space |
Definition at line 75 of file DigitalSetBySTLVector.h.
|
inline |
|
inline |
Constructor. Creates the empty set in the domain [d].
d | any domain. |
Definition at line 60 of file DigitalSetBySTLVector.ih.
|
inline |
Copy constructor.
other | the object to clone. |
Definition at line 72 of file DigitalSetBySTLVector.ih.
|
protected |
Default Constructor. Forbidden since a Domain is necessary for defining a set.
|
inline |
Builds the complement in the domain of the set [other_set] in this.
other_set | defines the set whose complement is assigned to 'this'. |
Definition at line 419 of file DigitalSetBySTLVector.ih.
References DGtal::DigitalSetBySTLVector< TDomain >::begin(), and DGtal::DigitalSetBySTLVector< TDomain >::end().
|
inline |
Definition at line 323 of file DigitalSetBySTLVector.ih.
Referenced by DGtal::DigitalSetBySTLVector< TDomain >::assignFromComplement(), DGtal::Display2DFactory::draw(), DGtal::Display3DFactory::drawAsGrid(), DGtal::Display3DFactory::drawAsPaving(), and DGtal::Display3DFactory::drawAsPavingTransparent().
|
inline |
Definition at line 346 of file DigitalSetBySTLVector.ih.
|
inline |
Default drawing style object.
Definition at line 503 of file DigitalSetBySTLVector.ih.
Referenced by DGtal::Display3DFactory::draw().
|
inline |
Clears the set.
Definition at line 281 of file DigitalSetBySTLVector.ih.
|
inline |
Computes the bounding box of this set.
lower | the first point of the bounding box (lowest in all directions). |
upper | the last point of the bounding box (highest in all directions). |
Definition at line 446 of file DigitalSetBySTLVector.ih.
|
inline |
Computes the complement in the domain of this set
ito | an output iterator |
TOutputIterator | a model of output iterator |
Definition at line 397 of file DigitalSetBySTLVector.ih.
|
inline |
Definition at line 102 of file DigitalSetBySTLVector.ih.
|
inline |
Definition at line 127 of file DigitalSetBySTLVector.ih.
|
inline |
Definition at line 334 of file DigitalSetBySTLVector.ih.
Referenced by DGtal::DigitalSetBySTLVector< TDomain >::assignFromComplement(), DGtal::Display2DFactory::draw(), DGtal::Display3DFactory::drawAsGrid(), DGtal::Display3DFactory::drawAsPaving(), and DGtal::Display3DFactory::drawAsPavingTransparent().
|
inline |
Definition at line 358 of file DigitalSetBySTLVector.ih.
|
inline |
|
inline |
Removes the point pointed by [it] from the set.
it | an iterator on this set. |
Definition at line 245 of file DigitalSetBySTLVector.ih.
|
inline |
Removes the collection of points specified by the two iterators from this set.
first | the start point in this set. |
last | the last point in this set. |
Definition at line 261 of file DigitalSetBySTLVector.ih.
|
inline |
p | any digital point. |
Definition at line 293 of file DigitalSetBySTLVector.ih.
|
inline |
|
inline |
|
inline |
Adds the collection of points specified by the two iterators to this set.
first | the start point in the collection of Point. |
last | the last point in the collection of Point. |
Definition at line 162 of file DigitalSetBySTLVector.ih.
|
inline |
Adds point [p] to this set if the point is not already in the set. There is no defined behavior if the point is already in the set (for instance, may be present twice).
p | any digital point. |
Definition at line 181 of file DigitalSetBySTLVector.ih.
|
inline |
Adds the collection of points specified by the two iterators to this set. The collection should contain distinct points. Each of these points should also not belong already to the set. set. There is no defined behavior if the preceding requisites are not satisfied (for instance, points may be present several times in the set).
first | the start point in the collection of Point. |
last | the last point in the collection of Point. |
Definition at line 207 of file DigitalSetBySTLVector.ih.
|
inline |
Checks the validity/consistency of the object.
Definition at line 487 of file DigitalSetBySTLVector.ih.
|
inline |
set union to left.
aSet | any other set. |
Definition at line 371 of file DigitalSetBySTLVector.ih.
References DGtal::DigitalSetBySTLVector< TDomain >::myVector.
|
inline |
Assignment.
other | the object to copy. |
Definition at line 86 of file DigitalSetBySTLVector.ih.
References DGtal::DigitalSetBySTLVector< TDomain >::myDomain, and DGtal::DigitalSetBySTLVector< TDomain >::myVector.
|
inline |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
Definition at line 475 of file DigitalSetBySTLVector.ih.
|
inline |
Definition at line 116 of file DigitalSetBySTLVector.ih.
|
protected |
The associated domain.
Definition at line 298 of file DigitalSetBySTLVector.h.
Referenced by DGtal::DigitalSetBySTLVector< TDomain >::operator=().
|
protected |
The container storing the points of the set.
Definition at line 303 of file DigitalSetBySTLVector.h.
Referenced by DGtal::DigitalSetBySTLVector< TDomain >::operator+=(), and DGtal::DigitalSetBySTLVector< TDomain >::operator=().