grapharray.classes.BaseGraphArray

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

Base object for creating vectors and matrices on networks.

This set up attributes used in both node variables and edge variables. All attributes are aliases of that of BaseGraph and thus are read-only.

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

Store BaseGraph instance on that the variable is defined.

Methods

__init__(base_graph)

Store BaseGraph instance on that the variable is defined.

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