Refactor usages of Graph
Created by: gkirgizov
Currently evo operators and other users of the Graph (& OptGraph) access specifics of its implementations.
What requires refactoring (this list may be incomplete):
-
accesses to internal graph.operator
-
direct usages of graph.nodes
-- instead they must modify Graph through some general public method likeadd_node
-
connect_nodes
anddisconnect_nodes
sound likeadd_edge
andremove_edge
-- and that should be part of the general graph interface -
node_children
also sounds like a general abstract method
All changes must be accompanied with tests checking that nothing has been broken.
All this points to one simple aim: all usages of the Graph must happen through public interface This is a necessary step for abstracting GraphOptimiser for new domains.