C#(Mono 2.6.7)での最初の実験の一環として、QuickGraphのStronglyConnectedComponentsメソッドを使用しようとしています。これが私のコードです:
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);
}
}
}
上記のコードをコンパイルしようとすると、(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)
ドキュメントからわかるように、拡張メソッドが利用可能である必要があります。
public static int StronglyConnectedComponents<TVertex, TEdge>(
IVertexListGraph<TVertex, TEdge> g,
out IDictionary<TVertex, int> components
)
また、QuickGraphから3つすべての.dllを参照しました。私は何が欠けていますか?