|
def | __init__ (self) |
| Constructor. More...
|
|
def | get_data_structure_type (self) |
|
def | add_vertex (self, k, e) |
| Adds a new vertex to the graph, initializes the adjacency list; user is responsible for checking if the vertex already exists. More...
|
|
def | add_edge (self, src, dest, weight=None) |
| Adds a new edge to the graph, adds it to the index corresponding to the source, destination vertex ids; this version of the method assumes an edge weight of 1 (unweighted graph); user is responsible for checking if the vertices already exist, else an exception is thrown. More...
|
|
def | vertices (self) |
|
def | set_vertex_data (self, src, vertex_data) |
|
def | get_vertex_data (self, src) |
|
def | set_edge_data (self, src, dest, data) |
|
def | get_edge_data (self, src, dest) |
|
def | get_adjacency_matrix (self, key=None) |
|
def | get_link_visualizer (self, src, dest) |
|
def | get_visualizer (self, vertex) |
|
def | get_data_structure_representation (self) |
| Get the JSON representation of the the data structure. More...
|
|
◆ __init__()
def bridges.graph_adj_matrix.GraphAdjMatrix.__init__ |
( |
|
self | ) |
|
◆ add_edge()
def bridges.graph_adj_matrix.GraphAdjMatrix.add_edge |
( |
|
self, |
|
|
|
src, |
|
|
|
dest, |
|
|
|
weight = None |
|
) |
| |
Adds a new edge to the graph, adds it to the index corresponding to the source, destination vertex ids; this version of the method assumes an edge weight of 1 (unweighted graph); user is responsible for checking if the vertices already exist, else an exception is thrown.
- Parameters
-
src | - source vertex of edge |
dest | - destination vertex of edge |
◆ add_vertex()
def bridges.graph_adj_matrix.GraphAdjMatrix.add_vertex |
( |
|
self, |
|
|
|
k, |
|
|
|
e |
|
) |
| |
Adds a new vertex to the graph, initializes the adjacency list; user is responsible for checking if the vertex already exists.
This method will replace the value for this key
- Parameters
-
k | - vertex key value |
e | - user specified data, part of the vertex data |
◆ get_adjacency_matrix()
def bridges.graph_adj_matrix.GraphAdjMatrix.get_adjacency_matrix |
( |
|
self, |
|
|
|
key = None |
|
) |
| |
Gets the adjacency matrix
@return - the graph's adjacency matrix
◆ get_data_structure_representation()
def bridges.graph_adj_matrix.GraphAdjMatrix.get_data_structure_representation |
( |
|
self | ) |
|
Get the JSON representation of the the data structure.
◆ get_data_structure_type()
def bridges.graph_adj_matrix.GraphAdjMatrix.get_data_structure_type |
( |
|
self | ) |
|
This method gets the data structure type
@return The date structure type as a string
◆ get_edge_data()
def bridges.graph_adj_matrix.GraphAdjMatrix.get_edge_data |
( |
|
self, |
|
|
|
src, |
|
|
|
dest |
|
) |
| |
◆ get_link_visualizer()
def bridges.graph_adj_matrix.GraphAdjMatrix.get_link_visualizer |
( |
|
self, |
|
|
|
src, |
|
|
|
dest |
|
) |
| |
This is a convenience method to simplify access to the link visualizer;
the method assumes the vertex names point to existing vertices, else an exception
is thrown
◆ get_vertex_data()
def bridges.graph_adj_matrix.GraphAdjMatrix.get_vertex_data |
( |
|
self, |
|
|
|
src |
|
) |
| |
◆ get_visualizer()
def bridges.graph_adj_matrix.GraphAdjMatrix.get_visualizer |
( |
|
self, |
|
|
|
vertex |
|
) |
| |
This is a convenience method to simplify access to the element visualizer;
the method assumes the vertex name points to an existing vertice, else an
exception is thrown
◆ set_edge_data()
def bridges.graph_adj_matrix.GraphAdjMatrix.set_edge_data |
( |
|
self, |
|
|
|
src, |
|
|
|
dest, |
|
|
|
data |
|
) |
| |
◆ set_vertex_data()
def bridges.graph_adj_matrix.GraphAdjMatrix.set_vertex_data |
( |
|
self, |
|
|
|
src, |
|
|
|
vertex_data |
|
) |
| |
◆ vertices()
def bridges.graph_adj_matrix.GraphAdjMatrix.vertices |
( |
|
self | ) |
|
The documentation for this class was generated from the following file: