#include <DGtal/kernel/sets/DigitalSetByAssociativeContainer.h>
template<typename TDomain, typename TContainer>
class DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >
Aim: A wrapper class around a STL associative container for storing sets of digital points within some given domain.
Description of template class 'DigitalSetByAssociativeContainer'
Model of CDigitalSet.
- Since
- 0.7 Domains are now hold with copy on write pointers and no more only aliased. The problem was related to returning sets with a locally constructed domain. With CowPtr, you are sure that the domain remains valid during the lifetime of your set.
- Template Parameters
-
- Examples:
- dec/exampleDECSurface.cpp, geometry/tools/exampleAlphaShape.cpp, geometry/tools/exampleConvexHull2D.cpp, geometry/volumes/distance/voronoimap2D.cpp, io/boards/dgtalBoard3D-1-points.cpp, io/digitalSetFromVol.cpp, io/display3DToOFF.cpp, shapes/exampleEuclideanShapesDecorator.cpp, topology/3dBorderExtraction.cpp, topology/3dBorderExtractionImg.cpp, topology/area-estimation-with-digital-surface.cpp, topology/area-estimation-with-indexed-digital-surface.cpp, topology/ctopo-2-3d.cpp, topology/ctopo-2.cpp, and tutorial-examples/freemanChainFromImage.cpp.
Definition at line 89 of file DigitalSetByAssociativeContainer.h.
template<typename TDomain, typename TContainer>
template<typename TDomain, typename TContainer>
template<typename TDomain, typename TContainer>
template<typename TDomain, typename TContainer>
template<typename TDomain, typename TContainer>
template<typename TDomain, typename TContainer>
template<typename TDomain, typename TContainer>
template<typename TDomain, typename TContainer>
template<typename TDomain, typename TContainer>
template<typename TDomain, typename TContainer>
template<typename TDomain, typename TContainer>
Constructor. Creates the empty set in the domain [d].
- Parameters
-
template<typename TDomain, typename TContainer>
Copy constructor.
- Parameters
-
other | the object to clone. |
template<typename TDomain, typename TContainer>
Default Constructor. Forbidden since a Domain is necessary for defining a set.
template<typename TDomain, typename TContainer>
Builds the complement in the domain of the set [other_set] in this.
- Parameters
-
other_set | defines the set whose complement is assigned to 'this'. |
template<typename TDomain, typename TContainer>
- Returns
- a const iterator on the first element in this set.
template<typename TDomain, typename TContainer>
- Returns
- an iterator on the first element in this set.
template<typename TDomain, typename TContainer>
template<typename TDomain, typename TContainer>
template<typename TDomain, typename TContainer>
template<typename TDomain, typename TContainer>
template<typename TDomain, typename TContainer>
Clears the set.
- Postcondition
- this set is empty.
template<typename TDomain, typename TContainer>
Computes the bounding box of this set.
- Parameters
-
lower | the first point of the bounding box (lowest in all directions). |
upper | the last point of the bounding box (highest in all directions). |
template<typename TDomain, typename TContainer>
template<typename TOutputIterator >
Computes the complement in the domain of this set
- Parameters
-
- Template Parameters
-
TOutputIterator | a model of output iterator |
template<typename TDomain, typename TContainer>
- Returns
- the embedding domain.
template<typename TDomain, typename TContainer>
- Returns
- a copy on write pointer on the embedding domain.
template<typename TDomain, typename TContainer>
- Returns
- 'true' iff the set is empty (no element).
template<typename TDomain, typename TContainer>
- Returns
- a const iterator on the element after the last in this set.
template<typename TDomain, typename TContainer>
- Returns
- a iterator on the element after the last in this set.
template<typename TDomain, typename TContainer>
Removes point [p] from the set.
- Parameters
-
- Returns
- the number of removed elements (0 or 1).
template<typename TDomain, typename TContainer>
Removes the point pointed by [it] from the set.
- Parameters
-
it | an iterator on this set. Note: generally faster than giving just the point. |
template<typename TDomain, typename TContainer>
Removes the collection of points specified by the two iterators from this set.
- Parameters
-
first | the start point in this set. |
last | the last point in this set. |
template<typename TDomain, typename TContainer>
template<typename TDomain, typename TContainer>
- Parameters
-
- Returns
- an iterator pointing on [p] if found, otherwise end().
template<typename TDomain, typename TContainer>
Adds point [p] to this set.
- Parameters
-
- Precondition
- p should belong to the associated domain.
template<typename TDomain, typename TContainer>
template<typename PointInputIterator >
Adds the collection of points specified by the two iterators to this set.
- Parameters
-
first | the start point in the collection of Point. |
last | the last point in the collection of Point. |
- Precondition
- all points should belong to the associated domain.
template<typename TDomain, typename TContainer>
template<typename TDomain, typename TContainer>
template<typename PointInputIterator >
Adds the collection of points specified by the two iterators to this set.
- Parameters
-
first | the start point in the collection of Point. |
last | the last point in the collection of Point. |
- Precondition
- all points should belong to the associated domain.
-
each point should not belong to this.
template<typename TDomain, typename TContainer>
Checks the validity/consistency of the object.
- Returns
- 'true' if the object is valid, 'false' otherwise.
template<typename TDomain, typename TContainer>
- Parameters
-
- Returns
- 'true' if and only if p belongs to this set.
template<typename TDomain, typename TContainer>
set union to left.
- Parameters
-
template<typename TDomain, typename TContainer>
Assignment.
- Parameters
-
- Returns
- a reference on 'this'.
template<typename TDomain, typename TContainer>
Writes/Displays the object on an output stream.
- Parameters
-
out | the output stream where the object is written. |
template<typename TDomain, typename TContainer>
- Returns
- the number of elements in the set.
template<typename TDomain, typename TContainer>
template<typename TDomain, typename TContainer>
The documentation for this class was generated from the following file: