graph to make the layout smaller. By setting overlap_shrink=false, this is not done.
</TD><TD ALIGN="CENTER">true</TD><TD></TD><TD>not dot</TD> </TR>
<TR><TD><A NAME=a:overlap_scaling HREF=#d:overlap_scaling>overlap_scaling</A>
</TD><TD>G</TD><TD>double</TD><TD ALIGN="CENTER">-4</TD><TD>-1.0e10</TD><TD>prism only</TD> </TR>
+ <TR><TD><A NAME=a:overlap_shrink HREF=#d:overlap_shrink>overlap_shrink</A>
+</TD><TD>G</TD><TD><A HREF=#k:bool>bool</A>
+</TD><TD ALIGN="CENTER">true</TD><TD></TD><TD>prism only</TD> </TR>
<TR><TD><A NAME=a:pack HREF=#d:pack>pack</A>
</TD><TD>G</TD><TD><A HREF=#k:bool>bool</A>
<BR>int</TD><TD ALIGN="CENTER">false</TD><TD></TD><TD>not dot</TD> </TR>
<TT>overlap_scaling</TT>.
If <TT>overlap_scaling</TT> is zero, no scaling is done.
+<DT><A NAME=d:overlap_shrink HREF=#a:overlap_shrink><STRONG>overlap_shrink</STRONG></A>
+<DD> If true, the overlap removal algorithm will perform a compression pass to reduce the
+ size of the layout.
+
<DT><A NAME=d:pack HREF=#a:pack><STRONG>pack</STRONG></A>
<DD> This is true if the value of pack is "true" (case-insensitive) or a
non-negative integer. If true, each connected component of the graph is
If <TT>overlap_scaling</TT> is positive, the layout is scaled by
<TT>overlap_scaling</TT>.
If <TT>overlap_scaling</TT> is zero, no scaling is done.
+:overlap_shrink:G:bool:true; prism
+If true, the overlap removal algorithm will perform a compression pass to reduce the
+size of the layout.
:pack:G:bool/int:false; notdot
This is true if the value of pack is "true" (case-insensitive) or a
non-negative integer. If true, each connected component of the graph is
}
remove_overlap(Ndim, A, pos, sizes, am->value, am->scaling,
- ELSCHEME_NONE, 0, NULL, NULL, TRUE, &flag);
+ ELSCHEME_NONE, 0, NULL, NULL, mapBool (agget(g, "overlap_shrink"), TRUE), &flag);
for (n = agfstnode(g); n; n = agnxtnode(g, n)) {
real *npos = pos + (Ndim * ND_id(n));
if (has_penalty_terms){
/* now do without penalty */
remove_overlap(dim, A, x, label_sizes, ntry, 0.,
- ELSCHEME_NONE, 0, NULL, NULL, TRUE, flag);
+ ELSCHEME_NONE, 0, NULL, NULL, do_shrinking, flag);
}
#ifdef DEBUG
#include "SparseMatrix.h"
void remove_overlap(int dim, SparseMatrix A, int m, real *x, real *label_sizes, int ntry, real initial_scaling, int do_shrinking, int *flag)
{
- agerr(AGERR, "remove_overlap: Graphviz not built with triangulation library\n");
+ static int once;
+
+ if (once == 0) {
+ once = 1;
+ agerr(AGERR, "remove_overlap: Graphviz not built with triangulation library\n");
+ }
}
#endif
/* ctrl->method = late_mode(g, agfindgraphattr(g, "mode"), METHOD_SPRING_ELECTRICAL); */
ctrl->method = METHOD_SPRING_ELECTRICAL;
ctrl->beautify_leaves = mapBool (agget(g, "beautify"), FALSE);
+ ctrl->do_shrinking = mapBool (agget(g, "overlap_shrink"), TRUE);
ctrl->rotation = late_double(g, agfindgraphattr(g, "rotation"), 0.0, -MAXDOUBLE);
ctrl->edge_labeling_scheme = late_int(g, agfindgraphattr(g, "label_scheme"), 0, 0);
if (ctrl->edge_labeling_scheme > 4) {
ctrl->use_node_weights = FALSE;
ctrl->smoothing = SMOOTHING_NONE;
ctrl->overlap = 0;
+ ctrl->do_shrinking = 1;
ctrl->tscheme = QUAD_TREE_HYBRID;
ctrl->method = METHOD_SPRING_ELECTRICAL;
ctrl->initial_scaling = -4;
assert(!(*flag));
attach_edge_label_coordinates(dim, A, n_edge_label_nodes, edge_label_nodes, x, x2);
remove_overlap(dim, A, x, label_sizes, ctrl->overlap, ctrl->initial_scaling,
- ctrl->edge_labeling_scheme, n_edge_label_nodes, edge_label_nodes, A, TRUE, flag);
+ ctrl->edge_labeling_scheme, n_edge_label_nodes, edge_label_nodes, A, ctrl->do_shrinking, flag);
SparseMatrix_delete(A2);
FREE(x2);
if (A != A0) SparseMatrix_delete(A);
if (Verbose) fprintf(stderr, "ctrl->overlap=%d\n",ctrl->overlap);
remove_overlap(dim, A, x, label_sizes, ctrl->overlap, ctrl->initial_scaling,
- ctrl->edge_labeling_scheme, n_edge_label_nodes, edge_label_nodes, A, TRUE, flag);
+ ctrl->edge_labeling_scheme, n_edge_label_nodes, edge_label_nodes, A, ctrl->do_shrinking, flag);
RETURN:
*ctrl = ctrl0;
int use_node_weights;
int smoothing;
int overlap;
+ int do_shrinking;
int tscheme; /* octree scheme. 0 (no octree), 1 (normal), 2 (fast) */
int method;/* spring_electical, spring_maxent */
real initial_scaling;/* how to scale the layout of the graph before passing to overlap removal algorithm.