DGtal
1.1.0
src
DGtal
math
linalg
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)
34
35
#define CVector_RECURSES
36
37
#if !defined CVector_h
38
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
97
BOOST_CONCEPT_USAGE
(
CVector
)
98
{
99
checkConstConstraints
();
100
}
101
102
void
checkConstConstraints
()
const
103
{
104
ConceptUtils::sameType
(
i
, z.rows());
105
}
106
107
// ------------------------- Private Datas --------------------------------
108
private
:
109
T
z
;
110
Index
i
;
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)
DGtal::concepts::CVector::Index
T::Index Index
Definition:
CVector.h:95
DGtal::concepts::CVector::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CVector)
Definition:
CVector.h:97
DGtal::concepts::CVector
Aim: Represent any static or dynamic sized column vector having sparse or dense representation.
Definition:
CVector.h:91
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition:
ClosedIntegerHalfPlane.h:49
DGtal::concepts::CVector::z
T z
Definition:
CVector.h:109
DGtal::concepts::ConceptUtils::sameType
void sameType(const T &, const T &)
Definition:
ConceptUtils.h:117
DGtal::concepts::CVector::i
Index i
Definition:
CVector.h:110
DGtal::concepts::CVector::Scalar
T::Scalar Scalar
Definition:
CVector.h:94
DGtal::concepts::CVector::checkConstConstraints
void checkConstConstraints() const
Definition:
CVector.h:102
DGtal::concepts::CVectorSpace
Aim: Base concept for vector space structure.
Definition:
CVectorSpace.h:94
Generated on Fri Oct 9 2020 08:57:49 for DGtal by
1.8.20