python-igraph API 参考

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

类文档

class GraphSummary

在层级结构中查看

图的摘要表示。

摘要表示包括一个标题行和边列表。标题行由以下内容组成:IGRAPH,后跟一个四字符长的代码,顶点数,边数,两个破折号(--)和图的名称(即name属性的内容,如果有)。例如,标题行可能如下所示

    IGRAPH U--- 4 5 --

四字符代码描述了图的一些基本属性。第一个字符是U如果图是无向的,D如果是定向的。第二个字母是N如果图具有名为name的顶点属性,否则为破折号。第三个字母是W如果图是加权的(即,它具有一个名为weight的边属性),否则为破折号。第四个字母是B如果图具有名为type;这通常用于二分图。

边可以表示为普通边列表或邻接表。默认情况下,这取决于边的数量;但是,您可以使用适当的构造函数参数来控制它。

方法 __init__ 构造图的摘要表示。
方法 __str__ 将摘要表示作为字符串返回。
实例变量 edge_list_format 未归档
实例变量 max_rows 未归档
实例变量 print_edge_attributes 未归档
实例变量 print_graph_attributes 未归档
实例变量 print_vertex_attributes 未归档
实例变量 verbosity 未归档
实例变量 width 未归档
实例变量 wrapper 未归档
方法 _construct_edgelist_adjlist 构造摘要中的一部分,该部分以邻接表格式打印边列表。
方法 _construct_edgelist_compressed 构造摘要中的一部分,该部分以压缩格式打印边列表,适用于具有较小度数的图。
方法 _construct_edgelist_edgelist 构造摘要中的一部分,该部分以完整边列表格式打印边列表。
方法 _construct_graph_attributes 构造摘要中的一部分,该部分列出图属性。
方法 _construct_header 构造摘要的标题部分。
方法 _construct_vertex_attributes 构造摘要中的一部分,该部分列出顶点属性。
方法 _edge_attribute_iterator 返回一个迭代器,该迭代器生成摘要中边属性表的行。attribute_order必须是一个列表,其中包含要在此表中显示的属性的名称。
方法 _infer_column_alignment 通过查看前 100 个顶点或边的属性值,推断表中给定顶点和边属性的首选对齐方式。数值属性将右对齐,其他所有内容将左对齐。
方法 _new_table 构造一个新表以美观地打印顶点和边属性
方法 _vertex_attribute_iterator 返回一个迭代器,该迭代器生成摘要中顶点属性表的行。attribute_order必须是一个列表,其中包含要在此表中显示的属性的名称。
实例变量 _arrow 未归档
实例变量 _arrow_format 未归档
实例变量 _edges_header 未归档
实例变量 _graph 未归档
def __init__(self, graph, verbosity=0, width=78, edge_list_format='auto', max_rows=99999, print_graph_attributes=False, print_vertex_attributes=False, print_edge_attributes=False, full=False):

构造图的摘要表示。

参数
未归档
verbosity摘要的详细程度。如果为零,则仅返回标题行。如果为 1,则将返回标题行和边列表。
width摘要中每行的最大宽度。None表示不强制执行任何限制。
edge_list_format摘要中边列表的格式。支持的格式为compressed, adjlist, edgelist, auto,它根据一些简单的标准从其他三个中自动选择。
max_rows在单个表中(例如,顶点属性表或边属性表)打印的最大行数
print_graph_attributes如果存在图属性是否打印。
print_vertex_attributes如果存在顶点属性是否打印。
print_edge_attributes如果存在边属性是否打印。
fullFalse 无效; True 打开详细程度 1 的图、顶点和边属性的属性打印。
def __str__(self):

将摘要表示作为字符串返回。

edge_list_format =

未归档

max_rows =

未归档

print_edge_attributes =

未归档

print_graph_attributes =

未归档

print_vertex_attributes =

未归档

verbosity =

未归档

width =

未归档

wrapper =

未归档

def _construct_edgelist_adjlist(self):

构造摘要中的一部分,该部分以邻接表格式打印边列表。

def _construct_edgelist_compressed(self):

构造摘要中的一部分,该部分以压缩格式打印边列表,适用于具有较小度数的图。

def _construct_edgelist_edgelist(self):

构造摘要中的一部分,该部分以完整边列表格式打印边列表。

def _construct_graph_attributes(self):

构造摘要中的一部分,该部分列出图属性。

def _construct_header(self):

构造摘要的标题部分。

def _construct_vertex_attributes(self):

构造摘要中的一部分,该部分列出顶点属性。

def _edge_attribute_iterator(self, attribute_order):

返回一个迭代器,该迭代器生成摘要中边属性表的行。attribute_order必须是一个列表,其中包含要在此表中显示的属性的名称。

def _infer_column_alignment(self, vertex_attrs=None, edge_attrs=None):

通过查看前 100 个顶点或边的属性值,推断表中给定顶点和边属性的首选对齐方式。数值属性将右对齐,其他所有内容将左对齐。

def _new_table(self, headers=None):

构造一个新表以美观地打印顶点和边属性

def _vertex_attribute_iterator(self, attribute_order):

返回一个迭代器,该迭代器生成摘要中顶点属性表的行。attribute_order必须是一个列表,其中包含要在此表中显示的属性的名称。

_arrow =

未归档

_arrow_format =

未归档

_edges_header: str =

未归档

_graph =

未归档