xerus
a general purpose tensor library
xerus::SteepestDescentVariant Class Reference

Wrapper class for all steepest descent variants. More...

#include <steepestDescent.h>

Collaboration diagram for xerus::SteepestDescentVariant:

Public Member Functions

 SteepestDescentVariant (size_t _numSteps, value_t _convergenceEpsilon, bool _symPosOp, TTRetractionII _retraction)
 fully defining constructor. alternatively SteepestDescentVariant can be created by copying a predefined variant and modifying it More...
 
 SteepestDescentVariant (TTRetractionII _retraction)
 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...
 
TTOperatorpreconditioner
 
TTRetractionII retraction
 the retraction to project from point + tangent vector to a new point on the manifold More...
 

Protected Member Functions

double solve (const TTOperator *_Ap, TTTensor &_x, const TTTensor &_b, size_t _numSteps, value_t _convergenceEpsilon, PerformanceData &_perfData=NoPerfData) const
 

Detailed Description

Wrapper class for all steepest descent variants.

Note
only implemented for TTTensors at the moment.

By creating a new object of this class and modifying the member variables, the behaviour of the solver can be modified.

Definition at line 45 of file steepestDescent.h.

Constructor & Destructor Documentation

◆ SteepestDescentVariant() [1/2]

xerus::SteepestDescentVariant::SteepestDescentVariant ( size_t  _numSteps,
value_t  _convergenceEpsilon,
bool  _symPosOp,
TTRetractionII  _retraction 
)
inline

fully defining constructor. alternatively SteepestDescentVariant can be created by copying a predefined variant and modifying it

Definition at line 60 of file steepestDescent.h.

◆ SteepestDescentVariant() [2/2]

xerus::SteepestDescentVariant::SteepestDescentVariant ( TTRetractionII  _retraction)
inline

definition using only the retraction. In the following an operator() including either convergenceEpsilon or numSteps must be called or the algorithm will never terminate

Definition at line 66 of file steepestDescent.h.

Member Function Documentation

◆ operator()() [1/6]

double xerus::SteepestDescentVariant::operator() ( const TTOperator _A,
TTTensor _x,
const TTTensor _b,
value_t  _convergenceEpsilon,
PerformanceData _perfData = NoPerfData 
) const
inline

call to solve \( A\cdot x = b\) for \( x \) (in a least-squares sense)

Parameters
_Aoperator to solve for
[in,out]_xin: initial guess, out: solution as found by the algorithm
_bright-hand side of the equation to be solved
_convergenceEpsilonminimum change in residual / energy under which the algorithm terminates
_perfDatavector of performance data (residuals after every microiteration)
Returns
the residual \(|Ax-b|\) of the final _x

Definition at line 79 of file steepestDescent.h.

◆ operator()() [2/6]

double xerus::SteepestDescentVariant::operator() ( const TTOperator _A,
TTTensor _x,
const TTTensor _b,
size_t  _numSteps,
PerformanceData _perfData = NoPerfData 
) const
inline

call to solve \( A\cdot x = b\) for \( x \) (in a least-squares sense)

Parameters
_Aoperator to solve for
[in,out]_xin: initial guess, out: solution as found by the algorithm
_bright-hand side of the equation to be solved
_numHalfSweepsmaximum number of half-sweeps to perform
_perfDatavector of performance data (residuals after every microiteration)
Returns
the residual \(|Ax-b|\) of the final _x

Definition at line 92 of file steepestDescent.h.

◆ operator()() [3/6]

double xerus::SteepestDescentVariant::operator() ( const TTOperator _A,
TTTensor _x,
const TTTensor _b,
PerformanceData _perfData = NoPerfData 
) const
inline

call to solve \( A\cdot x = b\) for \( x \) (in a least-squares sense)

Parameters
_Aoperator to solve for
[in,out]_xin: initial guess, out: solution as found by the algorithm
_bright-hand side of the equation to be solved
_perfDatavector of performance data (residuals after every microiteration)
Returns
the residual \(|Ax-b|\) of the final _x

Definition at line 104 of file steepestDescent.h.

◆ operator()() [4/6]

double xerus::SteepestDescentVariant::operator() ( TTTensor _x,
const TTTensor _b,
value_t  _convergenceEpsilon,
PerformanceData _perfData = NoPerfData 
) const
inline

call to minimze \( \|x - b\|^2 \) for \( x \)

Parameters
[in,out]_xin: initial guess, out: solution as found by the algorithm
_bright-hand side of the equation to be solved
_convergenceEpsilonminimum change in residual / energy under which the algorithm terminates
_perfDatavector of performance data (residuals after every microiteration)
Returns
the residual \(|x-b|\) of the final _x

Definition at line 116 of file steepestDescent.h.

◆ operator()() [5/6]

double xerus::SteepestDescentVariant::operator() ( TTTensor _x,
const TTTensor _b,
size_t  _numSteps,
PerformanceData _perfData = NoPerfData 
) const
inline

call to minimze \( \|x - b\|^2 \) for \( x \)

Parameters
[in,out]_xin: initial guess, out: solution as found by the algorithm
_bright-hand side of the equation to be solved
_numHalfSweepsmaximum number of half-sweeps to perform
_perfDatavector of performance data (residuals after every microiteration)
Returns
the residual \(|x-b|\) of the final _x

Definition at line 128 of file steepestDescent.h.

◆ operator()() [6/6]

double xerus::SteepestDescentVariant::operator() ( TTTensor _x,
const TTTensor _b,
PerformanceData _perfData = NoPerfData 
) const
inline

Definition at line 132 of file steepestDescent.h.

◆ solve()

value_t xerus::SteepestDescentVariant::solve ( const TTOperator _Ap,
TTTensor _x,
const TTTensor _b,
size_t  _numSteps,
value_t  _convergenceEpsilon,
PerformanceData _perfData = NoPerfData 
) const
protected

Definition at line 83 of file steepestDescent.cpp.

Member Data Documentation

◆ assumeSymmetricPositiveDefiniteOperator

bool xerus::SteepestDescentVariant::assumeSymmetricPositiveDefiniteOperator

calculates the gradient as b-Ax instead of A^T(b-Ax)

Definition at line 52 of file steepestDescent.h.

◆ convergenceEpsilon

value_t xerus::SteepestDescentVariant::convergenceEpsilon

default value for the change in the residual at which the algorithm assumes it is converged

Definition at line 51 of file steepestDescent.h.

◆ numSteps

size_t xerus::SteepestDescentVariant::numSteps

maximum number of steps to perform. set to 0 for infinite

Definition at line 50 of file steepestDescent.h.

◆ preconditioner

TTOperator* xerus::SteepestDescentVariant::preconditioner

Definition at line 53 of file steepestDescent.h.

◆ retraction

TTRetractionII xerus::SteepestDescentVariant::retraction

the retraction to project from point + tangent vector to a new point on the manifold

Definition at line 55 of file steepestDescent.h.


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