alpaqa pi-pico
Nonconvex constrained optimization
Loading...
Searching...
No Matches
Namespaces | Macros | Functions | Variables
json.cpp File Reference
#include <alpaqa/implementation/params/json.tpp>
#include <alpaqa/params/vec-from-file.hpp>
#include <alpaqa/util/demangled-typename.hpp>
#include <alpaqa/util/duration-parse.hpp>
#include <alpaqa/util/io/csv.hpp>
#include <alpaqa/util/possible-alias.hpp>
#include <algorithm>
#include <cmath>
#include <concepts>
#include <fstream>
#include <limits>
#include <variant>
#include <alpaqa/inner/directions/panoc/anderson.hpp>
#include <alpaqa/inner/directions/panoc/convex-newton.hpp>
#include <alpaqa/inner/directions/panoc/lbfgs.hpp>
#include <alpaqa/inner/directions/panoc/structured-lbfgs.hpp>
#include <alpaqa/inner/directions/panoc/structured-newton.hpp>
#include <alpaqa/inner/directions/pantr/newton-tr.hpp>
#include <alpaqa/inner/fista.hpp>
#include <alpaqa/inner/internal/lipschitz.hpp>
#include <alpaqa/inner/internal/panoc-stop-crit.hpp>
#include <alpaqa/inner/panoc.hpp>
#include <alpaqa/inner/pantr.hpp>
#include <alpaqa/inner/zerofpr.hpp>
#include <alpaqa/outer/alm.hpp>
#include <alpaqa/util/dl-flags.hpp>
#include <alpaqa/inner/panoc-ocp.hpp>
#include <alpaqa/params/structs.ipp>
+ Include dependency graph for json.cpp:

Go to the source code of this file.

Namespaces

namespace  alpaqa
 
namespace  alpaqa::params
 

Macros

#define ALPAQA_GET_PARAM_INST(...)
 
#define ALPAQA_GETSET_PARAM_INST(...)
 
#define ALPAQA_GETSET_PARAM_INST_INT(...)
 

Functions

template<class Duration >
requires is_duration<Duration>
void set_param_default (Duration &t, const json &j)
 
template<class Duration >
requires is_duration<Duration>
void get_param_default (const Duration &t, json &s)
 
template<>
void set_param (alpaqa::vec< config_t > &v, const json &j)
 
template<>
void set_param (vec_from_file< config_t > &v, const json &j)
 
template<>
void set_param (std::monostate &, const nlohmann::json &)
 
template<>
void set_param (bool &t, const nlohmann::json &j)
 
template<>
void set_param (std::string &t, const nlohmann::json &j)
 
template<std::integral T>
requires (!std::same_as<T, bool>)
void set_param_default (T &t, const nlohmann::json &j)
 
template<std::floating_point T>
void set_param_default (T &t, const nlohmann::json &j)
 
template<class T >
requires (std::integral<T> || std::same_as<T, bool> || std::same_as<T, std::string>)
void get_param_default (const T &t, nlohmann::json &j)
 
template<std::floating_point T>
void get_param_default (const T &t, nlohmann::json &j)
 
template<class T >
void set_param (T &, const json &j)
 Update/overwrite the first argument based on the JSON object j.
 
template<class T >
void get_param (const T &, json &j)
 Get the first argument as a JSON object j.
 
template<class... Ts>
void set_param (util::detail::dummy< Ts... > &, const json &)
 
template<class... Ts>
void get_param (const util::detail::dummy< Ts... > &, json &)
 
template void get_param (const util::possible_alias_t< std::string > &, json &)
 
template void get_param (const util::possible_alias_t< bool > &, json &)
 
template void set_param (util::possible_alias_t< float > &, const json &)
 
template void get_param (const util::possible_alias_t< float > &, json &)
 
template void set_param (util::possible_alias_t< double, float > &, const json &)
 
template void get_param (const util::possible_alias_t< double, float > &, json &)
 
template void set_param (util::possible_alias_t< long double, double, float > &, const json &)
 
template void get_param (const util::possible_alias_t< long double, double, float > &, json &)
 
template void set_param (util::possible_alias_t< int8_t > &, const json &)
 
template void get_param (const util::possible_alias_t< int8_t > &, json &)
 
template void set_param (util::possible_alias_t< uint8_t > &, const json &)
 
template void get_param (const util::possible_alias_t< uint8_t > &, json &)
 
template void set_param (util::possible_alias_t< int16_t > &, const json &)
 
template void get_param (const util::possible_alias_t< int16_t > &, json &)
 
template void set_param (util::possible_alias_t< uint16_t > &, const json &)
 
template void get_param (const util::possible_alias_t< uint16_t > &, json &)
 
template void set_param (util::possible_alias_t< int32_t > &, const json &)
 
template void get_param (const util::possible_alias_t< int32_t > &, json &)
 
template void set_param (util::possible_alias_t< int64_t > &, const json &)
 
template void get_param (const util::possible_alias_t< int64_t > &, json &)
 
template void set_param (util::possible_alias_t< uint32_t > &, const json &)
 
template void get_param (const util::possible_alias_t< uint32_t > &, json &)
 
template void set_param (util::possible_alias_t< uint64_t > &, const json &)
 
template void get_param (const util::possible_alias_t< uint64_t > &, json &)
 
template void set_param (util::possible_alias_t< short, int8_t, uint8_t, int16_t, uint16_t, int32_t, int64_t, uint32_t, uint64_t > &, const json &)
 
template void get_param (const util::possible_alias_t< short, int8_t, uint8_t, int16_t, uint16_t, int32_t, int64_t, uint32_t, uint64_t > &, json &)
 
template void set_param (util::possible_alias_t< int, short, int8_t, uint8_t, int16_t, uint16_t, int32_t, int64_t, uint32_t, uint64_t > &, const json &)
 
template void get_param (const util::possible_alias_t< int, short, int8_t, uint8_t, int16_t, uint16_t, int32_t, int64_t, uint32_t, uint64_t > &, json &)
 
template void set_param (util::possible_alias_t< long, int, short, int8_t, uint8_t, int16_t, uint16_t, int32_t, int64_t, uint32_t, uint64_t > &, const json &)
 
template void get_param (const util::possible_alias_t< long, int, short, int8_t, uint8_t, int16_t, uint16_t, int32_t, int64_t, uint32_t, uint64_t > &, json &)
 
template void set_param (util::possible_alias_t< long long, long, int, short, int8_t, uint8_t, int16_t, uint16_t, int32_t, int64_t, uint32_t, uint64_t > &, const json &)
 
template void get_param (const util::possible_alias_t< long long, long, int, short, int8_t, uint8_t, int16_t, uint16_t, int32_t, int64_t, uint32_t, uint64_t > &, json &)
 
template void set_param (util::possible_alias_t< ptrdiff_t, long long, long, int, short, int8_t, uint8_t, int16_t, uint16_t, int32_t, int64_t, uint32_t, uint64_t > &, const json &)
 
template void get_param (const util::possible_alias_t< ptrdiff_t, long long, long, int, short, int8_t, uint8_t, int16_t, uint16_t, int32_t, int64_t, uint32_t, uint64_t > &, json &)
 
template void set_param (util::possible_alias_t< unsigned short, int8_t, uint8_t, int16_t, uint16_t, int32_t, int64_t, uint32_t, uint64_t > &, const json &)
 
template void get_param (const util::possible_alias_t< unsigned short, int8_t, uint8_t, int16_t, uint16_t, int32_t, int64_t, uint32_t, uint64_t > &, json &)
 
template void set_param (util::possible_alias_t< unsigned int, unsigned short, int8_t, uint8_t, int16_t, uint16_t, int32_t, int64_t, uint32_t, uint64_t > &, const json &)
 
template void get_param (const util::possible_alias_t< unsigned int, unsigned short, int8_t, uint8_t, int16_t, uint16_t, int32_t, int64_t, uint32_t, uint64_t > &, json &)
 
template void set_param (util::possible_alias_t< unsigned long, unsigned int, unsigned short, int8_t, uint8_t, int16_t, uint16_t, int32_t, int64_t, uint32_t, uint64_t > &, const json &)
 
template void get_param (const util::possible_alias_t< unsigned long, unsigned int, unsigned short, int8_t, uint8_t, int16_t, uint16_t, int32_t, int64_t, uint32_t, uint64_t > &, json &)
 
template void set_param (util::possible_alias_t< unsigned long long, unsigned long, unsigned int, unsigned short, int8_t, uint8_t, int16_t, uint16_t, int32_t, int64_t, uint32_t, uint64_t > &, const json &)
 
template void get_param (const util::possible_alias_t< unsigned long long, unsigned long, unsigned int, unsigned short, int8_t, uint8_t, int16_t, uint16_t, int32_t, int64_t, uint32_t, uint64_t > &, json &)
 
template void set_param (util::possible_alias_t< size_t, unsigned long long, unsigned long, unsigned int, unsigned short, int8_t, uint8_t, int16_t, uint16_t, int32_t, int64_t, uint32_t, uint64_t > &, const json &)
 
template void get_param (const util::possible_alias_t< size_t, unsigned long long, unsigned long, unsigned int, unsigned short, int8_t, uint8_t, int16_t, uint16_t, int32_t, int64_t, uint32_t, uint64_t > &, json &)
 
template void set_param (util::possible_alias_t< std::chrono::nanoseconds > &, const json &)
 
template void get_param (const util::possible_alias_t< std::chrono::nanoseconds > &, json &)
 
template void set_param (util::possible_alias_t< std::chrono::microseconds > &, const json &)
 
template void get_param (const util::possible_alias_t< std::chrono::microseconds > &, json &)
 
template void set_param (util::possible_alias_t< std::chrono::milliseconds > &, const json &)
 
template void get_param (const util::possible_alias_t< std::chrono::milliseconds > &, json &)
 
template void set_param (util::possible_alias_t< std::chrono::seconds > &, const json &)
 
template void get_param (const util::possible_alias_t< std::chrono::seconds > &, json &)
 
template void set_param (util::possible_alias_t< std::chrono::minutes > &, const json &)
 
template void get_param (const util::possible_alias_t< std::chrono::minutes > &, json &)
 
template void set_param (util::possible_alias_t< std::chrono::hours > &, const json &)
 
template void get_param (const util::possible_alias_t< std::chrono::hours > &, json &)
 
template void set_param (util::possible_alias_t< PANOCStopCrit > &, const json &)
 
template void get_param (const util::possible_alias_t< PANOCStopCrit > &, json &)
 
template void set_param (util::possible_alias_t< LBFGSStepSize > &, const json &)
 
template void get_param (const util::possible_alias_t< LBFGSStepSize > &, json &)
 
template void set_param (util::possible_alias_t< DynamicLoadFlags > &, const json &)
 
template void get_param (const util::possible_alias_t< DynamicLoadFlags > &, json &)
 
template void set_param (util::possible_alias_t< CBFGSParams< config_t > > &, const json &)
 
template void get_param (const util::possible_alias_t< CBFGSParams< config_t > > &, json &)
 
template void set_param (util::possible_alias_t< LipschitzEstimateParams< config_t > > &, const json &)
 
template void get_param (const util::possible_alias_t< LipschitzEstimateParams< config_t > > &, json &)
 
template void set_param (util::possible_alias_t< PANOCParams< config_t > > &, const json &)
 
template void get_param (const util::possible_alias_t< PANOCParams< config_t > > &, json &)
 
template void set_param (util::possible_alias_t< FISTAParams< config_t > > &, const json &)
 
template void get_param (const util::possible_alias_t< FISTAParams< config_t > > &, json &)
 
template void set_param (util::possible_alias_t< ZeroFPRParams< config_t > > &, const json &)
 
template void get_param (const util::possible_alias_t< ZeroFPRParams< config_t > > &, json &)
 
template void set_param (util::possible_alias_t< PANTRParams< config_t > > &, const json &)
 
template void get_param (const util::possible_alias_t< PANTRParams< config_t > > &, json &)
 
template void set_param (util::possible_alias_t< LBFGSParams< config_t > > &, const json &)
 
template void get_param (const util::possible_alias_t< LBFGSParams< config_t > > &, json &)
 
template void set_param (util::possible_alias_t< AndersonAccelParams< config_t > > &, const json &)
 
template void get_param (const util::possible_alias_t< AndersonAccelParams< config_t > > &, json &)
 
template void set_param (util::possible_alias_t< LBFGSDirectionParams< config_t > > &, const json &)
 
template void get_param (const util::possible_alias_t< LBFGSDirectionParams< config_t > > &, json &)
 
template void set_param (util::possible_alias_t< AndersonDirectionParams< config_t > > &, const json &)
 
template void get_param (const util::possible_alias_t< AndersonDirectionParams< config_t > > &, json &)
 
template void set_param (util::possible_alias_t< StructuredLBFGSDirectionParams< config_t > > &, const json &)
 
template void get_param (const util::possible_alias_t< StructuredLBFGSDirectionParams< config_t > > &, json &)
 
template void set_param (util::possible_alias_t< NewtonTRDirectionParams< config_t > > &, const json &)
 
template void get_param (const util::possible_alias_t< NewtonTRDirectionParams< config_t > > &, json &)
 
template void set_param (util::possible_alias_t< SteihaugCGParams< config_t > > &, const json &)
 
template void get_param (const util::possible_alias_t< SteihaugCGParams< config_t > > &, json &)
 
template void set_param (util::possible_alias_t< StructuredNewtonRegularizationParams< config_t > > &, const json &)
 
template void get_param (const util::possible_alias_t< StructuredNewtonRegularizationParams< config_t > > &, json &)
 
template void set_param (util::possible_alias_t< StructuredNewtonDirectionParams< config_t > > &, const json &)
 
template void get_param (const util::possible_alias_t< StructuredNewtonDirectionParams< config_t > > &, json &)
 
template void set_param (util::possible_alias_t< ConvexNewtonRegularizationParams< config_t > > &, const json &)
 
template void get_param (const util::possible_alias_t< ConvexNewtonRegularizationParams< config_t > > &, json &)
 
template void set_param (util::possible_alias_t< ConvexNewtonDirectionParams< config_t > > &, const json &)
 
template void get_param (const util::possible_alias_t< ConvexNewtonDirectionParams< config_t > > &, json &)
 
template void set_param (util::possible_alias_t< ALMParams< config_t > > &, const json &)
 
template void get_param (const util::possible_alias_t< ALMParams< config_t > > &, json &)
 
template void set_param (util::possible_alias_t< PANOCOCPParams< config_t > > &, const json &)
 
template void get_param (const util::possible_alias_t< PANOCOCPParams< config_t > > &, json &)
 

Variables

template<class T >
constexpr bool is_duration = false
 

Macro Definition Documentation

◆ ALPAQA_GET_PARAM_INST

#define ALPAQA_GET_PARAM_INST (   ...)
Value:
template void ALPAQA_EXPORT get_param( \
const util::possible_alias_t<__VA_ARGS__> &, json &)

Definition at line 262 of file json.cpp.

◆ ALPAQA_GETSET_PARAM_INST

#define ALPAQA_GETSET_PARAM_INST (   ...)
Value:
template void ALPAQA_EXPORT set_param( \
util::possible_alias_t<__VA_ARGS__> &, const json &); \
template void ALPAQA_EXPORT get_param( \
const util::possible_alias_t<__VA_ARGS__> &, json &)

Definition at line 265 of file json.cpp.

◆ ALPAQA_GETSET_PARAM_INST_INT

#define ALPAQA_GETSET_PARAM_INST_INT (   ...)
Value:
ALPAQA_GETSET_PARAM_INST(__VA_ARGS__, int8_t, uint8_t, int16_t, uint16_t, \
int32_t, int64_t, uint32_t, uint64_t)
#define ALPAQA_GETSET_PARAM_INST(...)
Definition json.cpp:265

Definition at line 294 of file json.cpp.