Derived the machine implementation of the naive algorithm.
Made _addEdge private.