predecessorObserver.Path does not contain a definition

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

Hi,

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);
            distObserver.Attach(dijkstra);

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

            // Run the algorithm with A set to be the source
            dijkstra.Compute(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......