class Graphunk::WeightedDirectedGraph(T)

Included Modules

Defined in:

graphunk/classes/graphs/weighted_directed_graph.cr

Constructors

Macro Summary

Instance Method Summary

Instance methods inherited from module Graphunk::DirectedGraphMethods(T)

dfs dfs, edge_exists?(first_vertex, second_vertex) edge_exists?, reachable_by_two_path(start) reachable_by_two_path, square square, topological_sort topological_sort, transitive? transitive?, transpose transpose, transpose! transpose!

Instance methods inherited from module Graphunk::Graph(T)

add_vertex(vertex) add_vertex, add_vertices(names : Array(T))
add_vertices(*names)
add_vertices
, clone clone, degree(vertex) degree, edge_exists?(edge) edge_exists?, edges edges, edges_on_vertex(vertex) edges_on_vertex, neighbors(vertex) neighbors, remove_vertex(vertex) remove_vertex, vertex_exists?(vertex) vertex_exists?, vertices vertices

Constructor methods inherited from module Graphunk::Graph(T)

new(vertices = [] of T, edges = [] of Tuple(T, T)) new

Instance methods inherited from module Graphunk::WeightedGraph(T)

weights weights

Instance methods inherited from module Graphunk::Graph(T)

add_vertex(vertex) add_vertex, add_vertices(names : Array(T))
add_vertices(*names)
add_vertices
, clone clone, degree(vertex) degree, edge_exists?(edge) edge_exists?, edges edges, edges_on_vertex(vertex) edges_on_vertex, neighbors(vertex) neighbors, remove_vertex(vertex) remove_vertex, vertex_exists?(vertex) vertex_exists?, vertices vertices

Constructor methods inherited from module Graphunk::Graph(T)

new(vertices = [] of T, edges = [] of Tuple(T, T)) new

Constructor Detail

def self.new(vertices : Array(T) = [] of T, weights : Hash(Tuple(T, T), Int32) = {} of Tuple(T, T) => Int32) #

[View source]

Macro Detail

macro def_shortest_path_methods(method_name_prefix) #

[View source]

Instance Method Detail

def add_edge(v, u, w) #

[View source]
def add_edge(edge, weight) #

[View source]
def adjust_weight(v, u, w) #

[View source]
def adjust_weight(edge, weight) #

[View source]
def edge_weight(v, u) #

[View source]
def edge_weight(edge) #

[View source]
def remove_edge(v, u) #

[View source]
def remove_edge(edge) #

[View source]
def shortest_path(v, u, algorithm = Algorithms::Dijkstra) #

[View source]
def shortest_path_distance(v, u, algorithm = Algorithms::Dijkstra) #

[View source]