class Graphlb::DataStructures::DirectedGraph
- Graphlb::DataStructures::DirectedGraph
- Reference
- Object
Overview
The DirectedGraph class represents a graph with all the vertices and directed edges
Defined in:
graphlb/data_structures/directedgraph.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