Method: RGL::ImplicitGraph#initialize

Defined in:
lib/rgl/implicit.rb

#initialize {|_self| ... } ⇒ ImplicitGraph

Create a new RGL::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.

Yields:

  • (_self)

Yield Parameters:



40
41
42
43
44
45
# File 'lib/rgl/implicit.rb', line 40

def initialize
  @directed          = false
  @vertex_iterator   = EMPTY_VERTEX_ITERATOR
  @adjacent_iterator = EMPTY_NEIGHBOR_ITERATOR
  yield self if block_given? # Let client overwrite defaults.
end