DGtal  1.5.beta
CVector.h
1 
17 #pragma once
18 
31 #if defined(CVector_RECURSES)
32 #error Recursive header files inclusion detected in CVector.h
33 #else // defined(CVector_RECURSES)
35 #define CVector_RECURSES
36 
37 #if !defined CVector_h
39 #define CVector_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/math/linalg/CVectorSpace.h"
47 
48 namespace DGtal
49 {
50 namespace concepts
51 {
53 // class CVector
89 template <typename T>
90 struct CVector : CVectorSpace<T>
91 {
92  // ----------------------- Concept checks ------------------------------
93 public:
94  typedef typename T::Scalar Scalar;
95  typedef typename T::Index Index;
96 
98  {
100  }
101 
103  {
104  ConceptUtils::sameType(i, z.rows());
105  }
106 
107  // ------------------------- Private Datas --------------------------------
108 private:
109  T z;
111 
112  // ------------------------- Internals ------------------------------------
113 private:
114 
115 }; // end of concept CVector
116 }
117 } // namespace DGtal
118 
119 // //
121 
122 #endif // !defined CVector_h
123 
124 #undef CVector_RECURSES
125 #endif // else defined(CVector_RECURSES)
SMesh::Index Index
void sameType(const T &, const T &)
Definition: ConceptUtils.h:117
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: Base concept for vector space structure.
Definition: CVectorSpace.h:93
Aim: Represent any static or dynamic sized column vector having sparse or dense representation.
Definition: CVector.h:91
BOOST_CONCEPT_USAGE(CVector)
Definition: CVector.h:97
void checkConstConstraints() const
Definition: CVector.h:102