27 #include "../ttNetwork.h" 28 #include "../performanceData.h" 35 std::function<
void(
TTTensor &,
const TTTangentVector &)> _retraction,
36 std::function<
value_t()> _calculate_residual,
61 : numSteps(_numSteps), convergenceEpsilon(_convergenceEpsilon),
62 assumeSymmetricPositiveDefiniteOperator(_symPosOp), preconditioner(nullptr), retraction(_retraction)
67 : numSteps(0), convergenceEpsilon(0.0), assumeSymmetricPositiveDefiniteOperator(false), preconditioner(nullptr), retraction(_retraction)
80 return solve(&_A, _x, _b, numSteps, _convergenceEpsilon, _perfData);
93 return solve(&_A, _x, _b, _numSteps, convergenceEpsilon, _perfData);
105 return solve(&_A, _x, _b, numSteps, convergenceEpsilon, _perfData);
117 return solve(
nullptr, _x, _b, numSteps, _convergenceEpsilon, _perfData);
129 return solve(
nullptr, _x, _b, _numSteps, convergenceEpsilon, _perfData);
133 return solve(
nullptr, _x, _b, numSteps, convergenceEpsilon, _perfData);
double operator()(const TTOperator &_A, TTTensor &_x, const TTTensor &_b, size_t _numSteps, PerformanceData &_perfData=NoPerfData) const
SteepestDescentVariant(TTRetractionII _retraction)
definition using only the retraction. In the following an operator() including either convergenceEpsi...
double operator()(TTTensor &_x, const TTTensor &_b, value_t _convergenceEpsilon, PerformanceData &_perfData=NoPerfData) const
double operator()(const TTOperator &_A, TTTensor &_x, const TTTensor &_b, PerformanceData &_perfData=NoPerfData) const
Specialized TensorNetwork class used to represent TTTensor and TToperators.
double operator()(TTTensor &_x, const TTTensor &_b, PerformanceData &_perfData=NoPerfData) const
The main namespace of xerus.
Wrapper class for all steepest descent variants.
double solve(const TTOperator *_Ap, TTTensor &_x, const TTTensor &_b, size_t _numSteps, value_t _convergenceEpsilon, PerformanceData &_perfData=NoPerfData) const
size_t numSteps
maximum number of steps to perform. set to 0 for infinite
value_t convergenceEpsilon
default value for the change in the residual at which the algorithm assumes it is converged ...
TTOperator * preconditioner
TTNetwork< false > TTTensor
double operator()(TTTensor &_x, const TTTensor &_b, size_t _numSteps, PerformanceData &_perfData=NoPerfData) const
PerformanceData NoPerfData
Header file for several retractions of type I and II as well as simple vector transport.
TTRetractionII retraction
the retraction to project from point + tangent vector to a new point on the manifold ...
double value_t
The type of values to be used by xerus.
const SteepestDescentVariant SteepestDescent
default variant of the steepest descent algorithm using the lapack solver
void line_search(TTTensor &_x, value_t &_alpha, const TTTangentVector &_direction, value_t _derivative, value_t &_residual, std::function< void(TTTensor &, const TTTangentVector &)> _retraction, std::function< value_t()> _calculate_residual, value_t _changeInAlpha=0.5)
std::function< void(TTTensor &, const TTTensor &)> TTRetractionII
SteepestDescentVariant(size_t _numSteps, value_t _convergenceEpsilon, bool _symPosOp, TTRetractionII _retraction)
fully defining constructor. alternatively SteepestDescentVariant can be created by copying a predefin...
double operator()(const TTOperator &_A, TTTensor &_x, const TTTensor &_b, value_t _convergenceEpsilon, PerformanceData &_perfData=NoPerfData) const
bool assumeSymmetricPositiveDefiniteOperator
calculates the gradient as b-Ax instead of A^T(b-Ax)