python-igraph API reference

List of all classes, functions and methods in python-igraph

class documentation

class DyadCensus(tuple):

View In Hierarchy

Dyad census of a graph.

This is a pretty simple class - basically it is a tuple, but it allows the user to refer to its individual items by the names mutual (or mut), asymmetric (or asy or asym or asymm) and null.

Examples:

>>> from igraph import Graph
>>> g=Graph.Erdos_Renyi(100, 0.2, directed=True)
>>> dc=g.dyad_census()
>>> print(dc.mutual)            #doctest:+SKIP
179
>>> print(dc["asym"])           #doctest:+SKIP
1609
>>> print(tuple(dc), list(dc))  #doctest:+SKIP
(179, 1609, 3162) [179, 1609, 3162]
>>> print(sorted(dc.as_dict().items()))  #doctest:+ELLIPSIS
[('asymmetric', ...), ('mutual', ...), ('null', ...)]
Method __getattr__ Undocumented
Method __getitem__ Undocumented
Method __repr__ Undocumented
Method __str__ Undocumented
Method as_dict Converts the dyad census to a dict using the known dyad names.
Class Variable _remap Undocumented
def __getattr__(self, attr):

Undocumented

def __getitem__(self, idx):

Undocumented

def __repr__(self):

Undocumented

def __str__(self):

Undocumented

def as_dict(self):

Converts the dyad census to a dict using the known dyad names.

_remap: dict[str, int] =

Undocumented