DGtal
1.3.beta
src
DGtal
math
linalg
CMatrix.h
1
17
#pragma once
18
31
#if defined(CMatrix_RECURSES)
32
#error Recursive header files inclusion detected in CMatrix.h
33
#else // defined(CMatrix_RECURSES)
34
35
#define CMatrix_RECURSES
36
37
#if !defined CMatrix_h
38
39
#define CMatrix_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 CMatrix
89
template
<
typename
T>
90
struct
CMatrix
:
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
(
CMatrix
)
98
{
99
z.setIdentity();
100
checkConstConstraints
();
101
}
102
103
void
checkConstConstraints
()
const
104
{
105
ConceptUtils::sameType
(
i
, z.rows());
106
ConceptUtils::sameType
(
j
, z.cols());
107
}
108
// ------------------------- Private Datas --------------------------------
109
private
:
110
T
z
;
111
Index
i
,
j
;
112
113
// ------------------------- Internals ------------------------------------
114
private
:
115
116
};
// end of concept CMatrix
117
}
118
}
// namespace DGtal
119
120
// //
122
123
#endif // !defined CMatrix_h
124
125
#undef CMatrix_RECURSES
126
#endif // else defined(CMatrix_RECURSES)
DGtal::concepts::CMatrix::j
Index j
Definition:
CMatrix.h:111
Index
SMesh::Index Index
Definition:
fullConvexitySphereGeodesics.cpp:117
DGtal::concepts::CMatrix::i
Index i
Definition:
CMatrix.h:111
DGtal::concepts::CMatrix::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CMatrix)
Definition:
CMatrix.h:97
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::concepts::CMatrix::Index
T::Index Index
Definition:
CMatrix.h:95
DGtal::concepts::ConceptUtils::sameType
void sameType(const T &, const T &)
Definition:
ConceptUtils.h:117
DGtal::concepts::CMatrix::checkConstConstraints
void checkConstConstraints() const
Definition:
CMatrix.h:103
DGtal::concepts::CMatrix::Scalar
T::Scalar Scalar
Definition:
CMatrix.h:94
DGtal::concepts::CMatrix
Aim: Represent any static or dynamic sized matrix having sparse or dense representation.
Definition:
CMatrix.h:90
DGtal::concepts::CVectorSpace
Aim: Base concept for vector space structure.
Definition:
CVectorSpace.h:93
DGtal::concepts::CMatrix::z
T z
Definition:
CMatrix.h:110
Generated on Mon Jun 20 2022 18:23:25 for DGtal by
1.8.17