search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``igraph`.`Cut``

class documentation

`class Cut(VertexClustering): (source)`

Known subclasses: `igraph.Flow`

Constructor: `Cut(graph, value, cut, partition, partition2)`

View In Hierarchy

A cut of a given graph.

This is a simple class used to represent cuts returned by `Graph.mincut()`, `Graph.all_st_cuts()` and other functions that calculate cuts.

A cut is a special vertex clustering with only two clusters. Besides the usual `VertexClustering` methods, it also has the following attributes:

- `value` - the value (capacity) of the cut. It is equal to the number of edges if there are no capacities on the edges.
- `partition` - vertex IDs in the parts created after removing edges in the cut
- `cut` - edge IDs in the cut
- `es` - an edge selector restricted to the edges in the cut.

You can use indexing on this object to obtain lists of vertex IDs for both sides of the partition.

This class is usually not instantiated directly, everything is taken care of by the functions that return cuts.

Examples:

    >>> from igraph import Graph
    >>> g = Graph.Ring(20)
    >>> mc = g.mincut()
    >>> print(mc.value)
    2.0
    >>> print(min(len(x) for x in mc))
    1
    >>> mc.es["color"] = "red"

Method | `__init__` | Initializes the cut.
Method | `__repr__` | Undocumented
Method | `__str__` | Undocumented
Property | `cut` | Returns the edge IDs in the cut
Property | `es` | Returns an edge selector restricted to the cut
Property | `partition` | Returns the vertex IDs partitioned according to the cut
Property | `value` | Returns the sum of edge capacities in the cut
Instance Variable | `_cut` | Undocumented
Instance Variable | `_partition` | Undocumented
Instance Variable | `_value` | Undocumented

Inherited from `VertexClustering`:

Class Method | `FromAttribute` | Creates a vertex clustering based on the value of a vertex attribute.
Method | `__plot__` | Plots the clustering to the given Cairo context or matplotlib Axes.
Method | `as_cover` | Returns a `VertexCover` that contains the same clusters as this clustering.
Method | `cluster_graph` | Returns a graph where each cluster is contracted into a single vertex.
Method | `crossing` | Returns a boolean vector where element i is `True` iff edge i lies between clusters, `False` otherwise.
Method | `giant` | Returns the largest cluster of the clustered graph.
Method | `recalculate_modularity` | Recalculates the stored modularity value.
Method | `subgraph` | Get the subgraph belonging to a given cluster.
Method | `subgraphs` | Gets all the subgraphs belonging to each of the clusters.
Property | `graph` | Returns the graph belonging to this object
Property | `modularity` | Returns the modularity score
Method | `_formatted_cluster_iterator` | Iterates over the clusters and formats them into a string to be presented in the summary.
Method | `_recalculate_modularity_safe` | Recalculates the stored modularity value and swallows all exceptions raised by the modularity function (if any).
Class Variable | `_default_palette` | Undocumented
Instance Variable | `_graph` | Undocumented
Instance Variable | `_modularity` | Undocumented
Instance Variable | `_modularity_dirty` | Undocumented
Instance Variable | `_modularity_params` | Undocumented

Inherited from `Clustering` (via `VertexClustering`):

Method | `__getitem__` | Returns the members of the specified cluster.
Method | `__iter__` | Iterates over the clusters in this clustering.
Method | `__len__` | Returns the number of clusters.
Method | `compare_to` | Compares this clustering to another one using some similarity or distance metric.
Method | `size` | Returns the size of a given cluster.
Method | `size_histogram` | Returns the histogram of cluster sizes.
Method | `sizes` | Returns the size of given clusters.
Method | `summary` | Returns the summary of the clustering.
Property | `membership` | Returns the membership vector.
Property | `n` | Returns the number of elements covered by this clustering.
Instance Variable | `_len` | Undocumented
Instance Variable | `_membership` | Undocumented

def __init__(self, graph, value=None, cut=None, partition=None, partition2=None): (source)
overrides `igraph.VertexClustering.__init__`
overridden in `igraph.Flow`

Initializes the cut.

This should not be called directly, everything is taken care of by the functions that return cuts.

def __repr__(self): (source)
overridden in `igraph.Flow`

Undocumented

def __str__(self): (source)
overrides `igraph.Clustering.__str__`
overridden in `igraph.Flow`

Undocumented

@property
cut = (source)

Returns the edge IDs in the cut

@property
es = (source)

Returns an edge selector restricted to the cut

@property
partition = (source)

Returns the vertex IDs partitioned according to the cut

@property
value = (source)

Returns the sum of edge capacities in the cut

_cut = (source)

Undocumented

_partition = (source)

Undocumented

_value = (source)

Undocumented