private void f(AStarGoal<N> goal, N node, N neighbour) {
    float g = node.g + goal.g(node, neighbour); // estimate the cost from
    // the start additively
    float h = goal.h(neighbour);

    neighbour.f = g + h;
    neighbour.g = g;
    neighbour.h = h;
  }
 private AStarStorage getInitialisedStorage(AStarGoal<N> goal, N start) {
   AStarStorage storage = storageSupplier.get();
   storage.open(start);
   start.f = goal.getInitialCost(start);
   return storage;
 }