DGtal
0.6.devel
|
#include <DomainAdjacency.h>
Data Structures | |
struct | VertexMap |
Public Types | |
typedef TDomain::Space | Space |
typedef TAdjacency | Adjacency |
typedef TDomain::Point | Point |
typedef TDomain | Domain |
typedef DomainPredicate< Domain > | Predicate |
typedef Point | Vertex |
typedef Space::Size | Size |
typedef DigitalSetSelector < Domain, SMALL_DS+HIGH_ITER_DS > ::Type | VertexSet |
Public Member Functions | |
DomainAdjacency (const Domain &aDomain, const 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 ((CDomain< TDomain >)) | |
BOOST_CONCEPT_ASSERT ((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 72 of file DomainAdjacency.h.
typedef TAdjacency DGtal::DomainAdjacency< TDomain, TAdjacency >::Adjacency |
Definition at line 80 of file DomainAdjacency.h.
typedef TDomain DGtal::DomainAdjacency< TDomain, TAdjacency >::Domain |
Definition at line 84 of file DomainAdjacency.h.
typedef TDomain::Point DGtal::DomainAdjacency< TDomain, TAdjacency >::Point |
Definition at line 81 of file DomainAdjacency.h.
typedef DomainPredicate< Domain > DGtal::DomainAdjacency< TDomain, TAdjacency >::Predicate |
Definition at line 85 of file DomainAdjacency.h.
typedef Space::Size DGtal::DomainAdjacency< TDomain, TAdjacency >::Size |
Definition at line 89 of file DomainAdjacency.h.
typedef TDomain::Space DGtal::DomainAdjacency< TDomain, TAdjacency >::Space |
Definition at line 79 of file DomainAdjacency.h.
typedef Point DGtal::DomainAdjacency< TDomain, TAdjacency >::Vertex |
Definition at line 88 of file DomainAdjacency.h.
typedef DigitalSetSelector< Domain, SMALL_DS + HIGH_ITER_DS >::Type DGtal::DomainAdjacency< TDomain, TAdjacency >::VertexSet |
Definition at line 91 of file DomainAdjacency.h.
|
inline |
Constructor.
aDomain | the domain which restricts the given adjacency. |
adjacency | any adjacency whose range contains the given domain aDomain. |
Definition at line 50 of file DomainAdjacency.ih.
|
inline |
Copy constructor.
other | the object to clone. |
Definition at line 59 of file DomainAdjacency.ih.
|
inline |
|
protected |
Constructor. Forbidden by default (protected to avoid g++ warnings).
|
inline |
Definition at line 141 of file DomainAdjacency.ih.
References DGtal::DomainAdjacency< TDomain, TAdjacency >::bestCapacity().
Referenced by DGtal::DomainAdjacency< TDomain, TAdjacency >::bestCapacity().
|
private |
|
private |
|
inline |
v | any vertex |
Definition at line 155 of file DomainAdjacency.ih.
References DGtal::DomainAdjacency< TDomain, TAdjacency >::degree().
Referenced by DGtal::DomainAdjacency< TDomain, TAdjacency >::degree().
|
inline |
Definition at line 68 of file DomainAdjacency.ih.
References DGtal::DomainAdjacency< TDomain, TAdjacency >::domain().
Referenced by DGtal::DomainAdjacency< TDomain, TAdjacency >::domain().
|
inline |
p1 | any point in this space. |
p2 | any point in this space. |
Definition at line 86 of file DomainAdjacency.ih.
|
inline |
p1 | any point in this space. |
p2 | any point in this space. |
Definition at line 97 of file DomainAdjacency.ih.
|
inline |
Checks the validity/consistency of the object.
Definition at line 117 of file DomainAdjacency.ih.
|
private |
Assignment.
other | the object to copy. |
|
inline |
Useful if you want to restrict your neighborhood.
Definition at line 77 of file DomainAdjacency.ih.
|
inline |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
Definition at line 108 of file DomainAdjacency.ih.
|
inline |
Writes the neighbors of a vertex using an output iterator
OutputObjectIterator | the type of an output iterator writing in a container of vertices. |
it | the output iterator |
v | the vertex whose neighbors will be writen |
Writes the neighbors of a vertex using an output iterator
OutputObjectIterator | the type of an output iterator writing in a container of vertices. |
it | the output iterator |
v | the vertex whose neighbors will be written |
Definition at line 176 of file DomainAdjacency.ih.
References DGtal::DomainAdjacency< TDomain, TAdjacency >::writeNeighbors().
Referenced by DGtal::DomainAdjacency< TDomain, TAdjacency >::writeNeighbors().
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
OutputObjectIterator | 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 |
Definition at line 202 of file DomainAdjacency.ih.
|
private |
The adjacency relation.
Definition at line 233 of file DomainAdjacency.h.
|
private |
The predicate for testing if a point belongs to the domain.
Definition at line 228 of file DomainAdjacency.h.