xerus
a general purpose tensor library
|
Wrapper class for all geometric (ie. Riemannian) CG variants. More...
#include <cg.h>
Public Member Functions | |
GeometricCGVariant (size_t _numSteps, value_t _convergenceEpsilon, bool _symPosOp, TTRetractionI _retraction, TTVectorTransport _vectorTransport) | |
fully defining constructor. alternatively CGVariant can be created by copying a predefined variant and modifying it More... | |
GeometricCGVariant (TTRetractionI _retraction, TTVectorTransport _vectorTransport) | |
definition using only the retraction. In the following an operator() including either convergenceEpsilon or numSteps must be called or the algorithm will never terminate More... | |
double | operator() (const TTOperator &_A, TTTensor &_x, const TTTensor &_b, value_t _convergenceEpsilon, PerformanceData &_perfData=NoPerfData) const |
double | operator() (const TTOperator &_A, TTTensor &_x, const TTTensor &_b, size_t _numSteps, PerformanceData &_perfData=NoPerfData) const |
double | operator() (const TTOperator &_A, TTTensor &_x, const TTTensor &_b, PerformanceData &_perfData=NoPerfData) const |
double | operator() (TTTensor &_x, const TTTensor &_b, value_t _convergenceEpsilon, PerformanceData &_perfData=NoPerfData) const |
double | operator() (TTTensor &_x, const TTTensor &_b, size_t _numSteps, PerformanceData &_perfData=NoPerfData) const |
double | operator() (TTTensor &_x, const TTTensor &_b, PerformanceData &_perfData=NoPerfData) const |
Public Attributes | |
bool | assumeSymmetricPositiveDefiniteOperator |
calculates the gradient as b-Ax instead of A^T(b-Ax) More... | |
value_t | convergenceEpsilon |
default value for the change in the residual at which the algorithm assumes it is converged More... | |
size_t | numSteps |
maximum number of steps to perform. set to 0 for infinite More... | |
TTRetractionI | retraction |
the retraction type I to project from point + tangent vector to a new point on the manifold More... | |
TTVectorTransport | vectorTransport |
the vector transport from old tangent space to new one More... | |
Protected Member Functions | |
double | solve (const TTOperator *_Ap, TTTensor &_x, const TTTensor &_b, size_t _numSteps, value_t _convergenceEpsilon, PerformanceData &_perfData=NoPerfData) const |
Wrapper class for all geometric (ie. Riemannian) CG variants.
By creating a new object of this class and modifying the member variables, the behaviour of the solver can be modified.
cf. Boumal, Absil. doi: 10.1016/j.laa.2015.02.027 cf. Hager, Zhang. https://www.math.lsu.edu/~hozhang/papers/cgsurvey.pdf for the beta rules
|
inline |
|
inline |
|
inline |
call to solve \( A\cdot x = b\) for \( x \) (in a least-squares sense)
_A | operator to solve for | |
[in,out] | _x | in: initial guess, out: solution as found by the algorithm |
_b | right-hand side of the equation to be solved | |
_convergenceEpsilon | minimum change in residual / energy under which the algorithm terminates | |
_perfData | vector of performance data (residuals after every microiteration) |
|
inline |
call to solve \( A\cdot x = b\) for \( x \) (in a least-squares sense)
_A | operator to solve for | |
[in,out] | _x | in: initial guess, out: solution as found by the algorithm |
_b | right-hand side of the equation to be solved | |
_numHalfSweeps | maximum number of half-sweeps to perform | |
_perfData | vector of performance data (residuals after every microiteration) |
|
inline |
call to solve \( A\cdot x = b\) for \( x \) (in a least-squares sense)
_A | operator to solve for | |
[in,out] | _x | in: initial guess, out: solution as found by the algorithm |
_b | right-hand side of the equation to be solved | |
_perfData | vector of performance data (residuals after every microiteration) |
|
inline |
call to minimze \( \|x - b\|^2 \) for \( x \)
[in,out] | _x | in: initial guess, out: solution as found by the algorithm |
_b | right-hand side of the equation to be solved | |
_convergenceEpsilon | minimum change in residual / energy under which the algorithm terminates | |
_perfData | vector of performance data (residuals after every microiteration) |
|
inline |
call to minimze \( \|x - b\|^2 \) for \( x \)
[in,out] | _x | in: initial guess, out: solution as found by the algorithm |
_b | right-hand side of the equation to be solved | |
_numHalfSweeps | maximum number of half-sweeps to perform | |
_perfData | vector of performance data (residuals after every microiteration) |
|
inline |
|
protected |
bool xerus::GeometricCGVariant::assumeSymmetricPositiveDefiniteOperator |
value_t xerus::GeometricCGVariant::convergenceEpsilon |
size_t xerus::GeometricCGVariant::numSteps |
TTRetractionI xerus::GeometricCGVariant::retraction |
TTVectorTransport xerus::GeometricCGVariant::vectorTransport |