22template <Config Conf = DefaultConfig>
31 std::chrono::nanoseconds
max_time = std::chrono::minutes(5);
56 10 * std::numeric_limits<real_t>::epsilon();
58 10 * std::numeric_limits<real_t>::epsilon();
65template <Config Conf = DefaultConfig>
88template <Config Conf = DefaultConfig>
117template <
class DirectionT>
130 requires std::default_initializable<Direction>
147 return operator()(Problem::template make<P>(problem), opts, x, y, Σ, e);
152 if (problem.get_m() != 0)
153 throw std::invalid_argument(
"Missing arguments y, Σ, e");
154 mvec y{
nullptr, 0}, Σ{
nullptr, 0}, e{
nullptr, 0};
181 std::ostream *
os = &std::cout;
184template <
class InnerSolverStats>
187template <Config Conf>
192 std::chrono::nanoseconds elapsed_time{};
194 std::chrono::nanoseconds time_progress_callback{};
196 unsigned iterations = 0;
198 unsigned linesearch_failures = 0;
200 unsigned linesearch_backtracks = 0;
202 unsigned stepsize_backtracks = 0;
204 unsigned lbfgs_failures = 0;
207 unsigned lbfgs_rejected = 0;
210 unsigned τ_1_accepted = 0;
213 unsigned count_τ = 0;
228template <Config Conf>
242 acc.sum_τ += s.
sum_τ;
254#ifdef ALPAQA_WITH_QUAD_PRECISION
262#ifdef ALPAQA_WITH_QUAD_PRECISION
270#ifdef ALPAQA_WITH_QUAD_PRECISION
The main polymorphic minimization problem interface.
std::string get_name() const
ZeroFPRSolver(const Params ¶ms, const Direction &direction)
ZeroFPRSolver(const Params ¶ms)
Stats operator()(const P &problem, const SolveOptions &opts, rvec x, rvec y, crvec Σ, rvec e)
ZeroFPRSolver & set_progress_callback(std::function< void(const ProgressInfo &)> cb)
Specify a callable that is invoked with some intermediate results on each iteration of the algorithm.
std::function< void(const ProgressInfo &)> progress_cb
Stats operator()(const Problem &problem, const SolveOptions &opts, rvec x, rvec y, crvec Σ, rvec err_z)
InnerSolveOptions< config_t > SolveOptions
ZeroFPRStats< config_t > Stats
AtomicStopSignal stop_signal
const Params & get_params() const
ZeroFPRSolver(const Params ¶ms, Direction &&direction)
Stats operator()(const P &problem, const SolveOptions &opts, rvec x)
TypeErasedProblem< config_t > Problem
#define USING_ALPAQA_CONFIG(Conf)
#define USING_ALPAQA_CONFIG_TEMPLATE(Conf)
#define ALPAQA_EXPORT_EXTERN_TEMPLATE(...)
unsigned stepsize_backtracks
@ ApproxKKT
Find an ε-approximate KKT point in the ∞-norm:
real_t linesearch_tolerance_factor
LipschitzEstimateParams< config_t > Lipschitz
Parameters related to the Lipschitz constant estimate and step size.
const TypeErasedProblem< config_t > * problem
InnerStatsAccumulator< PANOCOCPStats< Conf > > & operator+=(InnerStatsAccumulator< PANOCOCPStats< Conf > > &acc, const PANOCOCPStats< Conf > &s)
unsigned max_no_progress
Maximum number of iterations without any progress before giving up.
real_t L_max
Maximum Lipschitz constant estimate.
bool update_direction_from_prox_step
SolverStatus
Exit status of a numerical solver such as ALM or PANOC.
std::chrono::nanoseconds time_progress_callback
bool recompute_last_prox_step_after_lbfgs_flush
std::chrono::nanoseconds elapsed_time
typename Conf::real_t real_t
unsigned linesearch_backtracks
real_t min_linesearch_coefficient
Minimum weight factor between Newton step and projected gradient step.
std::chrono::nanoseconds max_time
Maximum duration.
real_t quadratic_upperbound_tolerance_factor
bool force_linesearch
Ignore the line search condition and always accept the accelerated step.
real_t linesearch_strictness_factor
Parameter β used in the line search (see Algorithm 2 in ).
typename Conf::crvec crvec
unsigned linesearch_failures
unsigned print_interval
When to print progress.
int print_precision
The precision of the floating point values printed by the solver.
real_t L_min
Minimum Lipschitz constant estimate.
bool update_direction_in_candidate
const ZeroFPRParams< config_t > * params
unsigned max_iter
Maximum number of inner ZeroFPR iterations.
PANOCStopCrit stop_crit
What stopping criterion to use.
Tuning parameters for the ZeroFPR algorithm.