#include <netoptim/network_oracle.hpp>
template<typename Graph, typename Mapping, typename Fn>
NetworkOracle class
Oracle for Parametric Network Problem.
Template parameters | |
---|---|
Graph | |
Mapping | |
Fn |
This oracle solves the following feasibility problem:
find x, utx s.t. utx[j] - utx[i] \le h(edge, x) \forall edge(i, j) \in E
Constructors, destructors, conversion operators
- NetworkOracle(const Graph& gra, Mapping& utx, Fn h)
- Construct a new network oracle object.
- NetworkOracle(const NetworkOracle&) defaulted explicit
- Construct a new network oracle object.
Public functions
-
template<typename Num>auto update(const Num& gamma) -> void -> auto
-
template<typename Arr>auto assess_feas(const Arr& xval) -> std::optional< std::pair< Arr, double >> -> auto
- Make object callable for cutting_plane_feas()
-
template<typename Arr>auto operator()(const Arr& xvar) -> std::optional< std::pair< Arr, double >> -> auto
- Make object callable for cutting_plane_feas()
Function documentation
template<typename Graph, typename Mapping, typename Fn>
NetworkOracle<Graph, Mapping, Fn>:: NetworkOracle(const Graph& gra,
Mapping& utx,
Fn h)
Construct a new network oracle object.
Parameters | |
---|---|
gra in | a directed graph (V, E) |
utx in/out | list or dictionary |
h in | function evaluation and gradient |
template<typename Graph, typename Mapping, typename Fn>
template<typename Num>
auto NetworkOracle<Graph, Mapping, Fn>:: update(const Num& gamma) -> void
Parameters | |
---|---|
gamma in | the best-so-far optimal value |
template<typename Graph, typename Mapping, typename Fn>
template<typename Arr>
auto NetworkOracle<Graph, Mapping, Fn>:: assess_feas(const Arr& xval) -> std::optional< std::pair< Arr, double >>
Make object callable for cutting_plane_feas()
Returns | std::optional<std::tuple<T, double>> |
---|
template<typename Graph, typename Mapping, typename Fn>
template<typename Arr>
auto NetworkOracle<Graph, Mapping, Fn>:: operator()(const Arr& xvar) -> std::optional< std::pair< Arr, double >>
Make object callable for cutting_plane_feas()
Returns | std::optional<std::tuple<T, double>> |
---|