#include <alpaqa/config/config.hpp>#include <alpaqa/problem/sparsity-conversions.hpp>#include <alpaqa/util/print.hpp>#include <guanaqo/demangled-typename.hpp>#include <alpaqa-version.h>#include "options.hpp"#include "problem.hpp"#include <Eigen/Sparse>#include <algorithm>#include <filesystem>#include <fstream>#include <iostream>#include <random>#include <span>#include <stdexcept>#include <string>#include <string_view>#include <tuple>#include <type_traits>Go to the source code of this file.
Classes | |
| struct | CheckGradientsOpts |
Functions | |
| void | print_usage (const char *a0) |
| auto | split_once (std::string_view s, char tok='.') |
Split the string s on the first occurrence of tok. | |
| auto | get_problem_path (const char *const *argv) |
| void | check_gradients (LoadedProblem &, std::ostream &, const CheckGradientsOpts &) |
| int | main (int argc, const char *argv[]) |
| void | default_eval_lagrangian_gradient (const alpaqa::TypeErasedProblem< config_t > problem, crvec x, crvec y, rvec grad_L, rvec work_n) |
| auto | default_eval_augmented_lagrangian_and_gradient (const alpaqa::TypeErasedProblem< config_t > &problem, crvec x, crvec y, crvec Σ, rvec grad_ψ, rvec work_n, rvec work_m) -> real_t |
| auto | finite_diff (const std::function< real_t(crvec)> &f, crvec x) |
| auto | finite_diff_hess_sparse (const std::function< void(crvec, rvec)> &grad_L, crvec x) |
| auto | finite_diff_hess (const std::function< void(crvec, rvec)> &grad_L, crvec x) |
Variables | |
| const auto * | docs |
| struct CheckGradientsOpts |
| void print_usage | ( | const char * | a0 | ) |
| auto split_once | ( | std::string_view | s, |
| char | tok = '.' ) |
Split the string s on the first occurrence of tok.
Returns ("", s) if tok was not found.
Definition at line 88 of file gradient-checker.cpp.
| auto get_problem_path | ( | const char *const * | argv | ) |
Definition at line 97 of file gradient-checker.cpp.
| void check_gradients | ( | LoadedProblem & | lproblem, |
| std::ostream & | log, | ||
| const CheckGradientsOpts & | opts ) |
Definition at line 275 of file gradient-checker.cpp.
| int main | ( | int | argc, |
| const char * | argv[] ) |
| void default_eval_lagrangian_gradient | ( | const alpaqa::TypeErasedProblem< config_t > | problem, |
| crvec | x, | ||
| crvec | y, | ||
| rvec | grad_L, | ||
| rvec | work_n ) |
Definition at line 186 of file gradient-checker.cpp.
| auto default_eval_augmented_lagrangian_and_gradient | ( | const alpaqa::TypeErasedProblem< config_t > & | problem, |
| crvec | x, | ||
| crvec | y, | ||
| crvec | Σ, | ||
| rvec | grad_ψ, | ||
| rvec | work_n, | ||
| rvec | work_m ) -> real_t |
Definition at line 196 of file gradient-checker.cpp.
| auto finite_diff | ( | const std::function< real_t(crvec)> & | f, |
| crvec | x ) |
| auto finite_diff_hess_sparse | ( | const std::function< void(crvec, rvec)> & | grad_L, |
| crvec | x ) |
Definition at line 232 of file gradient-checker.cpp.
| auto finite_diff_hess | ( | const std::function< void(crvec, rvec)> & | grad_L, |
| crvec | x ) |
| const auto* docs |
Definition at line 39 of file gradient-checker.cpp.