Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
quad_prog_vpsc.h
Go to the documentation of this file.
1
16/**********************************************************
17* Written by Tim Dwyer for the graphviz package *
18* https://graphviz.org *
19* *
20**********************************************************/
21
22#pragma once
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28#ifdef DIGCOLA
29
30#include <neatogen/defs.h>
31#include <neatogen/digcola.h>
32#include <stdbool.h>
33
34typedef struct CMajEnvVPSC {
35 float **A;
36 int nv; /* number of actual vars */
37 int nldv; /* number of dummy nodes included in lap matrix */
38 int ndv; /* number of dummy nodes not included in lap matrix */
39 Variable **vs;
40 int m; /* total number of constraints for next iteration */
41 int gm; /* number of global constraints */
42 Constraint **cs;
43 /* global constraints are persistent throughout optimisation process */
44 Constraint **gcs;
45 VPSC *vpsc;
46 float *fArray1; /* utility arrays - reusable memory */
47 float *fArray2;
48 float *fArray3;
49} CMajEnvVPSC;
50
51extern CMajEnvVPSC* initCMajVPSC(int n, float *packedMat, vtx_data* graph, ipsep_options *opt, int diredges);
52
53extern int constrained_majorization_vpsc(CMajEnvVPSC*, float*, float*, int);
54
55extern void deleteCMajEnvVPSC(CMajEnvVPSC *e);
56extern void generateNonoverlapConstraints(
57 CMajEnvVPSC* e,
58 float nsizeScale,
59 float** coords,
60 int k,
61 bool transitiveClosure,
62 ipsep_options* opt
63);
64
65extern void removeoverlaps(int,float**,ipsep_options*);
66
67typedef struct {
68 int *nodes;
69 int num_nodes;
70} DigColaLevel;
71
72/*
73 * unpack the "ordering" array into an array of DigColaLevel (as defined above)
74 */
75extern DigColaLevel* assign_digcola_levels(int *ordering, int n, int *level_inds, int num_divisions);
76int get_num_digcola_constraints(DigColaLevel *levels, int num_levels);
77#endif
78
79#ifdef __cplusplus
80}
81#endif
#define A(n, t)
Definition expr.h:76
Agraph_t * graph(char *name)
Definition gv.cpp:30
A constraint determines a minimum or exact spacing required between two variables.
Definition constraint.h:25