Ejemplo n.º 1
0
        public Matrix LayoutWithKamadaKawai(int maxiter, double epsilon, double kkconst, Matrix initialCoords = null)
        {
            if (initialCoords != null && (initialCoords.Rows != Vertices || initialCoords.Columns != 2))
            {
                throw new ArgumentException("Initial coordinate matrix does not contain the required number of rows and columns.", "initialCoords");
            }
            var coords = initialCoords != null ? new Matrix(initialCoords) : new Matrix(Vertices, 2);

            DllImporter.igraph_layout_kamada_kawai(graph, coords.NativeInstance, initialCoords != null, maxiter, epsilon, kkconst, null, null, null, null, null);
            return(coords);
        }