private void Init(AbstractGraph <TNode, TEdgeWeight> graph)
 {
     _graph          = graph;
     _bfsQueue       = new Queue <TNode>();
     _result         = new Dictionary <TNode, int>();
     _visitedNodes   = new HashSet <TNode>();
     _unvisitedNodes = new HashSet <TNode>(_graph.GetNodes());
 }
        public Dictionary <TNode, int> FindShortestHops(AbstractGraph <TNode, TEdgeWeight> graph, TNode sourceNode)
        {
            Init(graph);
            _result.Add(sourceNode, 0);
            BfsSearch(sourceNode);

            return(_result);
        }