DGtal
1.5.beta
|
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>
Public Types | |
typedef TDomain | Domain |
Domain type. More... | |
typedef TContainer | Container |
Container type. More... | |
typedef DigitalSetByAssociativeContainer< Domain, Container > | Self |
Self Type. More... | |
typedef Domain::Space | Space |
Type of digital space. More... | |
typedef Domain::Point | Point |
Type of points in the space. More... | |
typedef Container::iterator | Iterator |
Iterator type of the container. More... | |
typedef Container::const_iterator | ConstIterator |
ConstIterator type of the container;. More... | |
typedef Container::value_type | value_type |
Value type of the container. More... | |
typedef Container::size_type | Size |
Size type of the container;. More... | |
Protected Member Functions | |
DigitalSetByAssociativeContainer () | |
Protected Attributes | |
CowPtr< Domain > | myDomain |
Container | mySet |
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.
TDomain | type of domain on which the set will be defined (model of concepts::CDomain). |
TContainer | STL associative container to store points (model of concepts::CSTLAssociativeContainer). |
Definition at line 89 of file DigitalSetByAssociativeContainer.h.
typedef Container::const_iterator DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::ConstIterator |
ConstIterator type of the container;.
Definition at line 108 of file DigitalSetByAssociativeContainer.h.
typedef TContainer DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::Container |
Container type.
Definition at line 97 of file DigitalSetByAssociativeContainer.h.
typedef TDomain DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::Domain |
Domain type.
Definition at line 94 of file DigitalSetByAssociativeContainer.h.
typedef Container::iterator DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::Iterator |
Iterator type of the container.
Definition at line 106 of file DigitalSetByAssociativeContainer.h.
typedef Domain::Point DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::Point |
Type of points in the space.
Definition at line 104 of file DigitalSetByAssociativeContainer.h.
typedef DigitalSetByAssociativeContainer<Domain, Container> DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::Self |
Self Type.
Definition at line 100 of file DigitalSetByAssociativeContainer.h.
typedef Container::size_type DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::Size |
Size type of the container;.
Definition at line 112 of file DigitalSetByAssociativeContainer.h.
typedef Domain::Space DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::Space |
Type of digital space.
Definition at line 102 of file DigitalSetByAssociativeContainer.h.
typedef Container::value_type DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::value_type |
Value type of the container.
Definition at line 110 of file DigitalSetByAssociativeContainer.h.
DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::~DigitalSetByAssociativeContainer | ( | ) |
Destructor.
DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::DigitalSetByAssociativeContainer | ( | Clone< Domain > | d | ) |
Constructor. Creates the empty set in the domain [d].
d | any domain. |
DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::DigitalSetByAssociativeContainer | ( | const DigitalSetByAssociativeContainer< TDomain, TContainer > & | other | ) |
Copy constructor.
other | the object to clone. |
|
protected |
Default Constructor. Forbidden since a Domain is necessary for defining a set.
void DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::assignFromComplement | ( | const DigitalSetByAssociativeContainer< Domain, Container > & | 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'. |
Referenced by testLayers(), and testSimpleExpander().
Iterator DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::begin | ( | ) |
ConstIterator DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::begin | ( | ) | const |
Referenced by checkCut(), convexHull(), main(), SCENARIO(), testBreadthFirstPropagation(), testDepthFirstPropagation(), testDistancePropagation(), testImplicitShape3D(), testSetTable(), testSimplePoints2D(), and testVoronoiMap().
DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::BOOST_CONCEPT_ASSERT | ( | (concepts::CDomain< TDomain >) | ) |
Concept checks.
DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::BOOST_CONCEPT_ASSERT | ( | (concepts::CSTLAssociativeContainer< TContainer >) | ) |
DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::BOOST_STATIC_ASSERT | ( | (boost::is_same< typename Container::key_type, Point >::value) | ) |
std::string DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::className | ( | ) | const |
Referenced by checkCut(), checkOutputConvexHullBorder(), main(), specificTestLatticePolytope2D(), testBoard2D(), and testLatticePolytope2D().
void DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::clear | ( | ) |
void DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::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::DigitalSetByAssociativeContainer< TDomain, TContainer >::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::DigitalSetByAssociativeContainer< TDomain, TContainer >::container | ( | ) |
Give access to the underlying container.
const Container& DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::container | ( | ) | const |
Give access to the underlying container.
const Domain& DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::domain | ( | ) | const |
Referenced by brut_force_voronoi_map_complete(), main(), and TEST_CASE().
CowPtr<Domain> DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::domainPointer | ( | ) | const |
bool DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::empty | ( | ) | const |
Iterator DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::end | ( | ) |
ConstIterator DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::end | ( | ) | const |
Referenced by checkCut(), convexHull(), main(), SCENARIO(), testBreadthFirstPropagation(), testDepthFirstPropagation(), testDistancePropagation(), testImplicitShape3D(), testSetFromImage(), testSetTable(), testSimplePoints2D(), and testVoronoiMap().
Size DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::erase | ( | const Point & | p | ) |
Removes point [p] from the set.
p | the point to remove. |
Referenced by main(), Object3D(), testSetTable(), testSimplePoints2D(), testSimplePoints3D(), and testVoronoiMap().
void DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::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::DigitalSetByAssociativeContainer< TDomain, TContainer >::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::DigitalSetByAssociativeContainer< TDomain, TContainer >::find | ( | const Point & | p | ) |
p | any digital point. |
ConstIterator DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::find | ( | const Point & | p | ) | const |
p | any digital point. |
Referenced by checkCut(), and testSetFromImage().
void DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::insert | ( | const Point & | p | ) |
Adds point [p] to this set.
p | any digital point. |
Referenced by main(), TEST_CASE(), testFindABel(), testImageFromSet(), testLayers(), testOrderingDigitalSurfaceFacesAroundVertex(), testSimpleExpander(), testSimpleRandom2D(), and testSimpleRandom3D().
void DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::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. |
void DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::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 main(), Object3D(), TEST_CASE(), testBoard2D(), testBoard3D(), testExactMetricBalls(), testExpander(), testImageAdapter(), testInexactMetricBalls(), testObject3D(), testObjectBorder(), testObjectGraph(), testSimple2D(), testSimple3D(), testSimplePoints3D(), and testVoronoiMap().
void DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::insertNew | ( | 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. |
bool DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
Referenced by TEST_CASE().
bool DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::operator() | ( | const Point & | p | ) | const |
p | any point. |
DigitalSetByAssociativeContainer<Domain, Container>& DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::operator+= | ( | const DigitalSetByAssociativeContainer< Domain, Container > & | aSet | ) |
set union to left.
aSet | any other set. |
DigitalSetByAssociativeContainer& DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::operator= | ( | const DigitalSetByAssociativeContainer< TDomain, TContainer > & | other | ) |
Assignment.
other | the object to copy. |
void DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
Size DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::size | ( | ) | const |
Referenced by checkCut(), main(), TEST_CASE(), testObjectGraph(), and testSetFromImage().
|
protected |
The associated domain. The pointed domain may be changed but it remains valid during the lifetime of the set.
Definition at line 351 of file DigitalSetByAssociativeContainer.h.
|
protected |
The container storing the points of the set.
Definition at line 356 of file DigitalSetByAssociativeContainer.h.