Class RGL::ImplicitGraph
In: lib/rgl/implicit.rb
Parent: Object

Methods

Included Modules

Graph

Constants

EMPTY_VERTEX_ITERATOR = proc { |b| }
EMPTY_NEIGHBOR_ITERATOR = proc { |x, b| }

Attributes

directed  [W] 

Public Class methods

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.

Public Instance methods

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.

Returns the value of @directed.

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.

[Validate]