DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
DigitalTopology.ih
1 
30 
31 #include <cstdlib>
33 
35 // IMPLEMENTATION of inline methods.
37 
39 // ----------------------- Standard services ------------------------------
40 
44 template <typename TForegroundAdjacency, typename TBackgroundAdjacency>
45 inline
48 {
49 }
50 
63 template <typename TForegroundAdjacency, typename TBackgroundAdjacency>
64 inline
67  const BackgroundAdjacency & aLambda,
69  : myKappa( aKappa ), myLambda( aLambda ),
70  myProps( props )
71 {
72 }
73 
74 
75 
80 template <typename TForegroundAdjacency, typename TBackgroundAdjacency>
81 inline
84  : myKappa( other.myKappa ), myLambda( other.myLambda ),
85  myProps( other.myProps )
86 {
87 }
88 
89 
93 template <typename TForegroundAdjacency, typename TBackgroundAdjacency>
94 inline
95 const TForegroundAdjacency &
97 {
98  return myKappa;
99 }
100 
104 template <typename TForegroundAdjacency, typename TBackgroundAdjacency>
105 inline
106 const TBackgroundAdjacency &
108 {
109  return myLambda;
110 }
111 
116 template <typename TForegroundAdjacency, typename TBackgroundAdjacency>
117 inline
120 {
121  return myProps;
122 }
123 
128 template <typename TForegroundAdjacency, typename TBackgroundAdjacency>
129 inline
131 ::ReverseTopology
134 {
135  return ReverseTopology( myLambda, myKappa, myProps );
136 }
137 
139 // Interface - public :
140 
145 template <typename TForegroundAdjacency, typename TBackgroundAdjacency>
146 inline
147 void
149 ::selfDisplay ( std::ostream & out ) const
150 {
151  out << "[DigitalTopology kappa=" << myKappa
152  << " lambda=" << myLambda;
153  if ( properties() == JORDAN_DT ) out << " [Jordan]";
154  else if ( properties() == NOT_JORDAN_DT ) out << " [Not Jordan]";
155  else if ( properties() == UNKNOWN_DT ) out << " [Unknown]";
156  else out << properties();
157  out << " ]";
158 }
159 
164 template <typename TForegroundAdjacency, typename TBackgroundAdjacency>
165 inline
166 bool
168 ::isValid() const
169 {
170  return true;
171 }
172 
173 
174 
176 // Implementation of inline functions //
177 
178 template <typename TForegroundAdjacency, typename TBackgroundAdjacency>
179 inline
180 std::ostream&
181 DGtal::operator<< ( std::ostream & out,
183 {
184  object.selfDisplay( out );
185  return out;
186 }
187 
188 // //
190 
191