Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
pip._vendor.resolvelib.resolvers.Resolution Class Reference
Inheritance diagram for pip._vendor.resolvelib.resolvers.Resolution:
Inheritance graph
[legend]
Collaboration diagram for pip._vendor.resolvelib.resolvers.Resolution:
Collaboration graph
[legend]

Public Member Functions

 __init__ (self, provider, reporter)
 
 state (self)
 
 resolve (self, requirements, max_rounds)
 

Protected Member Functions

 _push_new_state (self)
 
 _add_to_criteria (self, criteria, requirement, parent)
 
 _remove_information_from_criteria (self, criteria, parents)
 
 _get_preference (self, name)
 
 _is_current_pin_satisfying (self, name, criterion)
 
 _get_updated_criteria (self, candidate)
 
 _attempt_to_pin_criterion (self, name)
 
 _backjump (self, causes)
 

Protected Attributes

 _p
 
 _r
 
 _states
 

Detailed Description

Stateful resolution object.

This is designed as a one-off object that holds information to kick start
the resolution process, and holds the results afterwards.

Member Function Documentation

◆ _backjump()

pip._vendor.resolvelib.resolvers.Resolution._backjump (   self,
  causes 
)
protected
Perform backjumping.

When we enter here, the stack is like this::

    [ state Z ]
    [ state Y ]
    [ state X ]
    .... earlier states are irrelevant.

1. No pins worked for Z, so it does not have a pin.
2. We want to reset state Y to unpinned, and pin another candidate.
3. State X holds what state Y was before the pin, but does not
   have the incompatibility information gathered in state Y.

Each iteration of the loop will:

1.  Identify Z. The incompatibility is not always caused by the latest
    state. For example, given three requirements A, B and C, with
    dependencies A1, B1 and C1, where A1 and B1 are incompatible: the
    last state might be related to C, so we want to discard the
    previous state.
2.  Discard Z.
3.  Discard Y but remember its incompatibility information gathered
    previously, and the failure we're dealing with right now.
4.  Push a new state Y' based on X, and apply the incompatibility
    information from Y to Y'.
5a. If this causes Y' to conflict, we need to backtrack again. Make Y'
    the new Z and go back to step 2.
5b. If the incompatibilities apply cleanly, end backtracking.

◆ _push_new_state()

pip._vendor.resolvelib.resolvers.Resolution._push_new_state (   self)
protected
Push a new state into history.

This new state will be used to hold resolution results of the next
coming round.

◆ _remove_information_from_criteria()

pip._vendor.resolvelib.resolvers.Resolution._remove_information_from_criteria (   self,
  criteria,
  parents 
)
protected
Remove information from parents of criteria.

Concretely, removes all values from each criterion's ``information``
field that have one of ``parents`` as provider of the requirement.

:param criteria: The criteria to update.
:param parents: Identifiers for which to remove information from all criteria.

The documentation for this class was generated from the following file: