Esempio n. 1
0
 public Vector(Vector other)
 {
     if (other == null)
     {
         throw new ArgumentNullException("other");
     }
     vector = new igraph_vector_t();
     DllImporter.igraph_vector_copy(vector, other.NativeInstance);
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
 public void Dispose()
 {
     if (vector == null)
     {
         return;
     }
     DllImporter.igraph_vector_destroy(vector);
     vector = null;
     GC.SuppressFinalize(this);
 }
Esempio n. 4
0
        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);
        }