python-igraph API 参考

python-igraph 中所有类、函数和方法的列表

类文档

class GephiGraphStreamingAPIFormat

在层级结构中查看

实现 Gephi 图流式传输 API 格式并返回与 API 中定义的事件相对应的 Python 对象。

方法 get_add_edge_event 生成一个 Python 对象,该对象对应于 Gephi 图流式传输 API 中添加具有给定源、目标、方向性和属性的边的事件。
方法 get_add_node_event 生成一个 Python 对象,该对象对应于 Gephi 图流式传输 API 中添加具有给定标识符和属性的节点的事件。
方法 get_change_edge_event 生成一个 Python 对象,该对象对应于 Gephi 图流式传输 API 中更改某些边的属性的事件。 给定的属性将合并到现有属性中; 使用 C{None} 作为属性值来删除给定的属性。
方法 get_change_node_event 生成一个 Python 对象,该对象对应于 Gephi 图流式传输 API 中更改某些节点的属性的事件。 给定的属性将合并到现有属性中; 使用 C{None} 作为属性值来删除给定的属性。
方法 get_delete_edge_event 生成一个 Python 对象,该对象对应于 Gephi 图流式传输 API 中删除具有给定标识符的边的事件。
方法 get_delete_node_event 生成一个 Python 对象,该对象对应于 Gephi 图流式传输 API 中删除具有给定标识符的节点的事件。
def get_add_edge_event(self, identifier, source, target, directed, attributes={}):

生成一个 Python 对象,该对象对应于 Gephi 图流式传输 API 中添加具有给定源、目标、方向性和属性的边的事件。

def get_add_node_event(self, identifier, attributes={}):

生成一个 Python 对象,该对象对应于 Gephi 图流式传输 API 中添加具有给定标识符和属性的节点的事件。

示例

>>> api = GephiGraphStreamingAPIFormat()
>>> api.get_add_node_event("spam")
{'an': {'spam': {}}}
>>> api.get_add_node_event("spam", dict(ham="eggs"))
{'an': {'spam': {'ham': 'eggs'}}}
def get_change_edge_event(self, identifier, attributes):

生成一个 Python 对象,该对象对应于 Gephi 图流式传输 API 中更改某些边的属性的事件。 给定的属性将合并到现有属性中; 使用 C{None} 作为属性值来删除给定的属性。

示例

>>> api = GephiGraphStreamingAPIFormat()
>>> api.get_change_edge_event("spam", dict(ham="eggs"))
{'ce': {'spam': {'ham': 'eggs'}}}
>>> api.get_change_edge_event("spam", dict(ham=None))
{'ce': {'spam': {'ham': None}}}
def get_change_node_event(self, identifier, attributes):

生成一个 Python 对象,该对象对应于 Gephi 图流式传输 API 中更改某些节点的属性的事件。 给定的属性将合并到现有属性中; 使用 C{None} 作为属性值来删除给定的属性。

示例

>>> api = GephiGraphStreamingAPIFormat()
>>> api.get_change_node_event("spam", dict(ham="eggs"))
{'cn': {'spam': {'ham': 'eggs'}}}
>>> api.get_change_node_event("spam", dict(ham=None))
{'cn': {'spam': {'ham': None}}}
def get_delete_edge_event(self, identifier):

生成一个 Python 对象,该对象对应于 Gephi 图流式传输 API 中删除具有给定标识符的边的事件。

示例

>>> api = GephiGraphStreamingAPIFormat()
>>> api.get_delete_edge_event("spam:ham")
{'de': {'spam:ham': {}}}
def get_delete_node_event(self, identifier):

生成一个 Python 对象,该对象对应于 Gephi 图流式传输 API 中删除具有给定标识符的节点的事件。

示例

>>> api = GephiGraphStreamingAPIFormat()
>>> api.get_delete_node_event("spam")
{'dn': {'spam': {}}}