Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
blaze
math
solvers
CG.h
Go to the documentation of this file.
1
//=================================================================================================
20
//=================================================================================================
21
22
#ifndef _BLAZE_MATH_SOLVERS_CG_H_
23
#define _BLAZE_MATH_SOLVERS_CG_H_
24
25
26
//*************************************************************************************************
27
// Includes
28
//*************************************************************************************************
29
30
#include <
blaze/math/CompressedMatrix.h
>
31
#include <
blaze/math/DynamicVector.h
>
32
#include <
blaze/math/problems/LSE.h
>
33
#include <
blaze/math/solvers/Solver.h
>
34
35
36
namespace
blaze {
37
38
//=================================================================================================
39
//
40
// CLASS DEFINITION
41
//
42
//=================================================================================================
43
44
//*************************************************************************************************
51
class
CG
:
public
Solver
52
{
53
public
:
54
//**Constructors********************************************************************************
57
explicit
CG
();
59
//**********************************************************************************************
60
61
//**Solver functions****************************************************************************
64
bool
solve
(
LSE
& lse );
65
bool
solve
(
const
CMatMxN
& A,
const
VecN
& b,
VecN
& x );
67
//**********************************************************************************************
68
69
private
:
70
//**Member variables****************************************************************************
73
VecN
r_
;
74
VecN
d_
;
75
VecN
h_
;
76
77
//**********************************************************************************************
78
};
79
//*************************************************************************************************
80
81
82
83
84
//=================================================================================================
85
//
86
// SOLVER FUNCTIONS
87
//
88
//=================================================================================================
89
90
//*************************************************************************************************
99
inline
bool
CG::solve
(
LSE
& lse ) {
100
return
solve
( lse.
A_
, lse.
b_
, lse.
x_
);
101
}
102
//*************************************************************************************************
103
104
}
// namespace blaze
105
106
#endif
Generated on Sun Jul 28 2013 17:06:07 by
1.8.3.1