public Vector(Vector other) { if (other == null) { throw new ArgumentNullException("other"); } vector = new igraph_vector_t(); DllImporter.igraph_vector_copy(vector, other.NativeInstance); }
public Vector(int length) { if (length < 0) { throw new ArgumentException("Rows and Columns must be >= 0"); } vector = new igraph_vector_t(); DllImporter.igraph_vector_init(vector, length); }
public void Dispose() { if (vector == null) { return; } DllImporter.igraph_vector_destroy(vector); vector = null; GC.SuppressFinalize(this); }
public Vector(IEnumerable <double> data) { if (data == null) { throw new ArgumentNullException("data"); } var vec = data.ToArray(); vector = new igraph_vector_t(); DllImporter.igraph_vector_init_copy(vector, vec); }