DGtal  0.9.4beta
Public Types | Public Member Functions | Private Attributes
DGtal::concepts::CLinearAlgebra< V, M > Struct Template Reference

#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

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

Definition at line 98 of file CLinearAlgebra.h.

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

Definition at line 97 of file CLinearAlgebra.h.

Member Function Documentation

template<typename V , typename M >
DGtal::concepts::CLinearAlgebra< V, M >::BOOST_CONCEPT_ASSERT ( (CVector< Vector >)  )
template<typename V , typename M >
DGtal::concepts::CLinearAlgebra< V, M >::BOOST_CONCEPT_ASSERT ( (CMatrix< Matrix >)  )
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.

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

106  {
107  x = a * y;
108  c = a * b;
109  }
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

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

Definition at line 113 of file CLinearAlgebra.h.

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

Definition at line 112 of file CLinearAlgebra.h.

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

Definition at line 114 of file CLinearAlgebra.h.

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: