grapharray.classes.IncidenceMatrix

class grapharray.classes.IncidenceMatrix(base_graph: grapharray.classes.BaseGraph)[source]

Node-edge incidence matrix

__init__(base_graph: grapharray.classes.BaseGraph)[source]

Create incidence matrix.

Methods

__init__(base_graph)

Create incidence matrix.

Attributes

T

Transpose the array

array

Core array

base_graph

BaseGraph object on that this array itself is defined

edge_to_index

Correspondence between edges and array indices

edges

Tuple of all edges

is_transposed

Whether the array is transposed or not.

node_to_index

Correspondence between nodes and array indices

nodes

Tuple of all nodes

number_of_edges

The number of edges in the base graph

number_of_nodes

The number of nodes in the base graph