Graphviz 13.1.3~dev.20250813.2319
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
34#if !defined(__CYGWIN__) && defined(__GNUC__) && !defined(__MINGW32__)
35#define INTERNAL __attribute__((visibility("hidden")))
36#else
37#define INTERNAL /* nothing */
38#endif
39
40typedef struct CMajEnvVPSC {
41 float **A;
42 int nv; /* number of actual vars */
43 int nldv; /* number of dummy nodes included in lap matrix */
44 int ndv; /* number of dummy nodes not included in lap matrix */
45 Variable **vs;
46 int m; /* total number of constraints for next iteration */
47 int gm; /* number of global constraints */
48 Constraint **cs;
49 /* global constraints are persistent throughout optimisation process */
50 Constraint **gcs;
51 VPSC *vpsc;
52 float *fArray1; /* utility arrays - reusable memory */
53 float *fArray2;
54 float *fArray3;
55} CMajEnvVPSC;
56
57INTERNAL CMajEnvVPSC* initCMajVPSC(int n, float *packedMat, vtx_data* graph, ipsep_options *opt, int diredges);
58
59INTERNAL int constrained_majorization_vpsc(CMajEnvVPSC*, float*, float*, int);
60
61INTERNAL void deleteCMajEnvVPSC(CMajEnvVPSC *e);
62INTERNAL void generateNonoverlapConstraints(
63 CMajEnvVPSC* e,
64 float nsizeScale,
65 float** coords,
66 int k,
67 bool transitiveClosure,
68 ipsep_options* opt
69);
70
71INTERNAL void removeoverlaps(int,float**,ipsep_options*);
72
73typedef struct {
74 int *nodes;
75 int num_nodes;
76} DigColaLevel;
77
78/*
79 * unpack the "ordering" array into an array of DigColaLevel (as defined above)
80 */
81INTERNAL DigColaLevel* assign_digcola_levels(int *ordering, int n, int *level_inds, int num_divisions);
82INTERNAL int get_num_digcola_constraints(DigColaLevel *levels, int num_levels);
83
84#undef INTERNAL
85
86#endif
87
88#ifdef __cplusplus
89}
90#endif
#define INTERNAL
Definition adjust.h:24
#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