DGtal 1.4.0
|
Aim: Describes digital adjacencies in digital spaces that are defined with the 1-norm and the infinity-norm. More...
#include <DGtal/topology/MetricAdjacency.h>
Data Structures | |
struct | VertexMap |
Public Types | |
typedef TSpace | Space |
typedef Space::Point | Point |
typedef MetricAdjacency< Space, maxNorm1, dimension > | Adjacency |
typedef Space::Vector | Vector |
typedef Point | Vertex |
typedef Space::Size | Size |
typedef std::set< Vertex > | VertexSet |
Public Member Functions | |
MetricAdjacency () | |
~MetricAdjacency () | |
Static Public Member Functions | |
static bool | isAdjacentTo (const Point &p1, const Point &p2) |
static bool | isProperlyAdjacentTo (const Point &p1, const Point &p2) |
static Size | bestCapacity () |
static Size | degree (const Vertex &v) |
template<typename OutputIterator > | |
static void | writeNeighbors (OutputIterator &it, const Vertex &v) |
template<typename OutputIterator , typename VertexPredicate > | |
static void | writeNeighbors (OutputIterator &it, const Vertex &v, const VertexPredicate &pred) |
static void | selfDisplay (std::ostream &out) |
static bool | isValid () |
Static Protected Member Functions | |
static Size | computeCapacity () |
Private Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CSpace< TSpace >)) | |
MetricAdjacency (const MetricAdjacency &other) | |
MetricAdjacency & | operator= (const MetricAdjacency &other) |
Aim: Describes digital adjacencies in digital spaces that are defined with the 1-norm and the infinity-norm.
Description of template class 'MetricAdjacency'
It induces the classical 4 and 8 adjacencies in 2D, the 6, 18 and 26 adjacencies in 3D, and the \( \omega \) and \( \alpha \) adjacencies in nD.
Model of concepts::CAdjacency.
TSpace | any digital space (see concept CSpace). |
maxNorm1 | defines which points are adjacent. More precisely, two points are adjacent iff their norm-infinity is less or equal than 1 and if their norm-1 is less or equal than maxNorm1. |
Definition at line 79 of file MetricAdjacency.h.
typedef MetricAdjacency<Space, maxNorm1, dimension> DGtal::MetricAdjacency< TSpace, maxNorm1, dimension >::Adjacency |
Definition at line 87 of file MetricAdjacency.h.
typedef Space::Point DGtal::MetricAdjacency< TSpace, maxNorm1, dimension >::Point |
Definition at line 86 of file MetricAdjacency.h.
typedef Space::Size DGtal::MetricAdjacency< TSpace, maxNorm1, dimension >::Size |
Definition at line 94 of file MetricAdjacency.h.
typedef TSpace DGtal::MetricAdjacency< TSpace, maxNorm1, dimension >::Space |
Definition at line 85 of file MetricAdjacency.h.
typedef Space::Vector DGtal::MetricAdjacency< TSpace, maxNorm1, dimension >::Vector |
Definition at line 90 of file MetricAdjacency.h.
typedef Point DGtal::MetricAdjacency< TSpace, maxNorm1, dimension >::Vertex |
Definition at line 93 of file MetricAdjacency.h.
typedef std::set<Vertex> DGtal::MetricAdjacency< TSpace, maxNorm1, dimension >::VertexSet |
Definition at line 95 of file MetricAdjacency.h.
DGtal::MetricAdjacency< TSpace, maxNorm1, dimension >::MetricAdjacency | ( | ) |
Constructor. Does nothing. Due to the symmetry and translation invariance of this digital topology, all methods are static.
DGtal::MetricAdjacency< TSpace, maxNorm1, dimension >::~MetricAdjacency | ( | ) |
Destructor.
|
private |
Copy constructor.
other | the object to clone. Forbidden by default. |
|
static |
|
private |
|
staticprotected |
|
static |
v | any vertex |
|
static |
p1 | any point in this space. |
p2 | any point in this space. |
|
static |
p1 | any point in this space. |
p2 | any point in this space. |
|
static |
Checks the validity/consistency of the object.
|
private |
Assignment.
other | the object to copy. |
|
static |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
|
static |
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 |
|
static |
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 |