#include <alpaqa/config/config.hpp>
#include <alpaqa/problem/sparsity-conversions.hpp>
#include <alpaqa/util/demangled-typename.hpp>
#include <alpaqa/util/print.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[]) |
vec | 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 241 of file gradient-checker.cpp.
int main | ( | int | argc, |
const char * | argv[] | ||
) |
vec 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 198 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.