python-igraph manual

For using igraph from Python

   Home       Trees       Indices       Help   
Package igraph :: Package drawing :: Module metamagic :: Class AttributeSpecification
[hide private]

Class AttributeSpecification

source code

object --+
         |
        AttributeSpecification

Class that describes how the value of a given attribute should be retrieved.

The class contains the following members:

  • name: the name of the attribute. This is also used when we are trying to get its value from a vertex/edge attribute of a graph.
  • alt_name: alternative name of the attribute. This is used when we are trying to get its value from a Python dict or an igraph.Configuration object. If omitted at construction time, it will be equal to name.
  • default: the default value of the attribute when none of the sources we try can provide a meaningful value.
  • transform: optional transformation to be performed on the attribute value. If None or omitted, it defaults to the type of the default value.
  • func: when given, this function will be called with an index in order to derive the value of the attribute.
Instance Methods [hide private]
 
__init__(self, name, default=None, alt_name=None, transform=None, func=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  accessor
  alt_name
  default
  func
  name
  transform

Inherited from object: __class__

Method Details [hide private]

__init__(self, name, default=None, alt_name=None, transform=None, func=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

   Home       Trees       Indices       Help