abstract class Crystalline::Graph::Graph(T, Edge)

Included Modules

Direct Known Subclasses

Defined in:

graph/adjacency.cr
graph/base.cr
graph/traversal.cr:119
graph/traversal.cr:150

Instance Method Summary

Instance Method Detail

def ==(g) #
Description copied from class Reference

Returns false (other can only be a Value here).


[View source]
def adjacent_vertices(v) #

[View source]
def bfs_iterator(v = self.find do |x| true end) #

[View source]
def bfs_search_tree_from(v) #

[View source]
def dfs_iterator(v = self.find do |x| true end) #

[View source]
def directed? #

[View source]
def each(&) #
Description copied from module Enumerable(T)

Must yield this collection's elements to the block.


[View source]
abstract def each_adjacent(v, &block : T -> ) #

[View source]
def each_edge(&) #

[View source]
abstract def each_vertex(&block : T -> ) #

[View source]
def edges #

[View source]
def empty? #
Description copied from module Enumerable(T)

Returns true if self is empty, false otherwise.

([] of Int32).empty? # => true
([1]).empty?         # => false

[View source]
def eql?(g) #

[View source]
def has_vertex?(v) #

[View source]
def num_edges #

[View source]
def num_vertices #

[View source]
def out_degree(v) #

[View source]
def reverse #

[View source]
def size #
Description copied from module Enumerable(T)

Returns the number of elements in the collection.

[1, 2, 3, 4].size # => 4

[View source]
def to_adjacency #

[View source]
def to_s(*args, **options) #

[View source]
def to_s(*args, **options, &) #

[View source]
def vertices #

[View source]