コード例 #1
0
ファイル: Graph.cs プロジェクト: YChuan1115/HeuristicLab
 public Graph(int vertices, IEnumerable <Tuple <int, int> > edges, bool directed)
 {
     graph = new igraph_t();
     DllImporter.igraph_empty(graph, vertices, directed);
     foreach (var e in edges)
     {
         DllImporter.igraph_add_edge(graph, e.Item1, e.Item2);
     }
 }
コード例 #2
0
ファイル: Graph.cs プロジェクト: YChuan1115/HeuristicLab
 public void Dispose()
 {
     if (graph == null)
     {
         return;
     }
     DllImporter.igraph_destroy(graph);
     graph = null;
     GC.SuppressFinalize(this);
 }
コード例 #3
0
ファイル: Graph.cs プロジェクト: YChuan1115/HeuristicLab
 public Graph(int vertices, bool directed)
 {
     graph = new igraph_t();
     DllImporter.igraph_empty(graph, vertices, directed);
 }