DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
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)
34 
35 #define DomainMetricAdjacency_RECURSES
36 
37 #if !defined DomainMetricAdjacency_h
38 
39 #define DomainMetricAdjacency_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
46 
47 namespace DGtal
48 {
49  namespace deprecated
50  {
52  // template class DomainMetricAdjacency
73  template <typename Domain, Dimension maxNorm1,
74  Dimension dimension = Domain::Space::dimension >
76  {
78  // ----------------------- public types ------------------------------
79  public:
80  typedef typename Domain::Space Space;
81  typedef typename Space::Point Point;
82  typedef typename Space::Vector Vector;
83 
84  // ----------------------- Standard services ------------------------------
85  public:
86 
91  DomainMetricAdjacency( const Domain & aDomain );
92 
98 
103 
104  // ----------------------- Adjacency services -----------------------------
105  public:
106 
114  bool isAdjacentTo( const Point & p1, const Point & p2 ) const;
115 
123  bool isProperlyAdjacentTo( const Point & p1, const Point & p2 ) const;
124 
135  template <typename OutputIterator>
136  void writeNeighborhood( const Point & p, OutputIterator & out_it ) const;
137 
148  template <typename OutputIterator>
149  void writeProperNeighborhood( const Point & p,
150  OutputIterator & out_it ) const;
151 
152  // ----------------------- Interface --------------------------------------
153  public:
154 
159  void selfDisplay ( std::ostream & out ) const;
160 
165  bool isValid() const;
166 
167  // ------------------------- Protected Datas ------------------------------
168  private:
169  // ------------------------- Private Datas --------------------------------
170  private:
171 
175  const Domain & myDomain;
176 
177  // ------------------------- Hidden services ------------------------------
178  protected:
179 
185 
186  private:
187 
188 
196 
197  // ------------------------- Internals ------------------------------------
198  private:
199 
200  }; // end of class DomainMetricAdjacency
201 
202 
209  template <typename Domain, Dimension maxNorm1>
210  std::ostream&
211  operator<< ( std::ostream & out,
212  const DomainMetricAdjacency< Domain, maxNorm1,
213  Domain::Space::dimension > & object );
214  } //deprecated
215 } // namespace DGtal
216 
217 
219 // Includes inline functions.
220 #include "DGtal/topology/DomainMetricAdjacency.ih"
221 
222 // //
224 
225 #endif // !defined DomainMetricAdjacency_h
226 
227 #undef DomainMetricAdjacency_RECURSES
228 #endif // else defined(DomainMetricAdjacency_RECURSES)