![]() |
Qucs-S S-parameter Viewer & RF Synthesis Tools
|


Public Member Functions | |
| __init__ (self) | |
| add_distribution (self, distribution) | |
| add_edge (self, x, y, label=None) | |
| add_missing (self, distribution, requirement) | |
| repr_node (self, dist, level=1) | |
| to_dot (self, f, skip_disconnected=True) | |
| topological_sort (self) | |
| __repr__ (self) | |
Public Attributes | |
| adjacency_list | |
| reverse_list | |
| missing | |
Protected Member Functions | |
| _repr_dist (self, dist) | |
Represents a dependency graph between distributions. The dependency relationships are stored in an ``adjacency_list`` that maps distributions to a list of ``(other, label)`` tuples where ``other`` is a distribution and the edge is labeled with ``label`` (i.e. the version specifier, if such was provided). Also, for more efficient traversal, for every distribution ``x``, a list of predecessors is kept in ``reverse_list[x]``. An edge from distribution ``a`` to distribution ``b`` means that ``a`` depends on ``b``. If any missing dependencies are found, they are stored in ``missing``, which is a dictionary that maps distributions to a list of requirements that were not provided by any other distributions.
| pip._vendor.distlib.database.DependencyGraph.__repr__ | ( | self | ) |
Representation of the graph
| pip._vendor.distlib.database.DependencyGraph.add_distribution | ( | self, | |
| distribution | |||
| ) |
Add the *distribution* to the graph.
:type distribution: :class:`distutils2.database.InstalledDistribution`
or :class:`distutils2.database.EggInfoDistribution`
| pip._vendor.distlib.database.DependencyGraph.add_edge | ( | self, | |
| x, | |||
| y, | |||
label = None |
|||
| ) |
Add an edge from distribution *x* to distribution *y* with the given
*label*.
:type x: :class:`distutils2.database.InstalledDistribution` or
:class:`distutils2.database.EggInfoDistribution`
:type y: :class:`distutils2.database.InstalledDistribution` or
:class:`distutils2.database.EggInfoDistribution`
:type label: ``str`` or ``None``
| pip._vendor.distlib.database.DependencyGraph.add_missing | ( | self, | |
| distribution, | |||
| requirement | |||
| ) |
Add a missing *requirement* for the given *distribution*.
:type distribution: :class:`distutils2.database.InstalledDistribution`
or :class:`distutils2.database.EggInfoDistribution`
:type requirement: ``str``
| pip._vendor.distlib.database.DependencyGraph.repr_node | ( | self, | |
| dist, | |||
level = 1 |
|||
| ) |
Prints only a subgraph
| pip._vendor.distlib.database.DependencyGraph.to_dot | ( | self, | |
| f, | |||
skip_disconnected = True |
|||
| ) |
Writes a DOT output for the graph to the provided file *f*. If *skip_disconnected* is set to ``True``, then all distributions that are not dependent on any other distribution are skipped. :type f: has to support ``file``-like operations :type skip_disconnected: ``bool``
| pip._vendor.distlib.database.DependencyGraph.topological_sort | ( | self | ) |
Perform a topological sort of the graph.
:return: A tuple, the first element of which is a topologically sorted
list of distributions, and the second element of which is a
list of distributions that cannot be sorted because they have
circular dependencies and so form a cycle.