DGtal 1.3.0
Loading...
Searching...
No Matches
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)
35#define CMatrix_RECURSES
36
37#if !defined CMatrix_h
39#define CMatrix_h
40
42// Inclusions
43#include <iostream>
44#include "DGtal/base/Common.h"
45#include "DGtal/math/linalg/CVectorSpace.h"
47
48namespace DGtal
49{
50namespace concepts
51{
53// class CMatrix
89template <typename T>
91{
92 // ----------------------- Concept checks ------------------------------
93public:
94 typedef typename T::Scalar Scalar;
95 typedef typename T::Index Index;
96
98 {
99 z.setIdentity();
101 }
102
104 {
105 ConceptUtils::sameType(i, z.rows());
106 ConceptUtils::sameType(j, z.cols());
107 }
108 // ------------------------- Private Datas --------------------------------
109private:
110 T z;
112
113 // ------------------------- Internals ------------------------------------
114private:
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)
void sameType(const T &, const T &)
Definition: ConceptUtils.h:117
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: Represent any static or dynamic sized matrix having sparse or dense representation.
Definition: CMatrix.h:91
BOOST_CONCEPT_USAGE(CMatrix)
Definition: CMatrix.h:97
void checkConstConstraints() const
Definition: CMatrix.h:103
Aim: Base concept for vector space structure.
Definition: CVectorSpace.h:94