Module: Plexus::DirectedMultiGraphBuilder

Includes:
DirectedPseudoGraphBuilder
Included in:
DirectedMultiGraph
Defined in:
lib/plexus/directed_graph.rb

Overview

This is a Digraph that allows for both parallel edges and loops.

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Methods included from GraphBuilder

#+, #-, #<<, #add_edge, #add_edges, #add_edges!, #add_vertex, #add_vertices, #add_vertices!, #adjacent, #adjacent?, #closed_pth_neighborhood, #complement, #connected?, #degree, #each, #edge?, #empty?, #eql?, #from_array, #in_degree, #include?, #induced_subgraph, #inspect, #max_degree, #max_in_degree, #max_out_degree, #merge, #min_degree, #min_in_degree, #min_out_degree, #neighborhood, #num_edges, #open_pth_neighborhood, #out_degree, #regular?, #remove_edge, #remove_edges, #remove_edges!, #remove_vertex, #remove_vertices, #remove_vertices!, #set_neighborhood, #size, #vertex?

Methods included from Dot

#dotty, #to_dot, #to_dot_graph, #write_to_graphic_file

Methods included from Labels

#[], #[]=, #clear_all_labels, #delete_label, #edge_label, #edge_label_delete, #edge_label_set, #vertex_label, #vertex_label_delete, #vertex_label_set

Instance Method Details

#initialize(*params) ⇒ Object



72
73
74
75
76
# File 'lib/plexus/directed_graph.rb', line 72

def initialize(*params)
  args = (params.pop if params.last.kind_of? Hash) || {}
  args[:loops] = true
  super *(params << args)
end