class Graphlb::DataStructures::DirectedGraph

Overview

The DirectedGraph class represents a graph with all the vertices and directed edges

Defined in:

graphlb/data_structures/directedgraph.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

creats a graph


[View source]

Instance Method Detail

def 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


[View source]
def add_vertex(name) #

Add nodes to the graph with the given name


[View source]
def get_vertices #

returns informaton about all the vertices inside the graph


[View source]
def remove_edge(from_node : Node, to_node : Node) #

Removes the edge form the from_node to the to_node present in the graph


[View source]
def vertices : Array(Graphlb::DataStructures::Node) #

[View source]