Question on creating an instance of UndirectedVertexDistanceRecorderObserver

Topics: algorithm, graph
Feb 28, 2010 at 4:53 AM

Hello, I'm new to Quickgraph and I've been working on an implementation of Breadth-First Search, I need to calculate the distance between an arbitrary start/root node and an end node.  I have the following instantiation of a distance recorder:

var distObserver =  new UndirectedVertexDistanceRecorderObserver<Vertex, TaggedEdge<Vertex, double>>();


where Vertex is a class I defined elsewhere in code.

For some reason I keep getting the error:

'QuickGraph.Algorithms.Observers.UndirectedVertexDistanceRecorderObserver<_469_A3.Vertex,QuickGraph.TaggedEdge<_469_A3.Vertex,double>>' does not contain a constructor that takes '0' arguments

 

Looking online, I've found other examples seem to declare it just as I have above without any complaint, I'm not sure what I'm doing wrong.  Also, I've read that the AlgorithmsExtension handles this manually, is there an example of this somewhere on this site??  Thank you.