simple vertex class, normaly would not be needed but it can speed up many analytical tasks
to store data directly in vertex and not get them from the graph connectivity matrix.
vertex has a value attribute used to store arbitrary object
Methods
|
|
|
|
__init__
|
__init__ ( self )
|
|
__str__
|
__str__ ( self )
|
|
add_neighbor
|
add_neighbor (
self,
v,
e,
)
adds a neighbor connected via e
|
|
get_degree
|
get_degree ( self )
|
|
get_edge_leading_to
|
get_edge_leading_to ( self, a )
|
|
get_neighbor_connected_via
|
get_neighbor_connected_via ( self, e )
|
|
get_neighbor_edge_pairs
|
get_neighbor_edge_pairs ( self )
|
|
get_neighbor_edges
|
get_neighbor_edges ( self )
|
|
get_neighbors
|
get_neighbors ( self )
|
|
get_neighbors_with_distance
|
get_neighbors_with_distance ( self, d )
|
|
remove_edge_and_neighbor
|
remove_edge_and_neighbor ( self, e )
|
|
remove_neighbor
|
remove_neighbor ( self, v )
|
|