MCPcopy Create free account
hub / github.com/cvxpy/cvxpy / register_solve

Method register_solve

cvxpy/problems/problem.py:690–701  ·  view source on GitHub ↗

Adds a solve method to the Problem class. Arguments --------- name : str The keyword for the method. func : function The function that executes the solve method. This function must take as its first argument the problem instance to

(cls, name: str, func)

Source from the content-addressed store, hash-verified

688
689 @classmethod
690 def register_solve(cls, name: str, func) -> None:
691 """Adds a solve method to the Problem class.
692
693 Arguments
694 ---------
695 name : str
696 The keyword for the method.
697 func : function
698 The function that executes the solve method. This function must
699 take as its first argument the problem instance to solve.
700 """
701 cls.REGISTERED_SOLVE_METHODS[name] = func
702
703 def get_problem_data(
704 self, solver,

Callers 1

test_register_solveMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_register_solveMethod · 0.64