DGtal  0.9.4beta
Data Structures | Public Types | Static Public Member Functions | Static Public Attributes | Private Member Functions
DGtal::SpaceND< dim, TInteger > Class Template Reference

#include <DGtal/kernel/SpaceND.h>

Inheritance diagram for DGtal::SpaceND< dim, TInteger >:
[legend]

Data Structures

struct  Subcospace
 
struct  Subspace
 

Public Types

typedef TInteger Integer
 
typedef NumberTraits< Integer >::UnsignedVersion UnsignedInteger
 
typedef UnsignedInteger Size
 
typedef PointVector< dim, IntegerPoint
 
typedef PointVector< dim, IntegerVector
 
typedef PointVector< dim, double > RealPoint
 
typedef PointVector< dim, double > RealVector
 
typedef SpaceND< dim, IntegerSpace
 
typedef Space Self
 
typedef DGtal::Dimension Dimension
 

Static Public Member Functions

static void selfDisplay (std::ostream &out)
 

Static Public Attributes

static const Dimension dimension =dim
 

Private Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CInteger< TInteger >))
 
SpaceNDoperator= (const SpaceND &other)
 
 SpaceND ()
 
 ~SpaceND ()
 

Detailed Description

template<Dimension dim, typename TInteger = DGtal::int32_t>
class DGtal::SpaceND< dim, TInteger >

Aim: SpaceND is a utility class that defines the fundamental structure of a Digital Space in ND.

Description of class 'SpaceND'

This class just defines fundamental types associated to a digital space in dimension n. For instance, it specifies the type of a Point lying in this space, the type of a Vector or the type of subspace.

Template Parameters
dimstatic constant of type DGtal::Dimension that specifies the static dimension of the space.
TIntegerspecifies the integer number type to use as a ring for the computations or as coordinates type. Integer must be a model of concepts::CInteger and concepts::CSignedInteger concepts.

Example of use:

#include <DGtal/kernel/SpaceND.h>
//...
//We define the type of a digital domain on dimension 4 using the
//"int" arithmetic ring.
typedef SpaceND<4, int> Space4Int;
//We deduce the type to represent points in this space
typedef Space4::Point Point4Int;
//and we use it (see PointVector documentation).
Point4Int a= {2, 3 , -5 , 6};
Examples:
doc-examples/demo-kernel-1.cpp, doc-examples/range.cpp, geometry/curves/estimation/exampleCurvature.cpp, geometry/surfaces/dvcm-2d-curvature.cpp, geometry/surfaces/dvcm-3d.cpp, geometry/tools/determinant/exampleInHalfPlane.cpp, geometry/volumes/dvcm-2d.cpp, io/viewers/demo-kernel-2.cpp, and topology/3dBorderExtraction.cpp.

Definition at line 95 of file SpaceND.h.

Member Typedef Documentation

template<Dimension dim, typename TInteger = DGtal::int32_t>
typedef DGtal::Dimension DGtal::SpaceND< dim, TInteger >::Dimension

Copy of the type used for the dimension.

Definition at line 129 of file SpaceND.h.

template<Dimension dim, typename TInteger = DGtal::int32_t>
typedef TInteger DGtal::SpaceND< dim, TInteger >::Integer

Arithmetic ring induced by (+,-,*) and Integer numbers.

Definition at line 102 of file SpaceND.h.

template<Dimension dim, typename TInteger = DGtal::int32_t>
typedef PointVector<dim,Integer> DGtal::SpaceND< dim, TInteger >::Point

Points in DGtal::SpaceND.

Definition at line 110 of file SpaceND.h.

template<Dimension dim, typename TInteger = DGtal::int32_t>
typedef PointVector<dim, double> DGtal::SpaceND< dim, TInteger >::RealPoint

Point with "double" as coordinate type with the same dimension as SpaceND.

Definition at line 117 of file SpaceND.h.

template<Dimension dim, typename TInteger = DGtal::int32_t>
typedef PointVector<dim, double> DGtal::SpaceND< dim, TInteger >::RealVector

Point with "double" as coordinate type with the same dimension as SpaceND.

Definition at line 121 of file SpaceND.h.

template<Dimension dim, typename TInteger = DGtal::int32_t>
typedef Space DGtal::SpaceND< dim, TInteger >::Self

Defined for convenience (same as Space).

Definition at line 126 of file SpaceND.h.

template<Dimension dim, typename TInteger = DGtal::int32_t>
typedef UnsignedInteger DGtal::SpaceND< dim, TInteger >::Size

Type used to represent sizes in the digital space.

Definition at line 107 of file SpaceND.h.

template<Dimension dim, typename TInteger = DGtal::int32_t>
typedef SpaceND<dim, Integer> DGtal::SpaceND< dim, TInteger >::Space

Type to denote the space itself.

Definition at line 124 of file SpaceND.h.

template<Dimension dim, typename TInteger = DGtal::int32_t>
typedef NumberTraits<Integer>::UnsignedVersion DGtal::SpaceND< dim, TInteger >::UnsignedInteger

Unsigned version of the Integers.

Definition at line 104 of file SpaceND.h.

template<Dimension dim, typename TInteger = DGtal::int32_t>
typedef PointVector<dim,Integer> DGtal::SpaceND< dim, TInteger >::Vector

Vectors in DGtal::SpaceND.

Definition at line 113 of file SpaceND.h.

Constructor & Destructor Documentation

template<Dimension dim, typename TInteger = DGtal::int32_t>
DGtal::SpaceND< dim, TInteger >::SpaceND ( )
private

Constructor

template<Dimension dim, typename TInteger = DGtal::int32_t>
DGtal::SpaceND< dim, TInteger >::~SpaceND ( )
private

Destructor.

Member Function Documentation

template<Dimension dim, typename TInteger = DGtal::int32_t>
DGtal::SpaceND< dim, TInteger >::BOOST_CONCEPT_ASSERT ( (concepts::CInteger< TInteger >)  )
private
template<Dimension dim, typename TInteger = DGtal::int32_t>
SpaceND& DGtal::SpaceND< dim, TInteger >::operator= ( const SpaceND< dim, TInteger > &  other)
private

Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'. Forbidden by default.
template<Dimension dim, typename TInteger = DGtal::int32_t>
static void DGtal::SpaceND< dim, TInteger >::selfDisplay ( std::ostream &  out)
inlinestatic

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

Definition at line 159 of file SpaceND.h.

160  {
161  out << "[SpaceND dim=" << dimension << " size of Integers=" << sizeof( Integer ) << " ]";
162  }
static const Dimension dimension
static constants to store the dimension.
Definition: SpaceND.h:132
TInteger Integer
Arithmetic ring induced by (+,-,*) and Integer numbers.
Definition: SpaceND.h:102

Field Documentation

template<Dimension dim, typename TInteger = DGtal::int32_t>
const Dimension DGtal::SpaceND< dim, TInteger >::dimension =dim
static

The documentation for this class was generated from the following file: