DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
CLinearAlgebra.h
1
16
17
#pragma once
18
30
31
#if defined(CLinearAlgebra_RECURSES)
32
#error Recursive header files inclusion detected in CLinearAlgebra.h
33
#else
// defined(CLinearAlgebra_RECURSES)
35
#define CLinearAlgebra_RECURSES
36
37
#if !defined CLinearAlgebra_h
39
#define CLinearAlgebra_h
40
42
// Inclusions
43
#include <iostream>
44
#include "DGtal/base/Common.h"
45
#include "DGtal/math/linalg/CMatrix.h"
46
#include "DGtal/math/linalg/CVector.h"
48
49
namespace
DGtal
50
{
51
namespace
concepts
52
{
54
// class CLinearAlgebra
92
template
<
typename
V,
typename
M>
93
struct
CLinearAlgebra
94
{
95
// ----------------------- Concept checks ------------------------------
96
public
:
97
typedef
V
Vector
;
98
typedef
M
Matrix
;
99
100
BOOST_CONCEPT_ASSERT
((
CVector<Vector>
));
101
BOOST_CONCEPT_ASSERT
((
CMatrix<Matrix>
));
102
103
BOOST_STATIC_ASSERT
(( boost::is_same<typename Vector::Scalar, typename Matrix::Scalar>::value ));
104
105
BOOST_CONCEPT_USAGE
(
CLinearAlgebra
)
106
{
107
x
=
a
*
y
;
108
c
=
a
*
b
;
109
}
110
// ------------------------- Private Data --------------------------------
111
private
:
112
Matrix
c
;
113
const
Matrix
a
,
b
;
114
Vector
x
;
115
const
Vector
y
;
116
117
// ------------------------- Internals ------------------------------------
118
private
:
119
120
};
// end of concept CLinearAlgebra
121
}
122
}
// namespace DGtal
123
124
// //
126
127
#endif
// !defined CLinearAlgebra_h
128
129
#undef CLinearAlgebra_RECURSES
130
#endif
// else defined(CLinearAlgebra_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::CLinearAlgebra
Aim: Check right multiplication between matrix and vector and internal matrix multiplication....
Definition
CLinearAlgebra.h:94
DGtal::concepts::CLinearAlgebra::Vector
V Vector
Definition
CLinearAlgebra.h:97
DGtal::concepts::CLinearAlgebra::BOOST_STATIC_ASSERT
BOOST_STATIC_ASSERT((boost::is_same< typename Vector::Scalar, typename Matrix::Scalar >::value))
DGtal::concepts::CLinearAlgebra::y
const Vector y
Definition
CLinearAlgebra.h:115
DGtal::concepts::CLinearAlgebra::c
Matrix c
Definition
CLinearAlgebra.h:112
DGtal::concepts::CLinearAlgebra::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((CVector< Vector >))
DGtal::concepts::CLinearAlgebra::x
Vector x
Definition
CLinearAlgebra.h:114
DGtal::concepts::CLinearAlgebra::Matrix
M Matrix
Definition
CLinearAlgebra.h:98
DGtal::concepts::CLinearAlgebra::a
const Matrix a
Definition
CLinearAlgebra.h:113
DGtal::concepts::CLinearAlgebra::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((CMatrix< Matrix >))
DGtal::concepts::CLinearAlgebra::b
const Matrix b
Definition
CLinearAlgebra.h:113
DGtal::concepts::CLinearAlgebra::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CLinearAlgebra)
Definition
CLinearAlgebra.h:105
DGtal::concepts::CMatrix
Aim: Represent any static or dynamic sized matrix having sparse or dense representation.
Definition
CMatrix.h:91
DGtal::concepts::CVector
Aim: Represent any static or dynamic sized column vector having sparse or dense representation.
Definition
CVector.h:91
src
DGtal
math
linalg
CLinearAlgebra.h
Generated on
for DGtal by
1.18.0