From: Emden Gansner Date: Tue, 7 Aug 2012 14:58:10 +0000 (-0400) Subject: With maxiter = 0, allow initial positions to be assigned before returning X-Git-Tag: LAST_LIBGRAPH~32^2~358^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2c5ca386a309c83efa354a9c2489b61610955882;p=graphviz With maxiter = 0, allow initial positions to be assigned before returning --- diff --git a/lib/neatogen/neatoinit.c b/lib/neatogen/neatoinit.c index e5c40d687..ff753fdb5 100644 --- a/lib/neatogen/neatoinit.c +++ b/lib/neatogen/neatoinit.c @@ -1540,7 +1540,7 @@ neatoLayout(Agraph_t * mg, Agraph_t * g, int layoutMode, int layoutModel, MaxIter = 100 * agnnodes(g); nG = scan_graph_mode(g, layoutMode); - if ((nG < 2) || (MaxIter <=0)) + if ((nG < 2) || (MaxIter < 0)) return; if (layoutMode) majorization(mg, g, nG, layoutMode, layoutModel, Ndim, MaxIter, am); diff --git a/lib/neatogen/stress.c b/lib/neatogen/stress.c index c651f770e..ba6565783 100644 --- a/lib/neatogen/stress.c +++ b/lib/neatogen/stress.c @@ -939,7 +939,7 @@ int stress_majorization_kD_mkernel(vtx_data * graph, /* Input graph in sparse re ** Compute the all-pairs-shortest-distances matrix ** ****************************************************/ - if (maxi == 0) + if (maxi < 0) return 0; if (Verbose) @@ -1019,7 +1019,7 @@ int stress_majorization_kD_mkernel(vtx_data * graph, /* Input graph in sparse re } if (Verbose) fprintf(stderr, ": %.2f sec", elapsed_sec()); - if (n == 1) + if ((n == 1) || (maxi == 0)) return 0; if (Verbose) {