Class: Mementus::MutableGraph
- Includes:
- Mutators
- Defined in:
- lib/mementus/mutable_graph.rb
Instance Method Summary collapse
-
#initialize ⇒ MutableGraph
constructor
A new instance of MutableGraph.
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
#initialize ⇒ MutableGraph
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 |