alpaqa 1.0.0a10
Nonconvex constrained optimization
Loading...
Searching...
No Matches
Classes | Functions
gradient-checker.cpp File Reference
#include <alpaqa/config/config.hpp>
#include <alpaqa/util/demangled-typename.hpp>
#include <alpaqa/util/print.hpp>
#include <alpaqa-version.h>
#include "options.hpp"
#include "problem.hpp"
#include "util.hpp"
#include <algorithm>
#include <filesystem>
#include <fstream>
#include <iostream>
#include <random>
#include <span>
#include <stdexcept>
#include <string>
#include <string_view>
#include <tuple>
#include <type_traits>
+ Include dependency graph for gradient-checker.cpp:

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)
 

Class Documentation

◆ CheckGradientsOpts

struct CheckGradientsOpts
+ Collaboration diagram for CheckGradientsOpts:
Class Members
bool print_full

Function Documentation

◆ print_usage()

void print_usage ( const char *  a0)

Definition at line 32 of file gradient-checker.cpp.

+ Here is the caller graph for this function:

◆ split_once()

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 80 of file gradient-checker.cpp.

+ Here is the caller graph for this function:

◆ get_problem_path()

auto get_problem_path ( const char *const *  argv)

Definition at line 89 of file gradient-checker.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ check_gradients()

void check_gradients ( LoadedProblem lproblem,
std::ostream &  log,
const CheckGradientsOpts opts 
)

Definition at line 184 of file gradient-checker.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ main()

int main ( int  argc,
const char *  argv[] 
)

Definition at line 107 of file gradient-checker.cpp.

+ Here is the call graph for this function:

◆ finite_diff()

vec finite_diff ( const std::function< real_t(crvec)> &  f,
crvec  x 
)

Definition at line 169 of file gradient-checker.cpp.

+ Here is the caller graph for this function: