grapharray.classes.AdjacencyMatrix¶
- class grapharray.classes.AdjacencyMatrix(weight: grapharray.classes.EdgeArray, sparse_format: str = 'csr')[source]¶
N x N matrix
- __init__(weight: grapharray.classes.EdgeArray, sparse_format: str = 'csr')[source]¶
Create a matrix
- Parameters
weight – the element values of the matrix. The value of weight[init, term] is set to the (init, term) element of the matrix.
sparse_format – str in {‘bsr’, ‘csr’, ‘csc’, ‘coo’, ‘lil’, ‘dia’,
‘dok’} –
matrix. (the format of the sparse) –
Methods
__init__(weight[, sparse_format])Create a matrix
Attributes
TTranspose the array
arrayCore array
base_graphBaseGraph object on that this array itself is defined
edge_to_indexCorrespondence between edges and array indices
edgesTuple of all edges
is_transposedWhether the array is transposed or not.
node_to_indexCorrespondence between nodes and array indices
nodesTuple of all nodes
number_of_edgesThe number of edges in the base graph
number_of_nodesThe number of nodes in the base graph