DGtal  0.9.2
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/PointVector.h"
50 
51 namespace DGtal
52 {
53 
55  // class SpaceND
93  template < Dimension dim,
94  typename TInteger = DGtal::int32_t >
95  class SpaceND
96  {
97  //Integer must be a model of the concept CInteger.
99 
100  public:
102  typedef TInteger Integer;
105 
107  typedef UnsignedInteger Size;
108 
111 
114 
118 
122 
126  typedef Space Self;
127 
130 
132  static const Dimension dimension=dim;
133 
135  template <Dimension codimension>
136  struct Subcospace
137  {
138  typedef SpaceND < dim - codimension, Integer > Type;
139  };
140 
142  template <Dimension subdimension>
143  struct Subspace
144  {
146  };
147 
148 
149  // ----------------------- Standard services ------------------------------
150  public:
151 
152  // ----------------------- Interface --------------------------------------
153  public:
154 
159  static void selfDisplay( std::ostream & out )
160  {
161  out << "[SpaceND dim=" << dimension << " size of Integers=" << sizeof( Integer ) << " ]";
162  }
163 
164  private:
171  SpaceND & operator=( const SpaceND & other );
172 
173  private:
178  SpaceND();
179 
183  ~SpaceND();
184 
185 
186  // ------------------------- Internals ------------------------------------
187  private:
188 
189  }; // end of class SpaceND
190 
191  // ///static constants to store the dimension.
192  // template < Dimension dim,
193  // typename TInteger >
194  // const Dimension SpaceND<dim, TInteger>::dimension = dim;
195 
196 
197 } // namespace DGtal
198 
199 
200 // //
202 
203 #endif // !defined SpaceND_h
204 
205 #undef SpaceND_RECURSES
206 #endif // else defined(SpaceND_RECURSES)
static const Dimension dimension
static constants to store the dimension.
Definition: SpaceND.h:132
SpaceND & operator=(const SpaceND &other)
Aim: SpaceND is a utility class that defines the fundamental structure of a Digital Space in ND...
Definition: SpaceND.h:95
SpaceND< subdimension, Integer > Type
Definition: SpaceND.h:145
NumberTraits< Integer >::UnsignedVersion UnsignedInteger
Unsigned version of the Integers.
Definition: SpaceND.h:104
DGtal::uint32_t Dimension
Definition: Common.h:113
BOOST_CONCEPT_ASSERT((concepts::CInteger< TInteger >))
SpaceND< dim, Integer > Space
Type to denote the space itself.
Definition: SpaceND.h:124
PointVector< dim, double > RealPoint
Definition: SpaceND.h:117
PointVector< dim, Integer > Vector
Vectors in DGtal::SpaceND.
Definition: SpaceND.h:113
Aim: Concept checking for Integer Numbers. More precisely, this concept is a refinement of both CEucl...
Definition: CInteger.h:87
DGtal::Dimension Dimension
Copy of the type used for the dimension.
Definition: SpaceND.h:129
Define the type of a subspace.
Definition: SpaceND.h:143
Aim: The traits class for all models of Cinteger.
Definition: NumberTraits.h:69
Space Self
Defined for convenience (same as Space).
Definition: SpaceND.h:126
TInteger Integer
Arithmetic ring induced by (+,-,*) and Integer numbers.
Definition: SpaceND.h:102
Define the type of a sub co-Space.
Definition: SpaceND.h:136
SpaceND< dim-codimension, Integer > Type
Definition: SpaceND.h:138
DGtal is the top-level namespace which contains all DGtal functions and types.
UnsignedInteger Size
Type used to represent sizes in the digital space.
Definition: SpaceND.h:107
PointVector< dim, double > RealVector
Definition: SpaceND.h:121
PointVector< dim, Integer > Point
Points in DGtal::SpaceND.
Definition: SpaceND.h:110
boost::int32_t int32_t
signed 32-bit integer.
Definition: BasicTypes.h:72
static void selfDisplay(std::ostream &out)
Definition: SpaceND.h:159