DGtal  1.3.beta
DGtal::concepts::CLinearAlgebraSolver< S, V, M > Struct Template Reference

Aim: Describe a linear solver defined over a linear algebra. Problems are of the form: More...

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

Inheritance diagram for DGtal::concepts::CLinearAlgebraSolver< S, V, M >:
[legend]

typedef S Solver

typedef V Vector

typedef M Matrix

## Public Member Functions

BOOST_CONCEPT_ASSERT ((CLinearAlgebra< Vector, Matrix >))

BOOST_CONCEPT_USAGE (CLinearAlgebraSolver)

## Private Attributes

int status_return

const Solver const_solver

Solver solver

const Matrix a

const Vector y

x

## Detailed Description

### template<typename S, typename V, typename M> struct DGtal::concepts::CLinearAlgebraSolver< S, V, M >

Aim: Describe a linear solver defined over a linear algebra. Problems are of the form:

Description of concept 'CLinearAlgebraSolver'

a * x = y

where a type is a model of CMatrix and x, y type is a model of CVector. Matrix and vector types should be a model of CLinearAlgebra.

# Refinement of

• boost::DefaultConstructible<S>
• CLinearAlgebra<V, M>

# Notation

• Solver : A type that is a model of CLinearAlgebraSolver
• Vector : A type that is a model of CVector
• Matrix : A type that is a model of CMatrix
• Info : The type returned by solver.status(), problem solved successfully if true when compared to 0
• y : object of type Vector, input of the linear problem
• x : object of type Vector, solution of the linear problem
• a : object of type Matrix
• info : object of type Info

# Valid expressions and semantics

Name Expression Type requirements Return type Precondition Semantics Post condition Complexity
Problem factorization / matrix input solver.compute(a) return *this.
Problem resolution / vector input x = solver.solve(y) Vector
Status solver.status()

# Notes

Template Parameters
 S the type that should be a model of CLinearAlgebraSolver. V the type that should be a model of CVector M the type that should be a model of CMatrix

Definition at line 103 of file CLinearAlgebraSolver.h.

## ◆ Matrix

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

Definition at line 109 of file CLinearAlgebraSolver.h.

## ◆ Solver

template<typename S , typename V , typename M >
 typedef S DGtal::concepts::CLinearAlgebraSolver< S, V, M >::Solver

Definition at line 107 of file CLinearAlgebraSolver.h.

## ◆ Vector

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

Definition at line 108 of file CLinearAlgebraSolver.h.

## ◆ BOOST_CONCEPT_ASSERT()

template<typename S , typename V , typename M >
 DGtal::concepts::CLinearAlgebraSolver< S, V, M >::BOOST_CONCEPT_ASSERT ( (CLinearAlgebra< Vector, Matrix >) )

## ◆ BOOST_CONCEPT_USAGE()

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

Definition at line 113 of file CLinearAlgebraSolver.h.

114  {
115  solver.compute(a);
116  status_return = static_cast<int>(const_solver.info());
117  x = const_solver.solve(y);
118  }

## ◆ a

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

Definition at line 124 of file CLinearAlgebraSolver.h.

## ◆ const_solver

template<typename S , typename V , typename M >
 const Solver DGtal::concepts::CLinearAlgebraSolver< S, V, M >::const_solver
private

Definition at line 122 of file CLinearAlgebraSolver.h.

## ◆ solver

template<typename S , typename V , typename M >
 Solver DGtal::concepts::CLinearAlgebraSolver< S, V, M >::solver
private

Definition at line 123 of file CLinearAlgebraSolver.h.

## ◆ status_return

template<typename S , typename V , typename M >
 int DGtal::concepts::CLinearAlgebraSolver< S, V, M >::status_return
private

Definition at line 121 of file CLinearAlgebraSolver.h.

## ◆ x

template<typename S , typename V , typename M >
 V DGtal::concepts::CLinearAlgebraSolver< S, V, M >::x
private

Definition at line 126 of file CLinearAlgebraSolver.h.

## ◆ y

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

Definition at line 125 of file CLinearAlgebraSolver.h.

The documentation for this struct was generated from the following file:
DGtal::concepts::CLinearAlgebraSolver::const_solver
const Solver const_solver
Definition: CLinearAlgebraSolver.h:122
DGtal::concepts::CLinearAlgebraSolver::status_return
int status_return
Definition: CLinearAlgebraSolver.h:121
DGtal::concepts::CLinearAlgebraSolver::solver
Solver solver
Definition: CLinearAlgebraSolver.h:123