private GraphEdge[] ParentEdges; // Stores the edge leading to each node. Used for distance and to track parent node connections.

    #endregion Fields

    #region Constructors

    public AStarPlanner(SparseGraph graph)
    {
        this.Graph = graph;
        OpenList = new List<GraphNode>();
        ClosedList = new List<GraphNode>();

        int allNodesCount = graph.GetAllNodesCount();
        FCosts = new double[allNodesCount];
        GCosts = new double[allNodesCount];
        ParentEdges = new GraphEdge[allNodesCount];
    }