python-igraph API reference

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

class documentation

class AttributeCollectorBase(object):

View In Hierarchy

Base class for attribute collector subclasses. Classes that inherit this class may use a declarative syntax to specify which vertex or edge attributes they intend to collect. See AttributeCollectorMeta for the details.

Method __init__ Constructs a new attribute collector that uses the given vertex/edge sequence and the given dict as data sources.
Instance Variable seq Undocumented
Instance Variable kwds Undocumented
Method __getitem__ Returns the collected attributes of the vertex/edge with the given index.
Method __len__ Undocumented
Instance Variable _cache Undocumented
Method _collect_attributes Collects graph visualization attributes from various sources.
def __init__(self, seq, kwds=None):

Constructs a new attribute collector that uses the given vertex/edge sequence and the given dict as data sources.

Parametersseqan igraph.VertexSeq or igraph.EdgeSeq class that will be used as a data source for attributes.
kwdsa Python dict that will be used to override the attributes collected from seq if necessary.
_cache =

Undocumented

seq =

Undocumented

kwds =

Undocumented

def _collect_attributes(self, attr_spec, config=None):

Collects graph visualization attributes from various sources.

This method can be used to collect the attributes required for graph visualization from various sources. Attribute value sources are:

  • A specific value of a Python dict belonging to a given key. This dict is given by the argument self.kwds at construction time, and the name of the key is determined by the argument specification given in attr_spec.
  • A vertex or edge sequence of a graph, given in self.seq
  • The global configuration, given in config
  • A default value when all other sources fail to provide the value. This is also given in attr_spec.
Parametersattr_specan AttributeSpecification object which contains the name of the attribute when it is coming from a list of Python keyword arguments, the name of the attribute when it is coming from the graph attributes directly, the default value of the attribute and an optional callable transformation to call on the values. This can be used to ensure that the attributes are of a given type.
configa Configuration object to be used for determining the defaults if all else fails. If None, the global igraph configuration will be used
Returnsthe collected attributes
def __getitem__(self, index):

Returns the collected attributes of the vertex/edge with the given index.

def __len__(self):

Undocumented

API Documentation for python-igraph, generated by pydoctor 21.2.2 at 2021-10-18 16:22:54.