public void calculate(FibonacciHeapNode source) {
        NotTreatedNodes = new FibonacciHeap();
        distances = new HashMap<FibonacciHeapNode, Integer>();
        predecessors = new HashMap<FibonacciHeapNode, FibonacciHeapNode>();
        // set infinity to all other node than myself
        for (FibonacciHeapNode entry : distances.keySet()) {
            distances.put(entry, Integer.MAX_VALUE);
        }
        for (FibonacciHeapNode node : this.nodes) {
            if (node == source) {
                NotTreatedNodes.insert(source, 0);
            } else {
                NotTreatedNodes.insert(node, Integer.MAX_VALUE);
            }
        }
        distances.put(source, 0);
        // tant que N' != V
        while (!NotTreatedNodes.isEmpty()) {
            // find u not in N' such that D(u) is minimum
            FibonacciHeapNode closestNode = NotTreatedNodes.removeMin();
            // for each v adjacent to u
            List<FibonacciHeapNode> adjacentNodes = getNeighbors(closestNode);
            for (FibonacciHeapNode target : adjacentNodes) {
                // if you have Integer.Max_Value and add a distance, it makes a negative distance (took me a while debugging that)
                    // if you have Integer.Max_Value and add a distance, it makes a negative distance (took me a while debugging that)
                int somme = 0;
                if (getShortestDistance(closestNode) == Integer.MAX_VALUE || getDistance(closestNode, target) == Integer.MAX_VALUE) {
                    somme = Integer.MAX_VALUE;
                } else {
                    somme = getShortestDistance(closestNode) + getDistance(closestNode, target);
                }
                if ( getShortestDistance(target) > somme) {
                    distances.put(target, getShortestDistance(closestNode) + getDistance(closestNode, target));
                    predecessors.put(target, closestNode);
                    NotTreatedNodes.decreaseKey(target, getShortestDistance(closestNode) + getDistance(closestNode, target));
                }
            }
        }
    }