DGtal  1.5.beta
DomainMetricAdjacency.h
1 
17 #pragma once
18 
31 #if defined(DomainMetricAdjacency_RECURSES)
32 #error Recursive header files inclusion detected in DomainMetricAdjacency.h
33 #else // defined(DomainMetricAdjacency_RECURSES)
35 #define DomainMetricAdjacency_RECURSES
36 
37 #if !defined DomainMetricAdjacency_h
39 #define DomainMetricAdjacency_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/base/ConstAlias.h"
47 
48 namespace DGtal
49 {
50  namespace deprecated
51  {
53  // template class DomainMetricAdjacency
74  template <typename Domain, Dimension maxNorm1,
75  Dimension dimension = Domain::Space::dimension >
77  {
79  // ----------------------- public types ------------------------------
80  public:
81  typedef typename Domain::Space Space;
82  typedef typename Space::Point Point;
83  typedef typename Space::Vector Vector;
84 
85  // ----------------------- Standard services ------------------------------
86  public:
87 
93 
99 
104 
105  // ----------------------- Adjacency services -----------------------------
106  public:
107 
115  bool isAdjacentTo( const Point & p1, const Point & p2 ) const;
116 
124  bool isProperlyAdjacentTo( const Point & p1, const Point & p2 ) const;
125 
136  template <typename OutputIterator>
137  void writeNeighborhood( const Point & p, OutputIterator & out_it ) const;
138 
149  template <typename OutputIterator>
150  void writeProperNeighborhood( const Point & p,
151  OutputIterator & out_it ) const;
152 
153  // ----------------------- Interface --------------------------------------
154  public:
155 
160  void selfDisplay ( std::ostream & out ) const;
161 
166  bool isValid() const;
167 
168  // ------------------------- Protected Datas ------------------------------
169  private:
170  // ------------------------- Private Datas --------------------------------
171  private:
172 
176  const Domain & myDomain;
177 
178  // ------------------------- Hidden services ------------------------------
179  protected:
180 
186 
187  private:
188 
189 
197 
198  // ------------------------- Internals ------------------------------------
199  private:
200 
201  }; // end of class DomainMetricAdjacency
202 
203 
210  template <typename Domain, Dimension maxNorm1>
211  std::ostream&
212  operator<< ( std::ostream & out,
213  const DomainMetricAdjacency< Domain, maxNorm1,
214  Domain::Space::dimension > & object );
215  } //deprecated
216 } // namespace DGtal
217 
218 
220 // Includes inline functions.
221 #include "DGtal/topology/DomainMetricAdjacency.ih"
222 
223 // //
225 
226 #endif // !defined DomainMetricAdjacency_h
227 
228 #undef DomainMetricAdjacency_RECURSES
229 #endif // else defined(DomainMetricAdjacency_RECURSES)
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition: ConstAlias.h:187
Aim: Describes digital adjacencies in a digital domain that are defined with the 1-norm and the infin...
bool isAdjacentTo(const Point &p1, const Point &p2) const
DomainMetricAdjacency(ConstAlias< Domain > aDomain)
void selfDisplay(std::ostream &out) const
void writeProperNeighborhood(const Point &p, OutputIterator &out_it) const
bool isProperlyAdjacentTo(const Point &p1, const Point &p2) const
DomainMetricAdjacency(const DomainMetricAdjacency &other)
void writeNeighborhood(const Point &p, OutputIterator &out_it) const
BOOST_CONCEPT_ASSERT((concepts::CDomain< Domain >))
DomainMetricAdjacency & operator=(const DomainMetricAdjacency &other)
std::ostream & operator<<(std::ostream &out, const DomainMetricAdjacency< Domain, maxNorm1, Domain::Space::dimension > &object)
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::uint32_t Dimension
Definition: Common.h:136
Aim: This concept represents a digital domain, i.e. a non mutable subset of points of the given digit...
Definition: CDomain.h:130
HyperRectDomain< Space > Domain