DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
SpaceND.h
1 
17 #pragma once
18 
33 #if defined(SpaceND_RECURSES)
34 #error Recursive header files inclusion detected in SpaceND.h
35 #else // defined(SpaceND_RECURSES)
36 
37 #define SpaceND_RECURSES
38 
39 #if !defined SpaceND_h
40 
41 #define SpaceND_h
42 
44 // Inclusions
45 #include <iostream>
46 #include "DGtal/base/Common.h"
47 #include "DGtal/kernel/CInteger.h"
48 #include "DGtal/kernel/CUnsignedInteger.h"
49 #include "DGtal/kernel/CSignedInteger.h"
50 #include "DGtal/kernel/CCommutativeRing.h"
51 #include "DGtal/kernel/PointVector.h"
53 
54 namespace DGtal
55 {
56 
58  // class SpaceND
96  template < Dimension dim,
97  typename TInteger = DGtal::int32_t >
98  class SpaceND
99  {
100  //Integer must be a model of the concept CInteger.
102 
103  //Integer must be signed to characterize a ring.
105 
106  public:
108  typedef TInteger Integer;
111 
114 
117 
120 
124 
128 
132  typedef Space Self;
133 
136 
138  static const Dimension dimension = dim;
139 
141  template <Dimension codimension>
142  struct Subcospace
143  {
144  typedef SpaceND < dim - codimension, Integer > Type;
145  };
146 
148  template <Dimension subdimension>
149  struct Subspace
150  {
152  };
153 
154 
155  // ----------------------- Standard services ------------------------------
156  public:
157 
158  // ----------------------- Interface --------------------------------------
159  public:
160 
165  static void selfDisplay( std::ostream & out )
166  {
167  out << "[SpaceND dim=" << dimension << " size of Integers=" << sizeof( Integer ) << " ]";
168  }
169 
170  private:
177  SpaceND & operator=( const SpaceND & other );
178 
179  private:
184  SpaceND();
185 
189  ~SpaceND();
190 
191 
192  // ------------------------- Internals ------------------------------------
193  private:
194 
195  }; // end of class SpaceND
196 
197 } // namespace DGtal
198 
199 
200 // //
202 
203 #endif // !defined SpaceND_h
204 
205 #undef SpaceND_RECURSES
206 #endif // else defined(SpaceND_RECURSES)