DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
CVectorSpace.h
1
16
17
#pragma once
18
30
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
48
namespace
DGtal
49
{
50
namespace
concepts
51
{
53
// class CVectorSpace
91
template
<
typename
T>
92
struct
CVectorSpace
:
boost::Assignable
<T>
93
{
94
// ----------------------- Concept checks ------------------------------
95
public
:
96
typedef
typename
T::Scalar
Scalar
;
97
98
BOOST_CONCEPT_ASSERT
((
concepts::CEuclideanRing<Scalar>
));
99
100
BOOST_CONCEPT_USAGE
(
CVectorSpace
)
101
{
102
z
=
x
+
y
;
103
z
=
x
-
y
;
104
z
=
a
*
x
;
105
}
106
// ------------------------- Private Data --------------------------------
107
private
:
108
const
T
x
,
y
;
109
T
z
;
110
Scalar
a
;
111
112
// ------------------------- Internals ------------------------------------
113
private
:
114
115
};
// end of concept CVectorSpace
116
}
117
}
// namespace DGtal
118
119
// //
121
122
#endif
// !defined CVectorSpace_h
123
124
#undef CVectorSpace_RECURSES
125
#endif
// else defined(CVectorSpace_RECURSES)
DGtal::concepts
Aim: Gathers several functions useful for concept checks.
Definition
CPositiveIrreducibleFraction.h:54
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::concepts::CEuclideanRing
Aim: Defines the mathematical concept equivalent to a unitary commutative ring with a division operat...
Definition
CEuclideanRing.h:88
DGtal::concepts::CVectorSpace
Aim: Base concept for vector space structure.
Definition
CVectorSpace.h:93
DGtal::concepts::CVectorSpace::Scalar
T::Scalar Scalar
Definition
CVectorSpace.h:96
DGtal::concepts::CVectorSpace::y
const T y
Definition
CVectorSpace.h:108
DGtal::concepts::CVectorSpace::z
T z
Definition
CVectorSpace.h:109
DGtal::concepts::CVectorSpace::a
Scalar a
Definition
CVectorSpace.h:110
DGtal::concepts::CVectorSpace::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CVectorSpace)
Definition
CVectorSpace.h:100
DGtal::concepts::CVectorSpace::x
const T x
Definition
CVectorSpace.h:108
DGtal::concepts::CVectorSpace::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CEuclideanRing< Scalar >))
boost::Assignable
Go to http://www.sgi.com/tech/stl/Assignable.html.
Definition
Boost.dox:32
src
DGtal
math
linalg
CVectorSpace.h
Generated on
for DGtal by
1.18.0