Aim: A wrapper class around a STL associative container for storing sets of digital points within some given domain.
More...
#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/digitalSetFromVol.cpp, io/display3DToOFF.cpp, shapes/exampleEuclideanShapesDecorator.cpp, topology/3dBorderExtraction.cpp, topology/3dBorderExtractionImg.cpp, topology/ctopo-2-3d.cpp, topology/ctopo-2.cpp, and tutorial-examples/freemanChainFromImage.cpp.
Definition at line 89 of file DigitalSetByAssociativeContainer.h.
◆ ConstIterator
template<typename TDomain , typename TContainer >
◆ Container
template<typename TDomain , typename TContainer >
◆ Domain
template<typename TDomain , typename TContainer >
◆ Iterator
template<typename TDomain , typename TContainer >
◆ Point
template<typename TDomain , typename TContainer >
◆ Self
template<typename TDomain , typename TContainer >
◆ Size
template<typename TDomain , typename TContainer >
◆ Space
template<typename TDomain , typename TContainer >
◆ value_type
template<typename TDomain , typename TContainer >
◆ ~DigitalSetByAssociativeContainer()
template<typename TDomain , typename TContainer >
◆ DigitalSetByAssociativeContainer() [1/3]
template<typename TDomain , typename TContainer >
Constructor. Creates the empty set in the domain [d].
- Parameters
-
◆ DigitalSetByAssociativeContainer() [2/3]
template<typename TDomain , typename TContainer >
Copy constructor.
- Parameters
-
other | the object to clone. |
◆ DigitalSetByAssociativeContainer() [3/3]
template<typename TDomain , typename TContainer >
Default Constructor. Forbidden since a Domain is necessary for defining a set.
◆ assignFromComplement()
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'. |
Referenced by testLayers(), and testSimpleExpander().
◆ begin() [1/2]
template<typename TDomain , typename TContainer >
- Returns
- an iterator on the first element in this set.
◆ begin() [2/2]
template<typename TDomain , typename TContainer >
- Returns
- a const iterator on the first element in this set.
Referenced by checkCut(), convexHull(), main(), SCENARIO(), testBreadthFirstPropagation(), testDepthFirstPropagation(), testDistancePropagation(), testImplicitShape3D(), testSetTable(), testSimplePoints2D(), and testVoronoiMap().
◆ BOOST_CONCEPT_ASSERT() [1/2]
template<typename TDomain , typename TContainer >
◆ BOOST_CONCEPT_ASSERT() [2/2]
template<typename TDomain , typename TContainer >
◆ BOOST_STATIC_ASSERT()
template<typename TDomain , typename TContainer >
◆ className()
template<typename TDomain , typename TContainer >
◆ clear()
template<typename TDomain , typename TContainer >
◆ computeBoundingBox()
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). |
◆ computeComplement()
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 |
◆ container() [1/2]
template<typename TDomain , typename TContainer >
Give access to the underlying container.
- Returns
- a (might be const) reference to the stored container.
◆ container() [2/2]
template<typename TDomain , typename TContainer >
Give access to the underlying container.
- Returns
- a (might be const) reference to the stored container.
◆ domain()
template<typename TDomain , typename TContainer >
◆ domainPointer()
template<typename TDomain , typename TContainer >
- Returns
- a copy on write pointer on the embedding domain.
◆ empty()
template<typename TDomain , typename TContainer >
- Returns
- 'true' iff the set is empty (no element).
◆ end() [1/2]
template<typename TDomain , typename TContainer >
- Returns
- a iterator on the element after the last in this set.
◆ end() [2/2]
template<typename TDomain , typename TContainer >
- Returns
- a const iterator on the element after the last in this set.
Referenced by checkCut(), convexHull(), main(), SCENARIO(), testBreadthFirstPropagation(), testDepthFirstPropagation(), testDistancePropagation(), testImplicitShape3D(), testSetFromImage(), testSetTable(), testSimplePoints2D(), and testVoronoiMap().
◆ erase() [1/3]
template<typename TDomain , typename TContainer >
◆ erase() [2/3]
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. |
◆ erase() [3/3]
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. |
◆ find() [1/2]
template<typename TDomain , typename TContainer >
- Parameters
-
- Returns
- an iterator pointing on [p] if found, otherwise end().
◆ find() [2/2]
template<typename TDomain , typename TContainer >
◆ insert() [1/2]
template<typename TDomain , typename TContainer >
◆ insert() [2/2]
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.
◆ insertNew() [1/2]
template<typename TDomain , typename TContainer >
Adds point [p] to this set if the point is not already in the set.
- Parameters
-
- Precondition
- p should belong to the associated domain.
-
p should not belong to this.
- Examples
- geometry/volumes/distance/voronoimap2D.cpp, and io/boards/dgtalBoard3D-1-points.cpp.
Referenced by main(), Object3D(), TEST_CASE(), testBoard2D(), testBoard3D(), testExactMetricBalls(), testExpander(), testImageAdapter(), testInexactMetricBalls(), testObject3D(), testObjectBorder(), testObjectGraph(), testSimple2D(), testSimple3D(), testSimplePoints3D(), and testVoronoiMap().
◆ insertNew() [2/2]
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.
◆ isValid()
template<typename TDomain , typename TContainer >
Checks the validity/consistency of the object.
- Returns
- 'true' if the object is valid, 'false' otherwise.
Referenced by TEST_CASE().
◆ operator()()
template<typename TDomain , typename TContainer >
- Parameters
-
- Returns
- 'true' if and only if p belongs to this set.
◆ operator+=()
template<typename TDomain , typename TContainer >
set union to left.
- Parameters
-
◆ operator=()
template<typename TDomain , typename TContainer >
Assignment.
- Parameters
-
- Returns
- a reference on 'this'.
◆ selfDisplay()
template<typename TDomain , typename TContainer >
Writes/Displays the object on an output stream.
- Parameters
-
out | the output stream where the object is written. |
◆ size()
template<typename TDomain , typename TContainer >
◆ myDomain
template<typename TDomain , typename TContainer >
◆ mySet
template<typename TDomain , typename TContainer >
The documentation for this class was generated from the following file: