Question

As part of my first experiments with C# (on Mono 2.6.7) , I am trying to use the StronglyConnectedComponents method from QuickGraph. Here is my code:

using System;
using QuickGraph;
using QuickGraph.Data;
using System.Collections.Generic;
using QuickGraph.Algorithms;

namespace Graph
{
    class MainClass
    {
        public static void Main (string[] args)
        {
            IVertexListGraph<int,Edge<int>> graph;
            graph = new AdjacencyGraph<int,Edge<int>>();
            IDictionary<int,int> components=new Dictionary<int,int>();  
            int noc = graph.StronglyConnectedComponents(out components);
        }
    }
}

When trying to compile the code above, I get the error message (in MonoDevelop):

Error CS1061: Type `QuickGraph.IVertexListGraph<int,QuickGraph.Edge<int>>' does not 
contain a definition for `StronglyConnectedComponents' and no extension method 
`StronglyConnectedComponents' of type 
`QuickGraph.IVertexListGraph<int,QuickGraph.Edge<int>>' could be found 
(are you missing a using directive or an assembly reference?) (CS1061) (Graph)

As for as I can see from the documentation, the extension method should be available:

public static int StronglyConnectedComponents<TVertex, TEdge>(
    IVertexListGraph<TVertex, TEdge> g,
    out IDictionary<TVertex, int> components
)

Also, I referred all three .dll's from QuickGraph. What am I missing?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top