|
DGtal 2.0.0
|
Aim: A container class for storing sets of digital points within some given domain. More...
#include <DGtal/kernel/sets/DigitalSetBySTLSet.h>
Public Types | |
| typedef TDomain | Domain |
| typedef TCompare | Compare |
| typedef DigitalSetBySTLSet< Domain, Compare > | Self |
| typedef Domain::Space | Space |
| typedef Domain::Point | Point |
| typedef Domain::Size | Size |
| typedef std::set< Point > | Container |
| typedef std::set< Point >::iterator | Iterator |
| typedef std::set< Point >::const_iterator | ConstIterator |
Public Member Functions | |
| BOOST_CONCEPT_ASSERT ((concepts::CDomain< TDomain >)) | |
| Concept checks. | |
| ~DigitalSetBySTLSet () | |
| DigitalSetBySTLSet (Clone< Domain > d, const Compare &c=Compare()) | |
| DigitalSetBySTLSet (const DigitalSetBySTLSet &other) | |
| DigitalSetBySTLSet & | operator= (const DigitalSetBySTLSet &other) |
| const Domain & | domain () const |
| CowPtr< Domain > | domainPointer () 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 () |
| const Container & | container () const |
| Container & | container () |
| DigitalSetBySTLSet< Domain, Compare > & | operator+= (const DigitalSetBySTLSet< Domain, Compare > &aSet) |
| bool | operator() (const Point &p) const |
| template<typename TOutputIterator> | |
| void | computeComplement (TOutputIterator &ito) const |
| void | assignFromComplement (const DigitalSetBySTLSet< Domain, Compare > &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 | |
| CowPtr< Domain > | myDomain |
| std::set< Point, Compare > | 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 adds the notion of domain.
Model of CDigitalSet.
Definition at line 84 of file DigitalSetBySTLSet.h.
| typedef TCompare DGtal::DigitalSetBySTLSet< TDomain, TCompare >::Compare |
Definition at line 88 of file DigitalSetBySTLSet.h.
| typedef std::set<Point>::const_iterator DGtal::DigitalSetBySTLSet< TDomain, TCompare >::ConstIterator |
Definition at line 95 of file DigitalSetBySTLSet.h.
| typedef std::set<Point> DGtal::DigitalSetBySTLSet< TDomain, TCompare >::Container |
Definition at line 93 of file DigitalSetBySTLSet.h.
| typedef TDomain DGtal::DigitalSetBySTLSet< TDomain, TCompare >::Domain |
Definition at line 87 of file DigitalSetBySTLSet.h.
| typedef std::set<Point>::iterator DGtal::DigitalSetBySTLSet< TDomain, TCompare >::Iterator |
Definition at line 94 of file DigitalSetBySTLSet.h.
| typedef Domain::Point DGtal::DigitalSetBySTLSet< TDomain, TCompare >::Point |
Definition at line 91 of file DigitalSetBySTLSet.h.
| typedef DigitalSetBySTLSet<Domain, Compare> DGtal::DigitalSetBySTLSet< TDomain, TCompare >::Self |
Definition at line 89 of file DigitalSetBySTLSet.h.
| typedef Domain::Size DGtal::DigitalSetBySTLSet< TDomain, TCompare >::Size |
Definition at line 92 of file DigitalSetBySTLSet.h.
| typedef Domain::Space DGtal::DigitalSetBySTLSet< TDomain, TCompare >::Space |
Definition at line 90 of file DigitalSetBySTLSet.h.
| DGtal::DigitalSetBySTLSet< TDomain, TCompare >::~DigitalSetBySTLSet | ( | ) |
Destructor.
| DGtal::DigitalSetBySTLSet< TDomain, TCompare >::DigitalSetBySTLSet | ( | Clone< Domain > | d, |
| const Compare & | c = Compare() ) |
Constructor. Creates the empty set in the domain [d].
| c | comparison function object. |
| d | any domain. |
| DGtal::DigitalSetBySTLSet< TDomain, TCompare >::DigitalSetBySTLSet | ( | const DigitalSetBySTLSet< TDomain, TCompare > & | other | ) |
Copy constructor.
| other | the object to clone. |
|
protected |
Default Constructor. Forbidden since a Domain is necessary for defining a set.
| void DGtal::DigitalSetBySTLSet< TDomain, TCompare >::assignFromComplement | ( | const DigitalSetBySTLSet< Domain, Compare > & | other_set | ) |
Builds the complement in the domain of the set [other_set] in this.
| other_set | defines the set whose complement is assigned to 'this'. |
| Iterator DGtal::DigitalSetBySTLSet< TDomain, TCompare >::begin | ( | ) |
| ConstIterator DGtal::DigitalSetBySTLSet< TDomain, TCompare >::begin | ( | ) | const |
Referenced by checkPowerMap().
| DGtal::DigitalSetBySTLSet< TDomain, TCompare >::BOOST_CONCEPT_ASSERT | ( | (concepts::CDomain< TDomain >) | ) |
Concept checks.
| std::string DGtal::DigitalSetBySTLSet< TDomain, TCompare >::className | ( | ) | const |
| void DGtal::DigitalSetBySTLSet< TDomain, TCompare >::clear | ( | ) |
Clears the set.
| void DGtal::DigitalSetBySTLSet< TDomain, TCompare >::computeBoundingBox | ( | Point & | lower, |
| Point & | upper ) const |
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). |
| void DGtal::DigitalSetBySTLSet< TDomain, TCompare >::computeComplement | ( | TOutputIterator & | ito | ) | const |
Computes the complement in the domain of this set
| ito | an output iterator |
| TOutputIterator | a model of output iterator |
| Container & DGtal::DigitalSetBySTLSet< TDomain, TCompare >::container | ( | ) |
Give access to the underlying container.
| const Container & DGtal::DigitalSetBySTLSet< TDomain, TCompare >::container | ( | ) | const |
Give access to the underlying container.
| const Domain & DGtal::DigitalSetBySTLSet< TDomain, TCompare >::domain | ( | ) | const |
| CowPtr< Domain > DGtal::DigitalSetBySTLSet< TDomain, TCompare >::domainPointer | ( | ) | const |
| bool DGtal::DigitalSetBySTLSet< TDomain, TCompare >::empty | ( | ) | const |
| Iterator DGtal::DigitalSetBySTLSet< TDomain, TCompare >::end | ( | ) |
| ConstIterator DGtal::DigitalSetBySTLSet< TDomain, TCompare >::end | ( | ) | const |
Referenced by checkPowerMap().
| Size DGtal::DigitalSetBySTLSet< TDomain, TCompare >::erase | ( | const Point & | p | ) |
Removes point [p] from the set.
| p | the point to remove. |
| void DGtal::DigitalSetBySTLSet< TDomain, TCompare >::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. |
| void DGtal::DigitalSetBySTLSet< TDomain, TCompare >::erase | ( | Iterator | it | ) |
Removes the point pointed by [it] from the set.
| it | an iterator on this set. Note: generally faster than giving just the point. |
| Iterator DGtal::DigitalSetBySTLSet< TDomain, TCompare >::find | ( | const Point & | p | ) |
| p | any digital point. |
| ConstIterator DGtal::DigitalSetBySTLSet< TDomain, TCompare >::find | ( | const Point & | p | ) | const |
| p | any digital point. |
| void DGtal::DigitalSetBySTLSet< TDomain, TCompare >::insert | ( | const Point & | p | ) |
Adds point [p] to this set.
| p | any digital point. |
| void DGtal::DigitalSetBySTLSet< TDomain, TCompare >::insert | ( | PointInputIterator | first, |
| PointInputIterator | last ) |
| void DGtal::DigitalSetBySTLSet< TDomain, TCompare >::insertNew | ( | const Point & | p | ) |
Adds point [p] to this set if the point is not already in the set.
| p | any digital point. |
Referenced by checkPowerMap(), testSimple2D(), testSimple3D(), and testSimple4D().
| void DGtal::DigitalSetBySTLSet< TDomain, TCompare >::insertNew | ( | PointInputIterator | first, |
| PointInputIterator | last ) |
| bool DGtal::DigitalSetBySTLSet< TDomain, TCompare >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
| bool DGtal::DigitalSetBySTLSet< TDomain, TCompare >::operator() | ( | const Point & | p | ) | const |
| p | any point. |
| DigitalSetBySTLSet< Domain, Compare > & DGtal::DigitalSetBySTLSet< TDomain, TCompare >::operator+= | ( | const DigitalSetBySTLSet< Domain, Compare > & | aSet | ) |
set union to left.
| aSet | any other set. |
| DigitalSetBySTLSet & DGtal::DigitalSetBySTLSet< TDomain, TCompare >::operator= | ( | const DigitalSetBySTLSet< TDomain, TCompare > & | other | ) |
Assignment.
| other | the object to copy. |
| void DGtal::DigitalSetBySTLSet< TDomain, TCompare >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
| out | the output stream where the object is written. |
| Size DGtal::DigitalSetBySTLSet< TDomain, TCompare >::size | ( | ) | const |
|
protected |
The associated domain. The pointed domain may be changed but it remains valid during the lifetime of the set.
Definition at line 337 of file DigitalSetBySTLSet.h.
|
protected |
The container storing the points of the set.
Definition at line 342 of file DigitalSetBySTLSet.h.