netket.graph.AbstractGraph

class netket.graph.AbstractGraph[source]

Bases: abc.ABC

Abstract class for NetKet graph objects.

__init__()

Initialize self. See help(type(self)) for accurate signature.

Attributes
n_edges

The number of edges in the graph.

Return type

int

n_nodes

The number of nodes (or vertices) in the graph

Return type

int

Methods
abstract adjacency_list()[source]

List containing the adjacency list of the graph where each node is represented by an integer in [0, n_nodes)

Return type

List[List]

abstract automorphisms()[source]

Symmetry group containing the automorphisms of the graph

abstract distances()[source]

List containing the distances between the nodes. The fact that some node may not be reachable from another is represented by -1

Return type

List[List]

abstract edges()[source]

Iterator over the edges of the graph

Return type

Iterator[Tuple[int, int]]

abstract is_bipartite()[source]

True if the graph is bipartite

Return type

bool

abstract is_connected()[source]

True if the graph is connected

Return type

bool

abstract nodes()[source]

Iterator over the nodes of the graph

Return type

Iterator[int]