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

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

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.

Parameters
seqan 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.
def __len__(self):

Undocumented

kwds =

Undocumented

seq =

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 attrspec.
  • 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 attrspec.
Parameters
attr_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
Returns
the collected attributes
_cache =

Undocumented