static double p_iteration_threshold = 1e-3;
-bool
+boolean
power_iteration(double **square_mat, int n, int neigs, double **eigs,
- double *evals, bool initialize)
+ double *evals, boolean initialize)
{
/* compute the 'neigs' top eigenvectors of 'square_mat' using power iteration */
double ***CC);
extern void mult_sparse_dense_mat_transpose(vtx_data *, double **, int,
int, float ***);
- extern bool power_iteration(double **, int, int, double **, double *,
- bool);
+ extern boolean power_iteration(double **, int, int, double **, double *,
+ boolean);
/*****************************
*/
static char *cc_pfx = "_neato_cc";
-void neato_nodesize(node_t * n, bool flip)
+void neato_nodesize(node_t * n, boolean flip)
{
int w;
/* array of arrays of node indices in each cluster */
int **cs,*cn;
int i,j,nclusters=0;
- bool* assigned = N_NEW(agnnodes(g), bool);
+ boolean* assigned = N_NEW(agnnodes(g), boolean);
cluster_data *cdata = GNEW(cluster_data);
cdata->ntoplevel = agnnodes(g);
}
/* fprintf(stderr," node=%s, id=%d, ind=%d\n",n->name,n->id,ind); */
*c++=ind;
- assigned[ind]=true;
+ assigned[ind]=TRUE;
cdata->ntoplevel--;
}
}
int n_cc;
int i;
pack_info pinfo;
- bool pin;
+ boolean pin;
cc = pccomps(g, &n_cc, cc_pfx, &pin);
adjustNodes(gc);
}
if (n_cc > 1) {
- bool *bp;
+ boolean *bp;
if (pin) {
- bp = N_NEW(n_cc, bool);
+ bp = N_NEW(n_cc, boolean);
bp[0] = TRUE;
} else
bp = 0;
extern void heapdown(Agnode_t *);
extern void heapup(Agnode_t *);
extern void initial_positions(graph_t *, int);
- extern int init_port(Agnode_t *, Agedge_t *, char *, bool);
+ extern int init_port(Agnode_t *, Agedge_t *, char *, boolean);
extern void jitter3d(Agnode_t *, int);
extern void jitter_d(Agnode_t *, int, int);
extern Ppoly_t *makeObstacle(node_t * n, double SEP);
extern void makeSelfArcs(path * P, edge_t * e, int stepx);
- extern void makeSpline(edge_t *, Ppoly_t **, int, bool);
+ extern void makeSpline(edge_t *, Ppoly_t **, int, boolean);
extern void make_spring(graph_t *, Agnode_t *, Agnode_t *, double);
extern void move_node(graph_t *, int, Agnode_t *);
extern int init_nop(graph_t * g, int);
- extern void neato_nodesize(node_t * n, bool flip);
+ extern void neato_nodesize(node_t * n, boolean flip);
extern void neato_cleanup(graph_t * g);
extern void neato_cleanup_edge(edge_t * e);
extern void neato_cleanup_graph(graph_t * g);
extern void printvis(vconfig_t * cp);
extern int in_poly(Ppoly_t argpoly, Ppoint_t q);
-static bool spline_merge(node_t * n)
+static boolean spline_merge(node_t * n)
{
return FALSE;
}
-static bool swap_ends_p(edge_t * e)
+static boolean swap_ends_p(edge_t * e)
{
return FALSE;
}
* is on or inside one of the obstacles and, if so, tells the shortest path
* computation to ignore them.
*/
-void makeSpline(edge_t * e, Ppoly_t ** obs, int npoly, bool chkPts)
+void makeSpline(edge_t * e, Ppoly_t ** obs, int npoly, boolean chkPts)
{
Ppolyline_t line, spline;
Pvector_t slopes[2];
* Returns 0 on success.
*
* The edge function is given the graph, the separation to be added
- * around obstacles, and the type of edge. (At present, this is a bool,
+ * around obstacles, and the type of edge. (At present, this is a boolean,
* with 1 meaning splines and 0 meaning line segments.) It must guarantee
* that all bounding boxes are current; in particular, the bounding box of
* g must reflect the addition of the edges.