alpaqa 1.0.0a16
Nonconvex constrained optimization
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
NewtonTRDirection< Conf > Struct Template Reference

#include <alpaqa/inner/directions/pantr/newton-tr.hpp>

Detailed Description

template<Config Conf>
struct alpaqa::NewtonTRDirection< Conf >

Definition at line 36 of file newton-tr.hpp.

+ Collaboration diagram for NewtonTRDirection< Conf >:

Classes

struct  Params
 

Public Types

using Problem = TypeErasedProblem< config_t >
 
using AcceleratorParams = SteihaugCGParams< config_t >
 
using DirectionParams = NewtonTRDirectionParams< config_t >
 

Public Member Functions

 NewtonTRDirection ()=default
 
 NewtonTRDirection (const Params &params)
 
 NewtonTRDirection (const AcceleratorParams &params, const DirectionParams &directionparams={})
 
void initialize (const Problem &problem, crvec y, crvec Σ, real_t γ_0, crvec x_0, crvec x̂_0, crvec p_0, crvec grad_ψx_0)
 
bool has_initial_direction () const
 
bool update (real_t γₖ, real_t γₙₑₓₜ, crvec xₖ, crvec xₙₑₓₜ, crvec pₖ, crvec pₙₑₓₜ, crvec grad_ψxₖ, crvec grad_ψxₙₑₓₜ)
 
real_t apply (real_t γₖ, crvec xₖ, crvec x̂ₖ, crvec pₖ, crvec grad_ψxₖ, real_t radius, rvec qₖ) const
 
void changed_γ (real_t γₖ, real_t old_γₖ)
 
void reset ()
 
std::string get_name () const
 
auto get_params () const
 

Public Attributes

SteihaugCG< config_t > steihaug
 
DirectionParams direction_params
 
const Problemproblem = nullptr
 
std::optional< crvecy = std::nullopt
 
std::optional< crvecΣ = std::nullopt
 
indexvec JK_sto
 
vec rJ_sto
 
vec qJ_sto
 
vec work
 
vec work_2
 
vec work_n_fd
 
vec work_m_fd
 

Class Documentation

◆ alpaqa::NewtonTRDirection::Params

struct alpaqa::NewtonTRDirection::Params
+ Collaboration diagram for NewtonTRDirection< Conf >::Params:
Class Members
AcceleratorParams accelerator = {}
DirectionParams direction = {}

Member Typedef Documentation

◆ Problem

template<Config Conf>
using Problem = TypeErasedProblem<config_t>

Definition at line 39 of file newton-tr.hpp.

◆ AcceleratorParams

template<Config Conf>
using AcceleratorParams = SteihaugCGParams<config_t>

Definition at line 40 of file newton-tr.hpp.

◆ DirectionParams

template<Config Conf>
using DirectionParams = NewtonTRDirectionParams<config_t>

Definition at line 41 of file newton-tr.hpp.

Constructor & Destructor Documentation

◆ NewtonTRDirection() [1/3]

template<Config Conf>
NewtonTRDirection ( )
default

◆ NewtonTRDirection() [2/3]

template<Config Conf>
NewtonTRDirection ( const Params params)
inline

Definition at line 49 of file newton-tr.hpp.

◆ NewtonTRDirection() [3/3]

template<Config Conf>
NewtonTRDirection ( const AcceleratorParams params,
const DirectionParams directionparams = {} 
)
inline

Definition at line 51 of file newton-tr.hpp.

Member Function Documentation

◆ initialize()

template<Config Conf>
void initialize ( const Problem problem,
crvec  y,
crvec  Σ,
real_t  γ_0,
crvec  x_0,
crvec  x̂_0,
crvec  p_0,
crvec  grad_ψx_0 
)
inline
See also
PANTRDirection::initialize

Definition at line 56 of file newton-tr.hpp.

+ Here is the call graph for this function:

◆ has_initial_direction()

template<Config Conf>
bool has_initial_direction ( ) const
inline
See also
PANTRDirection::has_initial_direction

Definition at line 88 of file newton-tr.hpp.

◆ update()

template<Config Conf>
bool update ( real_t  γₖ,
real_t  γₙₑₓₜ,
crvec  xₖ,
crvec  xₙₑₓₜ,
crvec  pₖ,
crvec  pₙₑₓₜ,
crvec  grad_ψxₖ,
crvec  grad_ψxₙₑₓₜ 
)
inline
See also
PANTRDirection::update

Definition at line 91 of file newton-tr.hpp.

◆ apply()

template<Config Conf>
real_t apply ( real_t  γₖ,
crvec  xₖ,
crvec  x̂ₖ,
crvec  pₖ,
crvec  grad_ψxₖ,
real_t  radius,
rvec  qₖ 
) const
inline
See also
PANTRDirection::apply

TODO: use a better rule to determine the step size

TODO: use a better rule to determine the step size

Definition at line 100 of file newton-tr.hpp.

+ Here is the call graph for this function:

◆ changed_γ()

template<Config Conf>
void changed_γ ( real_t  γₖ,
real_t  old_γₖ 
)
inline
See also
PANTRDirection::changed_γ

Definition at line 169 of file newton-tr.hpp.

◆ reset()

template<Config Conf>
void reset ( )
inline
See also
PANTRDirection::reset

Definition at line 173 of file newton-tr.hpp.

◆ get_name()

template<Config Conf>
std::string get_name ( ) const
inline
See also
PANTRDirection::get_name

Definition at line 176 of file newton-tr.hpp.

◆ get_params()

template<Config Conf>
auto get_params ( ) const
inline

Definition at line 180 of file newton-tr.hpp.

Member Data Documentation

◆ steihaug

template<Config Conf>
SteihaugCG<config_t> steihaug

Definition at line 184 of file newton-tr.hpp.

◆ direction_params

template<Config Conf>
DirectionParams direction_params

Definition at line 185 of file newton-tr.hpp.

◆ problem

template<Config Conf>
const Problem* problem = nullptr

Definition at line 186 of file newton-tr.hpp.

◆ y

template<Config Conf>
std::optional<crvec> y = std::nullopt

Definition at line 188 of file newton-tr.hpp.

◆ Σ

template<Config Conf>
std::optional<crvec> Σ = std::nullopt

Definition at line 189 of file newton-tr.hpp.

◆ JK_sto

template<Config Conf>
indexvec JK_sto
mutable

Definition at line 194 of file newton-tr.hpp.

◆ rJ_sto

template<Config Conf>
vec rJ_sto
mutable

Definition at line 195 of file newton-tr.hpp.

◆ qJ_sto

template<Config Conf>
vec qJ_sto
mutable

Definition at line 196 of file newton-tr.hpp.

◆ work

template<Config Conf>
vec work
mutable

Definition at line 197 of file newton-tr.hpp.

◆ work_2

template<Config Conf>
vec work_2

Definition at line 197 of file newton-tr.hpp.

◆ work_n_fd

template<Config Conf>
vec work_n_fd

Definition at line 197 of file newton-tr.hpp.

◆ work_m_fd

template<Config Conf>
vec work_m_fd

Definition at line 197 of file newton-tr.hpp.


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