DGtal 1.3.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes
DGtal::concepts::CLinearAlgebra< V, M > Struct Template Reference

Aim: Check right multiplication between matrix and vector and internal matrix multiplication. Matrix and vector scalar types should be the same. More...

#include <DGtal/math/linalg/CLinearAlgebra.h>

Public Types

typedef V Vector
 
typedef M Matrix
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((CVector< Vector >))
 
 BOOST_CONCEPT_ASSERT ((CMatrix< Matrix >))
 
 BOOST_STATIC_ASSERT ((boost::is_same< typename Vector::Scalar, typename Matrix::Scalar >::value))
 
 BOOST_CONCEPT_USAGE (CLinearAlgebra)
 

Private Attributes

Matrix c
 
const Matrix a
 
const Matrix b
 
Vector x
 
const Vector y
 

Detailed Description

template<typename V, typename M>
struct DGtal::concepts::CLinearAlgebra< V, M >

Aim: Check right multiplication between matrix and vector and internal matrix multiplication. Matrix and vector scalar types should be the same.

Description of concept 'CLinearAlgebra'

Refinement of

Associated types

Notation

Definitions

Valid expressions and semantics

Name Expression Type requirements Return type Precondition Semantics Post condition Complexity
Matrix vector right multiplication x = a * y Vector
Matrix matrix multiplication c = a * b Matrix

Invariants

Models

Notes

Todo:

There should be two types of vector: input vector type and output vector type.

This works fine for dynamic vector spaces, but not so much for static sized vectors and matrices.

Template Parameters
Vthe type that should be a model of CVector
Mthe type that should be a model of CMatrix

Definition at line 93 of file CLinearAlgebra.h.

Member Typedef Documentation

◆ Matrix

template<typename V , typename M >
typedef M DGtal::concepts::CLinearAlgebra< V, M >::Matrix

Definition at line 98 of file CLinearAlgebra.h.

◆ Vector

template<typename V , typename M >
typedef V DGtal::concepts::CLinearAlgebra< V, M >::Vector

Definition at line 97 of file CLinearAlgebra.h.

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT() [1/2]

template<typename V , typename M >
DGtal::concepts::CLinearAlgebra< V, M >::BOOST_CONCEPT_ASSERT ( (CMatrix< Matrix >)  )

◆ BOOST_CONCEPT_ASSERT() [2/2]

template<typename V , typename M >
DGtal::concepts::CLinearAlgebra< V, M >::BOOST_CONCEPT_ASSERT ( (CVector< Vector >)  )

◆ BOOST_CONCEPT_USAGE()

template<typename V , typename M >
DGtal::concepts::CLinearAlgebra< V, M >::BOOST_CONCEPT_USAGE ( CLinearAlgebra< V, M >  )
inline

Definition at line 105 of file CLinearAlgebra.h.

106 {
107 x = a * y;
108 c = a * b;
109 }

References DGtal::concepts::CLinearAlgebra< V, M >::b, and DGtal::concepts::CLinearAlgebra< V, M >::y.

◆ BOOST_STATIC_ASSERT()

template<typename V , typename M >
DGtal::concepts::CLinearAlgebra< V, M >::BOOST_STATIC_ASSERT ( (boost::is_same< typename Vector::Scalar, typename Matrix::Scalar >::value)  )

Field Documentation

◆ a

template<typename V , typename M >
const Matrix DGtal::concepts::CLinearAlgebra< V, M >::a
private

Definition at line 113 of file CLinearAlgebra.h.

◆ b

template<typename V , typename M >
const Matrix DGtal::concepts::CLinearAlgebra< V, M >::b
private

◆ c

template<typename V , typename M >
Matrix DGtal::concepts::CLinearAlgebra< V, M >::c
private

Definition at line 112 of file CLinearAlgebra.h.

◆ x

template<typename V , typename M >
Vector DGtal::concepts::CLinearAlgebra< V, M >::x
private

Definition at line 114 of file CLinearAlgebra.h.

◆ y

template<typename V , typename M >
const Vector DGtal::concepts::CLinearAlgebra< V, M >::y
private

The documentation for this struct was generated from the following file: