Function cutting_plane_q
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def cutting_plane_q(Omega, S, t, options=Options()):
"""Cutting-plane method for solving convex discrete optimization problem
Arguments:
Omega ([type]): perform assessment on x0
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function cutting_plane_feas
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def cutting_plane_feas(Omega: Callable[[Any], Any], S, options=Options()) -> CInfo:
"""Find a point in a convex set (defined through a cutting-plane oracle).
Description:
A function f(x) is *convex* if there always exist a g(x)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function cutting_plane_dc
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def cutting_plane_dc(
Omega: Callable[[Any, Any], Any], S, t, options=Options()
) -> Tuple[Any, Any, CInfo]:
"""Cutting-plane method for solving convex optimization problem
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function bsearch
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def bsearch(
Omega: Callable[[Any], bool], Interval: Tuple, options=Options()
) -> Tuple[Any, CInfo]:
"""[summary]
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"