]> granicus.if.org Git - graphviz/commitdiff
Handle special case of one node subgraphs
authorerg <devnull@localhost>
Thu, 27 Jul 2006 02:17:23 +0000 (02:17 +0000)
committererg <devnull@localhost>
Thu, 27 Jul 2006 02:17:23 +0000 (02:17 +0000)
lib/neatogen/stress.c

index 8c0db5e8e4a6ec78d6df1a50a30bde84c7768d00..c0feeff6e9374316f35b09506af7dad8ec07bf97 100644 (file)
@@ -1552,7 +1552,7 @@ int stress_majorization_kD_mkernel(vtx_data * graph,      /* Input graph in sparse re
        ** Layout initialization **
        **************************/
 
-    if (smart_ini) {
+    if (smart_ini && (n > 1)) {
        havePinned = 0;
        /* optimize layout quickly within subspace */
        /* perform at most 50 iterations within 30-D subspace to 
@@ -1583,6 +1583,7 @@ int stress_majorization_kD_mkernel(vtx_data * graph,      /* Input graph in sparse re
     } else {
        havePinned = initLayout(graph, n, dim, d_coords);
     }
+    if (Verbose) fprintf(stderr, ": %.2f sec", elapsed_sec());
     if (n == 1) return 0;
 
     if (Verbose) {