Free Electron
Public Member Functions | Private Attributes | List of all members
fe::ext::ConjugateGradient< MATRIX, VECTOR > Class Template Reference

solve Ax=b for x More...

#include <ConjugateGradient.h>

Inheritance diagram for fe::ext::ConjugateGradient< MATRIX, VECTOR >:
Inheritance graph
[legend]

Public Member Functions

void solve (VECTOR &x, const MATRIX &A, const VECTOR &b)
 
void setThreshold (F64 threshold)
 

Private Attributes

VECTOR r
 
VECTOR d
 
VECTOR temp
 
VECTOR q
 
F64 m_threshold
 

Detailed Description

template<typename MATRIX, typename VECTOR>
class fe::ext::ConjugateGradient< MATRIX, VECTOR >

solve Ax=b for x

Uses Conjugate-Gradient. The matrix must be positive-definite and symmetric.

The arguments are templated, so any argument types should work, given that they have the appropriate methods and operators.

TODO try seeding with previous x instead of clearing to zero.


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