DGtal
0.6.devel
|
#include <DigitalSetBySTLSet.h>
Public Types | |
typedef TDomain | Domain |
typedef DigitalSetBySTLSet < Domain > | Self |
typedef Domain::Space | Space |
typedef Domain::Point | Point |
typedef Domain::Size | Size |
typedef std::set< Point >::iterator | Iterator |
typedef std::set< Point > ::const_iterator | ConstIterator |
Public Member Functions | |
~DigitalSetBySTLSet () | |
DigitalSetBySTLSet (const Domain &d) | |
DigitalSetBySTLSet (const DigitalSetBySTLSet &other) | |
DigitalSetBySTLSet & | operator= (const DigitalSetBySTLSet &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 () |
DigitalSetBySTLSet< Domain > & | operator+= (const DigitalSetBySTLSet< Domain > &aSet) |
template<typename TOutputIterator > | |
void | computeComplement (TOutputIterator &ito) const |
void | assignFromComplement (const DigitalSetBySTLSet< 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 | |
DigitalSetBySTLSet () |
Protected Attributes | |
const Domain & | myDomain |
std::set< Point > | mySet |
Aim: A container class for storing sets of digital points within some given domain.
Description of template class 'DigitalSetBySTLSet'
This is the most versatile implementation for a set of point, and is essentially a wrapper to std::set<Point>. It added the notion of domain.
Model of CDigitalSet.
Definition at line 74 of file DigitalSetBySTLSet.h.
typedef std::set<Point>::const_iterator DGtal::DigitalSetBySTLSet< TDomain >::ConstIterator |
Definition at line 83 of file DigitalSetBySTLSet.h.
typedef TDomain DGtal::DigitalSetBySTLSet< TDomain >::Domain |
Definition at line 77 of file DigitalSetBySTLSet.h.
typedef std::set<Point>::iterator DGtal::DigitalSetBySTLSet< TDomain >::Iterator |
Definition at line 82 of file DigitalSetBySTLSet.h.
typedef Domain::Point DGtal::DigitalSetBySTLSet< TDomain >::Point |
Definition at line 80 of file DigitalSetBySTLSet.h.
typedef DigitalSetBySTLSet<Domain> DGtal::DigitalSetBySTLSet< TDomain >::Self |
Definition at line 78 of file DigitalSetBySTLSet.h.
typedef Domain::Size DGtal::DigitalSetBySTLSet< TDomain >::Size |
Definition at line 81 of file DigitalSetBySTLSet.h.
typedef Domain::Space DGtal::DigitalSetBySTLSet< TDomain >::Space |
Definition at line 79 of file DigitalSetBySTLSet.h.
|
inline |
|
inline |
Constructor. Creates the empty set in the domain [d].
d | any domain. |
Definition at line 62 of file DigitalSetBySTLSet.ih.
|
inline |
Copy constructor.
other | the object to clone. |
Definition at line 73 of file DigitalSetBySTLSet.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 369 of file DigitalSetBySTLSet.ih.
References DGtal::DigitalSetBySTLSet< TDomain >::end(), and DGtal::DigitalSetBySTLSet< TDomain >::find().
|
inline |
Definition at line 276 of file DigitalSetBySTLSet.ih.
References DGtal::DigitalSetBySTLSet< TDomain >::begin().
Referenced by DGtal::DigitalSetBySTLSet< TDomain >::begin(), DGtal::DigitalSetBySTLSet< TDomain >::computeComplement(), DGtal::Display2DFactory::draw(), DGtal::Display3DFactory::drawAsGrid(), DGtal::Display3DFactory::drawAsPaving(), DGtal::Display3DFactory::drawAsPavingTransparent(), and DGtal::DigitalSetBySTLSet< TDomain >::operator+=().
|
inline |
Definition at line 298 of file DigitalSetBySTLSet.ih.
References DGtal::DigitalSetBySTLSet< TDomain >::begin().
|
inline |
Default drawing style object.
Definition at line 448 of file DigitalSetBySTLSet.ih.
Referenced by DGtal::Display3DFactory::draw().
|
inline |
Clears the set.
Definition at line 241 of file DigitalSetBySTLSet.ih.
References DGtal::DigitalSetBySTLSet< TDomain >::clear().
Referenced by DGtal::DigitalSetBySTLSet< TDomain >::clear().
|
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 394 of file DigitalSetBySTLSet.ih.
|
inline |
Computes the complement in the domain of this set
ito | an output iterator |
TOutputIterator | a model of output iterator |
Definition at line 347 of file DigitalSetBySTLSet.ih.
References DGtal::DigitalSetBySTLSet< TDomain >::begin().
|
inline |
Definition at line 102 of file DigitalSetBySTLSet.ih.
|
inline |
Definition at line 130 of file DigitalSetBySTLSet.ih.
References DGtal::DigitalSetBySTLSet< TDomain >::empty().
Referenced by DGtal::DigitalSetBySTLSet< TDomain >::empty().
|
inline |
Definition at line 287 of file DigitalSetBySTLSet.ih.
References DGtal::DigitalSetBySTLSet< TDomain >::end().
Referenced by DGtal::DigitalSetBySTLSet< TDomain >::assignFromComplement(), DGtal::Display2DFactory::draw(), DGtal::Display3DFactory::drawAsGrid(), DGtal::Display3DFactory::drawAsPaving(), DGtal::Display3DFactory::drawAsPavingTransparent(), DGtal::DigitalSetBySTLSet< TDomain >::end(), and DGtal::DigitalSetBySTLSet< TDomain >::operator+=().
|
inline |
Definition at line 309 of file DigitalSetBySTLSet.ih.
References DGtal::DigitalSetBySTLSet< TDomain >::end().
DGtal::DigitalSetBySTLSet< Domain >::Size DGtal::DigitalSetBySTLSet< Domain >::erase | ( | const Point & | p | ) |
Removes point [p] from the set.
p | the point to remove. |
Definition at line 215 of file DigitalSetBySTLSet.ih.
References DGtal::DigitalSetBySTLSet< TDomain >::erase().
Referenced by DGtal::DigitalSetBySTLSet< TDomain >::erase().
|
inline |
Removes the point pointed by [it] from the set.
it | an iterator on this set. Note: generally faster than giving just the point. |
Definition at line 229 of file DigitalSetBySTLSet.ih.
References DGtal::DigitalSetBySTLSet< TDomain >::erase().
void DGtal::DigitalSetBySTLSet< TDomain >::erase | ( | Iterator | first, |
Iterator | last | ||
) |
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. |
|
inline |
p | any digital point. |
p | any digital point. |
Definition at line 253 of file DigitalSetBySTLSet.ih.
References DGtal::DigitalSetBySTLSet< TDomain >::find().
Referenced by DGtal::DigitalSetBySTLSet< TDomain >::assignFromComplement(), and DGtal::DigitalSetBySTLSet< TDomain >::find().
|
inline |
p | any digital point. |
Definition at line 265 of file DigitalSetBySTLSet.ih.
References DGtal::DigitalSetBySTLSet< TDomain >::find().
|
inline |
Adds point [p] to this set.
p | any digital point. |
Definition at line 145 of file DigitalSetBySTLSet.ih.
References DGtal::DigitalSetBySTLSet< TDomain >::insert().
Referenced by DGtal::DigitalSetBySTLSet< TDomain >::insert(), and DGtal::DigitalSetBySTLSet< TDomain >::insertNew().
void DGtal::DigitalSetBySTLSet< Domain >::insert | ( | PointInputIterator | first, |
PointInputIterator | last | ||
) |
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 163 of file DigitalSetBySTLSet.ih.
References DGtal::DigitalSetBySTLSet< TDomain >::insert().
|
inline |
Adds point [p] to this set if the point is not already in the set.
p | any digital point. |
Definition at line 181 of file DigitalSetBySTLSet.ih.
References DGtal::DigitalSetBySTLSet< TDomain >::insert().
Referenced by DGtal::Object< TDigitalTopology, TDigitalSet >::neighborhood(), and DGtal::Object< TDigitalTopology, TDigitalSet >::properNeighborhood().
|
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 202 of file DigitalSetBySTLSet.ih.
References DGtal::DigitalSetBySTLSet< TDomain >::insert().
|
inline |
Checks the validity/consistency of the object.
Definition at line 429 of file DigitalSetBySTLSet.ih.
|
inline |
set union to left.
aSet | any other set. |
Definition at line 322 of file DigitalSetBySTLSet.ih.
References DGtal::DigitalSetBySTLSet< TDomain >::begin(), and DGtal::DigitalSetBySTLSet< TDomain >::end().
|
inline |
Assignment.
other | the object to copy. |
Definition at line 86 of file DigitalSetBySTLSet.ih.
References DGtal::DigitalSetBySTLSet< TDomain >::myDomain, and DGtal::DigitalSetBySTLSet< TDomain >::mySet.
|
inline |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
Definition at line 417 of file DigitalSetBySTLSet.ih.
Referenced by DGtal::operator<<().
|
inline |
Definition at line 119 of file DigitalSetBySTLSet.ih.
References DGtal::DigitalSetBySTLSet< TDomain >::size().
Referenced by DGtal::DigitalSetBySTLSet< TDomain >::size().
|
protected |
The associated domain;
Definition at line 295 of file DigitalSetBySTLSet.h.
Referenced by DGtal::DigitalSetBySTLSet< TDomain >::operator=().
|
protected |
The container storing the points of the set.
Definition at line 300 of file DigitalSetBySTLSet.h.
Referenced by DGtal::DigitalSetBySTLSet< TDomain >::operator=().