Ejemplo n.º 1
0
 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);
     }
 }
Ejemplo n.º 2
0
 public void Dispose()
 {
     if (graph == null)
     {
         return;
     }
     DllImporter.igraph_destroy(graph);
     graph = null;
     GC.SuppressFinalize(this);
 }
Ejemplo n.º 3
0
 public Graph(int vertices, bool directed)
 {
     graph = new igraph_t();
     DllImporter.igraph_empty(graph, vertices, directed);
 }