|
Free Electron
|
solve Ax=b for x More...
#include <ConjugateGradient.h>

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 |
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.
1.8.13