Exemple #1
0
        public Matrix LayoutWithDavidsonHarel(int maxiter, int fineiter, double cool_fact, double weight_node_dist, double weight_border, double weight_edge_lengths, double weight_edge_crossings, double weight_node_edge_dist, 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_davidson_harel(graph, coords.NativeInstance, initialCoords != null, maxiter, fineiter, cool_fact, weight_node_dist, weight_border, weight_edge_lengths, weight_edge_crossings, weight_node_edge_dist);
            return(coords);
        }