DGtal 1.3.0
Loading...
Searching...
No Matches
CVectorSpace.h
1
17#pragma once
18
31#if defined(CVectorSpace_RECURSES)
32#error Recursive header files inclusion detected in CVectorSpace.h
33#else // defined(CVectorSpace_RECURSES)
35#define CVectorSpace_RECURSES
36
37#if !defined CVectorSpace_h
39#define CVectorSpace_h
40
42// Inclusions
43#include <iostream>
44#include "DGtal/base/Common.h"
45#include "DGtal/kernel/CEuclideanRing.h"
47
48namespace DGtal
49{
50 namespace concepts
51 {
53 // class CVectorSpace
92 template <typename T>
94 {
95 // ----------------------- Concept checks ------------------------------
96 public:
97 typedef typename T::Scalar Scalar;
98
100
102 {
103 z.clear();
104 z = x + y;
105 z = x - y;
106 z = a * x;
107 }
108 // ------------------------- Private Datas --------------------------------
109 private:
110 const T x,y;
111 T z;
113
114 // ------------------------- Internals ------------------------------------
115 private:
116
117 }; // end of concept CVectorSpace
118 }
119} // namespace DGtal
120
121// //
123
124#endif // !defined CVectorSpace_h
125
126#undef CVectorSpace_RECURSES
127#endif // else defined(CVectorSpace_RECURSES)
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: Defines the mathematical concept equivalent to a unitary commutative ring with a division operat...
Aim: Base concept for vector space structure.
Definition: CVectorSpace.h:94
BOOST_CONCEPT_ASSERT((concepts::CEuclideanRing< Scalar >))
Go to http://www.sgi.com/tech/stl/Assignable.html.
Definition: Boost.dox:32