module documentation
Undocumented
Function | _construct |
Generates a graph from its adjacency matrix. |
Function | _construct |
Generates a graph from its weighted adjacency matrix. |
Generates a graph from its adjacency matrix.
Parameters | |
cls | Undocumented |
matrix | the adjacency matrix. Possible types are:
|
mode | the mode to be used. Possible values are:
|
loops | specifies how to handle loop edges. When False or "ignore", the diagonal of the adjacency matrix will be ignored. When True or "once", the diagonal is assumed to contain the multiplicity of the corresponding loop edge. When "twice", the diagonal is assumed to contain twice the multiplicity of the corresponding loop edge. |
def _construct_graph_from_weighted_adjacency(cls, matrix, mode='directed', attr='weight', loops='once'):
(source)
¶
Generates a graph from its weighted adjacency matrix.
Only edges with a non-zero weight are created.
Parameters | |
cls | Undocumented |
matrix | the adjacency matrix. Possible types are:
|
mode | the mode to be used. Possible values are:
These values can also be given as strings without the ADJ prefix. |
attr | the name of the edge attribute that stores the edge weights. |
loops | specifies how to handle loop edges. When False or "ignore", the diagonal of the adjacency matrix will be ignored. When True or "once", the diagonal is assumed to contain the weight of the corresponding loop edge. When "twice", the diagonal is assumed to contain twice the weight of the corresponding loop edge. |