Has Direct Implicit Mixin (has_direct_implicit_mixin)

class pypint.problems.has_direct_implicit_mixin.HasDirectImplicitMixin(*args, **kwargs)[source]

Bases: builtins.object

Provides direct implicit formulation of the problem.

direct_implicit(*args, **kwargs)[source]
Raises:NotImplementedError – If the problem using this Mixin actually does not override this method.
__weakref__

list of weak references to the object (if defined)

pypint.problems.has_direct_implicit_mixin.problem_has_direct_implicit(problem, checking_obj=None)[source]

Convenience checker for existence of a direct implicit formulation of a problem.

Parameters:
  • problem (IProblem) – The problem to check for a direct implicit formulation.
  • checking_obj (object) – (optional) The object calling this function for a meaningful error message. For debugging purposes only.
Returns:

has_direct_implTrue if exact solution was given, False otherwise

Return type:

bool

Raises:

ValueError – If the given problem is not an instance of IProblem.