All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CG.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_SOLVERS_CG_H_
36 #define _BLAZE_MATH_SOLVERS_CG_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
47 
48 
49 namespace blaze {
50 
51 //=================================================================================================
52 //
53 // CLASS DEFINITION
54 //
55 //=================================================================================================
56 
57 //*************************************************************************************************
64 class CG : public Solver
65 {
66 public:
67  //**Constructors********************************************************************************
70  explicit CG();
72  //**********************************************************************************************
73 
74  //**Solver functions****************************************************************************
77  bool solve( LSE& lse );
78  bool solve( const CMatMxN& A, const VecN& b, VecN& x );
80  //**********************************************************************************************
81 
82 private:
83  //**Member variables****************************************************************************
86  VecN r_;
87  VecN d_;
88  VecN h_;
89 
90  //**********************************************************************************************
91 };
92 //*************************************************************************************************
93 
94 
95 
96 
97 //=================================================================================================
98 //
99 // SOLVER FUNCTIONS
100 //
101 //=================================================================================================
102 
103 //*************************************************************************************************
112 inline bool CG::solve( LSE& lse ) {
113  return solve( lse.A_, lse.b_, lse.x_ );
114 }
115 //*************************************************************************************************
116 
117 } // namespace blaze
118 
119 #endif
VecN b_
The right-hand side vector .
Definition: LSE.h:84
VecN x_
The vector of unknowns .
Definition: LSE.h:85
VecN r_
TODO.
Definition: CG.h:86
A data structure for linear systems of equations.
A linear system of equations (LSE) data structure.The LSE class represent a linear system of equation...
Definition: LSE.h:65
bool solve(LSE &lse)
TODO.
Definition: CG.h:112
Header file for the complete DynamicVector implementation.
Header file for the base class of all solvers.
CG()
The default constructor for the conjugate gradient solver.
Definition: CG.cpp:61
VecN h_
TODO.
Definition: CG.h:88
VecN d_
TODO.
Definition: CG.h:87
CMatMxN A_
The system matrix .
Definition: LSE.h:83
Header file for the complete CompressedMatrix implementation.
Base class for all solver classes.TODO: description of the Solver class TODO: description of its func...
Definition: Solver.h:63
A conjugate gradient solver.TODO: description TODO: Problem formulation: !!
Definition: CG.h:64