abstract class Crystalline::Graph::Graph(T, Edge)
- Crystalline::Graph::Graph(T, Edge)
- Reference
- Object
Included Modules
- Enumerable(T)
Direct Known Subclasses
Defined in:
graph/adjacency.crgraph/base.cr
graph/traversal.cr:119
graph/traversal.cr:150
Instance Method Summary
-
#==(g)
Returns
false
(other can only be aValue
here). - #adjacent_vertices(v)
- #bfs_iterator(v = self.find do |x| true end)
- #bfs_search_tree_from(v)
- #dfs_iterator(v = self.find do |x| true end)
- #directed?
-
#each(&)
Must yield this collection's elements to the block.
- #each_adjacent(v, &block : T -> )
- #each_edge(&)
- #each_vertex(&block : T -> )
- #edges
-
#empty?
Returns
true
ifself
is empty,false
otherwise. - #eql?(g)
- #has_vertex?(v)
- #num_edges
- #num_vertices
- #out_degree(v)
- #reverse
-
#size
Returns the number of elements in the collection.
- #to_adjacency
- #to_s(*args, **options)
- #to_s(*args, **options, &)
- #vertices
Instance Method Detail
def each(&)
#
Description copied from module Enumerable(T)
Must yield this collection's elements to the block.
def empty?
#
Description copied from module Enumerable(T)
Returns true
if self
is empty, false
otherwise.
([] of Int32).empty? # => true
([1]).empty? # => false
def size
#
Description copied from module Enumerable(T)
Returns the number of elements in the collection.
[1, 2, 3, 4].size # => 4