diff options
-rw-r--r-- | sumofsquares/__init__.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sumofsquares/__init__.py b/sumofsquares/__init__.py index 2886326..5d9f432 100644 --- a/sumofsquares/__init__.py +++ b/sumofsquares/__init__.py @@ -107,6 +107,16 @@ def make_problem( return psatz(SOSProblem(cost, constraints, solver)) +def minimize(cost, *args, **kwargs) -> SOSProblem: + """ Alias for make_problem. """ + return make_problem(cost, *args, **kwargs) + + +def maximize(cost, *args, **kwargs) -> SOSProblem: + """ Alias for make_problem(-cost, constraints, ...). """ + return make_problem(-cost, *args, **kwargs) + + def solve_problem( cost: Expression, constraints: Iterable[Constraint] = (), |