DGtal 1.4.2
|
Aim: Given a domain and an adjacency, limits the given adjacency to the specified domain for all adjacency and neighborhood computations. More...
#include <DGtal/topology/DomainAdjacency.h>
Data Structures | |
struct | VertexMap |
Public Types | |
typedef TDomain::Space | Space |
typedef TAdjacency | Adjacency |
typedef TDomain::Point | Point |
typedef TDomain | Domain |
typedef functors::DomainPredicate< Domain > | Predicate |
typedef Point | Vertex |
typedef Space::Size | Size |
typedef DigitalSetSelector< Domain, SMALL_DS+HIGH_ITER_DS >::Type | VertexSet |
Public Member Functions | |
DomainAdjacency (ConstAlias< Domain > aDomain, ConstAlias< Adjacency > adjacency) | |
DomainAdjacency (const DomainAdjacency &other) | |
~DomainAdjacency () | |
const Domain & | domain () const |
const Predicate & | predicate () const |
bool | isAdjacentTo (const Point &p1, const Point &p2) const |
bool | isProperlyAdjacentTo (const Point &p1, const Point &p2) const |
Size | bestCapacity () const |
Size | degree (const Vertex &v) const |
template<typename OutputIterator > | |
void | writeNeighbors (OutputIterator &it, const Vertex &v) const |
template<typename OutputIterator , typename VertexPredicate > | |
void | writeNeighbors (OutputIterator &it, const Vertex &v, const VertexPredicate &pred) const |
void | selfDisplay (std::ostream &out) const |
bool | isValid () const |
Protected Member Functions | |
DomainAdjacency () | |
Private Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CDomain< TDomain >)) | |
BOOST_CONCEPT_ASSERT ((concepts::CAdjacency< TAdjacency >)) | |
DomainAdjacency & | operator= (const DomainAdjacency &other) |
Private Attributes | |
Predicate | myPred |
const Adjacency & | myAdjacency |
Aim: Given a domain and an adjacency, limits the given adjacency to the specified domain for all adjacency and neighborhood computations.
Description of template class 'DomainAdjacency'
This class is useful for limiting adjacencies that are defined for unlimited spaces.
Model of CAdjacency.
TDomain | the type of the domain. |
TAdjacency | the type of the adjacency. |
Definition at line 73 of file DomainAdjacency.h.
TAdjacency DGtal::DomainAdjacency< TDomain, TAdjacency >::Adjacency |
Definition at line 81 of file DomainAdjacency.h.
TDomain DGtal::DomainAdjacency< TDomain, TAdjacency >::Domain |
Definition at line 85 of file DomainAdjacency.h.
TDomain::Point DGtal::DomainAdjacency< TDomain, TAdjacency >::Point |
Definition at line 82 of file DomainAdjacency.h.
functors::DomainPredicate< Domain > DGtal::DomainAdjacency< TDomain, TAdjacency >::Predicate |
Definition at line 86 of file DomainAdjacency.h.
Space::Size DGtal::DomainAdjacency< TDomain, TAdjacency >::Size |
Definition at line 90 of file DomainAdjacency.h.
TDomain::Space DGtal::DomainAdjacency< TDomain, TAdjacency >::Space |
Definition at line 80 of file DomainAdjacency.h.
Point DGtal::DomainAdjacency< TDomain, TAdjacency >::Vertex |
Definition at line 89 of file DomainAdjacency.h.
DigitalSetSelector<Domain,SMALL_DS+HIGH_ITER_DS>::Type DGtal::DomainAdjacency< TDomain, TAdjacency >::VertexSet |
Definition at line 92 of file DomainAdjacency.h.
DGtal::DomainAdjacency< TDomain, TAdjacency >::DomainAdjacency | ( | ConstAlias< Domain > | aDomain, |
ConstAlias< Adjacency > | adjacency ) |
Constructor.
aDomain | the domain which restricts the given adjacency. |
adjacency | any adjacency whose range contains the given domain aDomain. |
DGtal::DomainAdjacency< TDomain, TAdjacency >::DomainAdjacency | ( | const DomainAdjacency< TDomain, TAdjacency > & | other | ) |
Copy constructor.
other | the object to clone. |
DGtal::DomainAdjacency< TDomain, TAdjacency >::~DomainAdjacency | ( | ) |
Destructor.
|
protected |
Constructor. Forbidden by default (protected to avoid g++ warnings).
Size DGtal::DomainAdjacency< TDomain, TAdjacency >::bestCapacity | ( | ) | const |
|
private |
|
private |
Size DGtal::DomainAdjacency< TDomain, TAdjacency >::degree | ( | const Vertex & | v | ) | const |
v | any vertex |
const Domain & DGtal::DomainAdjacency< TDomain, TAdjacency >::domain | ( | ) | const |
bool DGtal::DomainAdjacency< TDomain, TAdjacency >::isAdjacentTo | ( | const Point & | p1, |
const Point & | p2 ) const |
p1 | any point in this space. |
p2 | any point in this space. |
bool DGtal::DomainAdjacency< TDomain, TAdjacency >::isProperlyAdjacentTo | ( | const Point & | p1, |
const Point & | p2 ) const |
p1 | any point in this space. |
p2 | any point in this space. |
bool DGtal::DomainAdjacency< TDomain, TAdjacency >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
|
private |
Assignment.
other | the object to copy. |
const Predicate & DGtal::DomainAdjacency< TDomain, TAdjacency >::predicate | ( | ) | const |
Useful if you want to restrict your neighborhood.
void DGtal::DomainAdjacency< TDomain, TAdjacency >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
void DGtal::DomainAdjacency< TDomain, TAdjacency >::writeNeighbors | ( | OutputIterator & | it, |
const Vertex & | v ) const |
Writes the neighbors of a vertex using an output iterator
OutputIterator | the type of an output iterator writing in a container of vertices. |
it | the output iterator |
v | the vertex whose neighbors will be writen |
void DGtal::DomainAdjacency< TDomain, TAdjacency >::writeNeighbors | ( | OutputIterator & | it, |
const Vertex & | v, | ||
const VertexPredicate & | pred ) const |
Writes the neighbors of a vertex which satisfy a predicate using an output iterator
OutputIterator | the type of an output iterator writing in a container of vertices. |
VertexPredicate | the type of the predicate |
it | the output iterator |
v | the vertex whose neighbors will be written |
pred | the predicate that must be satisfied |
|
private |
The adjacency relation.
Definition at line 234 of file DomainAdjacency.h.
|
private |
The predicate for testing if a point belongs to the domain.
Definition at line 229 of file DomainAdjacency.h.