Class: Mementus::MutableGraph

Inherits:
Graph
  • Object
show all
Includes:
Mutators
Defined in:
lib/mementus/mutable_graph.rb

Instance Method Summary collapse

Methods included from Mutators

#add_edge, #add_node, #create_edge, #create_node, #remove_edge, #remove_node, #set_edge, #set_node

Methods inherited from Graph

#directed?, #each_edge, #each_node, #edge, #edges, #edges_count, #has_edge?, #has_node?, #incoming, #incoming_edges, #n, #node, #nodes, #nodes_count, #outgoing, #outgoing_edges

Constructor Details

#initializeMutableGraph

Returns a new instance of MutableGraph.



5
6
7
8
9
# File 'lib/mementus/mutable_graph.rb', line 5

def initialize
  @structure = Structure::IncidenceList.new(true)
  @node_ids = IntegerId.new
  @edge_ids = IntegerId.new
end