class UnGraph(T)

Included Modules

Defined in:

graph.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from module Graph(WeightedEdge(T), WeightedEdge2(T))

<<(edge : Tuple) : self
<<(edge : Edge2(T))
<<
, [](*args, **options)
[](*args, **options, &)
[]
, add_edges(edges : Enumerable) : self add_edges, bfs(start : Int) : Array(Int32?) bfs, bfs!(start : Int) : Array(Int32) bfs!, bfs01(start : Int) : Array(Int32?)
bfs01(start : Int, &) : Array(Int32?)
bfs01
, bfs01!(start : Int) : Array(Int32)
bfs01!(start : Int32, &) : Array(Int32)
bfs01!
, bfs01_st(start : Int, goal : Int) : Int32?
bfs01_st(start : Int, goal : Int, &) : Int32?
bfs01_st
, bfs01_st!(start : Int, goal : Int, &) : Int32
bfs01_st!(start : Int, goal : Int) : Int32
bfs01_st!
, bfs_st(start : Int, goal : Int) : Int32? bfs_st, bipartite_graph : Array(Bool)? bipartite_graph, components : Tuple(Int32, Array(Int32), Array(Set(Int32))) components, compress : self compress, decompose : Tuple(Array(self), Array(Tuple(Int32, Int32)), Array(Array(Int32))) decompose, detect_cycle : Array(Edge(T))? detect_cycle, diameter diameter, dijkstra(start : Int)
dijkstra(start : Int, goal : Int)
dijkstra
, dijkstra!(start : Int, goal : Int)
dijkstra!(start : Int)
dijkstra!
, dijkstra_with_path(start : Int, goal : Int) dijkstra_with_path, dijkstra_with_prev(start : Int) dijkstra_with_prev, each(&) : Nil each, each_child(vertex : Int, parent)
each_child(vertex : Int, parent, &) : Nil
each_child
, graph : Array(Array(Edge(T))) graph, indegree : Array(Int32) indegree, inspect(io : IO) : Nil inspect, kruskal kruskal, namori_decompose : Tuple(self, Array(Int32)) namori_decompose, outdegree : Array(Int32) outdegree, parent_table(root : Int32) : Array(Int32?) parent_table, post_order(root : Int) : Array(Int32) post_order, pre_order(root : Int) : Array(Int32) pre_order, reverse : self reverse, size(*args, **options, &)
size(*args, **options)
size
, subtree_size(root : Int32) : Array(Int32) subtree_size, to_s(io : IO) : Nil to_s, to_undirected : self to_undirected, topological_sort : Array(Int32)? topological_sort, tree_distance(root : Int32) tree_distance, tree_path(start : Int32, goal : Int32, &) : Nil
tree_path(start : Int32, goal : Int32) : Array(Int32)
tree_path

Constructor methods inherited from module Graph(WeightedEdge(T), WeightedEdge2(T))

new(size : Int, edges : Enumerable)
new(size : Int)
new

Class methods inherited from module Graph(WeightedEdge(T), WeightedEdge2(T))

restore_path(prev : Array(Int32?), v : Int) : Array(Int32) restore_path

Instance methods inherited from module Enumerable(WeightedEdge2(T))

accumulate(init : U) : Array(U) forall U
accumulate : Array(T(T))
accumulate(init : U, &block : U, T(T) -> U) : Array(U) forall U
accumulate(&block : T(T), T(T) -> T(T)) : Array(T(T))
accumulate
, mex : T(T) mex, mex_sorted : T(T) mex_sorted, tally(*, default : Int32) : Hash(T(T), Int32) tally, unique : self
unique(&) : self
unique

Constructor Detail

def self.new(size : Int, edges : Enumerable(WeightedEdge2(T))) #

[View source]
def self.new(size : Int, edges : Enumerable(Tuple(Int32, Int32, T))) #

[View source]
def self.new(size : Int) #

[View source]

Class Method Detail

def self.directed? #

[View source]
def self.weighted? #

[View source]

Instance Method Detail

def <<(edge : WeightedEdge2(T)) : self #

[View source]