DGtal  0.9.3
DGtal::concepts::CLinearAlgebra< V, M > Struct Template Reference

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

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)

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'

### Notation

• Vector : A type that is a model of CVector
• Matrix : A type that is a model of CMatrix
• x, y : object of type Vector
• a, b, c : object of type Matrix

### 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

### 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
 V the type that should be a model of CVector M the type that should be a model of CMatrix

Definition at line 93 of file CLinearAlgebra.h.

## ◆ 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.

## ◆ BOOST_CONCEPT_ASSERT() [1/2]

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

## ◆ BOOST_CONCEPT_ASSERT() [2/2]

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

## ◆ 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  }

## ◆ 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) )

## ◆ 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

Definition at line 113 of file CLinearAlgebra.h.

## ◆ 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

Definition at line 115 of file CLinearAlgebra.h.

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