Class | RGL::ImplicitGraph |
In: |
lib/rgl/implicit.rb
|
Parent: | Object |
EMPTY_VERTEX_ITERATOR | = | proc { |b| } |
EMPTY_NEIGHBOR_ITERATOR | = | proc { |x, b| } |
directed | [W] |
Create a new ImplicitGraph, which is empty by default. The caller should configure the graph using vertex and neighbor iterators. If the graph is directed, the client should set directed to true. The default value for directed is false.
Sets the adjacent_iterator to block, which must be a block of two parameters:
The first parameter is the vertex the neighbors of which are to be traversed. The second is the block which will be called for each neighbor of this vertex.
Sets the edge_iterator to block, which must be a block of two parameters: The first parameter is the source of the edges; the second is the target of the edge.
Sets the vertex_iterator to block, which must be a block of one parameter which again is the block called by each_vertex.