NetOptim 1.2.8
Loading...
Searching...
No Matches
solve.hpp
Go to the documentation of this file.
1// -*- coding: utf-8 -*-
2#pragma once
3
4#include <cstddef>
5#include <ellalgo/cutting_plane.hpp> // for cutting_plane_feas / cutting_plane_optim
6#include <ellalgo/ell_config.hpp> // for Options
7#include <tuple>
8
19
27inline constexpr double kDefaultTolerance = 1e-10;
28
30inline auto default_options() -> Options { return Options{2000, kDefaultTolerance}; }
31
42template <typename O, typename S>
43inline auto solve_network_feas(O& omega, S& space, const Options& options = default_options())
44 -> std::tuple<CuttingPlaneArrayType<S>, size_t> {
45 return cutting_plane_feas(omega, space, options);
46}
47
60template <typename O, typename S, typename N>
61inline auto solve_opt_scaling(O& omega, S& space, N& gamma,
62 const Options& options
63 = default_options()) -> std::tuple<CuttingPlaneArrayType<S>, size_t> {
64 return cutting_plane_optim(omega, space, gamma, options);
65}
auto default_options() -> Options
Build an Options using the library's default tolerance.
Definition solve.hpp:30
auto solve_opt_scaling(O &omega, S &space, N &gamma, const Options &options=default_options()) -> std::tuple< CuttingPlaneArrayType< S >, size_t >
Maximize the scaling ratio for an optimal matrix scaling problem.
Definition solve.hpp:61
constexpr double kDefaultTolerance
Default convergence tolerance used by the solver facades.
Definition solve.hpp:27
auto solve_network_feas(O &omega, S &space, const Options &options=default_options()) -> std::tuple< CuttingPlaneArrayType< S >, size_t >
Find a feasible point for a network feasibility problem.
Definition solve.hpp:43