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