public void execute() {


        // List of new nodes with predecessors (as bfs state): nodes where we might still add a successor without going beyond the maxDistance.
        Queue<BFSState<N, E>> greyNodes = new LinkedList<BFSState<N, E>>();
        // Set of nodes that have are certain to lie within the max distance: we cannot add another node without going beyond the mxDistance.
        Set<BFSState<N, E>> blackNodes = new HashSet<BFSState<N, E>>();

        BFSState<N, E> ws = new BFSState<N, E>(this.source);
        ws.distance = 0.f;
        greyNodes.add(ws);

        while (!greyNodes.isEmpty()) {
            BFSState<N, E> wu = greyNodes.remove();


            // TODO : Is the context set correctly here?
            contextualReachability.setContext(wu);
            Iterator<InternalNode<N, E>> outEdges = this.graph.getOutGoingEdges(wu.internalNode, contextualReachability);
            while (outEdges.hasNext()) {
                InternalNode<N, E> v = outEdges.next();
                BFSState<N, E> wv = new BFSState<N, E>(v);
                if (!greyNodes.contains(wv) && !blackNodes.contains(wv)) {
                    wv.distance = wu.distance + wu.internalNode.getWeightTo(v, weightIndex);
                    if (wv.distance <= maxDistance) {
                        wv.setPredecessor(wu);
                        greyNodes.add(wv);
                    }
                }
            }

            blackNodes.add(wu);
        }

        this.result = new GraphTreeImpl<N, E>(ws);

    }