class Graphlb::DataStructures::UnDirectedGraph
- Graphlb::DataStructures::UnDirectedGraph
- Reference
- Object
Overview
The UnDirectedGraph class represents a graph with all the vertices and undirectededges
Defined in:
graphlb/data_structures/undirectedgraph.crConstructors
-
.new
creats a graph
Instance Method Summary
-
#add_edge(from_node : Node, to_node : Node, weight)
Add edges to the graph from the from_node to to_node with a given edge_weight
-
#add_vertex(name)
Add nodes to the graph with the given name
-
#get_vertices
returns informaton about all the vertices inside the graph
-
#remove_edge(from_node : Node, to_node : Node)
Removes the edge form the from_node to the to_node present in the graph
- #vertices : Array(Graphlb::DataStructures::Node)
Constructor Detail
Instance Method Detail
Add edges to the graph from the from_node to to_node with a given edge_weight
Removes the edge form the from_node to the to_node present in the graph