predecessorObserver.Path does not contain a definition

Topics: algorithm, graph
Oct 28, 2009 at 7:20 AM


I m trying to run shortest path algo but found 1 error marked as red

            Func<Edge<int>, double> edgeCost = AlgorithmExtensions.GetIndexer(consts);
            DijkstraShortestPathAlgorithm<int, Edge<int>> dijkstra = new DijkstraShortestPathAlgorithm<int, Edge<int>>(graph, edgeCost);
            VertexDistanceRecorderObserver<int, Edge<int>> distObserver = new VertexDistanceRecorderObserver<int, Edge<int>>(edgeCost);

            // Attach a Vertex Predecessor Recorder Observer to give us the paths
            VertexPredecessorRecorderObserver<int, Edge<int>> predecessorObserver = new VertexPredecessorRecorderObserver<int, Edge<int>>();

            // Run the algorithm with A set to be the source

            // Get the path computed to the destination.
            System.Collections.Generic.List<Edge<int>> path = predecessorObserver.Path(destination);


FOUND:   Error    1    'QuickGraph.Algorithms.Observers.VertexPredecessorRecorderObserver<int,QuickGraph.Edge<int>>' does not contain a definition for 'Path' and no extension method 'Path' accepting a first argument of type


Can any one help me......