PANOC-ALM  quadratic-penalty
Nonconvex constrained optimization
Classes | Typedefs | Functions | Variables
kwargs-to-struct.hpp File Reference

Detailed Description

This file defines mappings from Python dicts (kwargs) to simple parameter structs.

Definition in file kwargs-to-struct.hpp.

#include <functional>
#include <map>
#include <pybind11/pybind11.h>
#include <panoc-alm/inner/decl/panoc.hpp>
#include <panoc-alm/inner/pga.hpp>
#include <panoc-alm/inner/guarded-aa-pga.hpp>
#include <panoc-alm/inner/decl/structured-panoc-lbfgs.hpp>
#include <panoc-alm/inner/directions/decl/lbfgs.hpp>
#include <panoc-alm/decl/alm.hpp>
+ Include dependency graph for kwargs-to-struct.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  attr_setter_fun_t< T >
 

Typedefs

template<class T >
using kwargs_to_struct_table_t = std::map< std::string, attr_setter_fun_t< T > >
 

Functions

template<class T , class A >
auto attr_setter (A T::*attr)
 
template<class T , class A >
auto attr_getter (A T::*attr)
 
template<class T >
void kwargs_to_struct_helper (T &t, const py::kwargs &kwargs)
 
template<class T >
py::dict struct_to_dict_helper (const T &t)
 
template<class T >
kwargs_to_struct (const py::kwargs &kwargs)
 
template<class T >
py::dict struct_to_dict (const T &t)
 

Variables

template<class T >
kwargs_to_struct_table_t< T > kwargs_to_struct_table
 

Typedef Documentation

◆ kwargs_to_struct_table_t

using kwargs_to_struct_table_t = std::map<std::string, attr_setter_fun_t<T> >

Definition at line 36 of file kwargs-to-struct.hpp.

Function Documentation

◆ attr_setter()

auto attr_setter ( A T::*  attr)

Definition at line 16 of file kwargs-to-struct.hpp.

◆ attr_getter()

auto attr_getter ( A T::*  attr)

Definition at line 20 of file kwargs-to-struct.hpp.

◆ kwargs_to_struct_helper()

void kwargs_to_struct_helper ( T &  t,
const py::kwargs &  kwargs 
)

Definition at line 42 of file kwargs-to-struct.hpp.

+ Here is the caller graph for this function:

◆ struct_to_dict_helper()

py::dict struct_to_dict_helper ( const T &  t)

Definition at line 54 of file kwargs-to-struct.hpp.

◆ kwargs_to_struct()

T kwargs_to_struct ( const py::kwargs &  kwargs)

Definition at line 67 of file kwargs-to-struct.hpp.

+ Here is the call graph for this function:

◆ struct_to_dict()

py::dict struct_to_dict ( const T &  t)

Definition at line 74 of file kwargs-to-struct.hpp.

Variable Documentation

◆ kwargs_to_struct_table

kwargs_to_struct_table_t<T> kwargs_to_struct_table

Definition at line 39 of file kwargs-to-struct.hpp.