Graphviz 14.0.2~dev.20251008.0253
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#include <util/api.h>
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30#ifdef DIGCOLA
31
32#include <neatogen/defs.h>
33#include <neatogen/digcola.h>
34#include <stdbool.h>
35
36typedef struct CMajEnvVPSC {
37 float **A;
38 int nv; /* number of actual vars */
39 int nldv; /* number of dummy nodes included in lap matrix */
40 int ndv; /* number of dummy nodes not included in lap matrix */
41 Variable **vs;
42 int m; /* total number of constraints for next iteration */
43 int gm; /* number of global constraints */
44 Constraint **cs;
45 /* global constraints are persistent throughout optimisation process */
46 Constraint **gcs;
47 VPSC *vpsc;
48 float *fArray1; /* utility arrays - reusable memory */
49 float *fArray2;
50 float *fArray3;
51} CMajEnvVPSC;
52
53PRIVATE CMajEnvVPSC* initCMajVPSC(int n, float *packedMat, vtx_data* graph, ipsep_options *opt, int diredges);
54
55PRIVATE int constrained_majorization_vpsc(CMajEnvVPSC*, float*, float*, int);
56
57PRIVATE void deleteCMajEnvVPSC(CMajEnvVPSC *e);
58PRIVATE void generateNonoverlapConstraints(
59 CMajEnvVPSC* e,
60 float nsizeScale,
61 float** coords,
62 int k,
63 bool transitiveClosure,
64 ipsep_options* opt
65);
66
67PRIVATE void removeoverlaps(int,float**,ipsep_options*);
68
69typedef struct {
70 int *nodes;
71 int num_nodes;
72} DigColaLevel;
73
74/*
75 * unpack the "ordering" array into an array of DigColaLevel (as defined above)
76 */
77PRIVATE DigColaLevel* assign_digcola_levels(int *ordering, int n, int *level_inds, int num_divisions);
78PRIVATE int get_num_digcola_constraints(DigColaLevel *levels, int num_levels);
79
80#endif
81
82#ifdef __cplusplus
83}
84#endif
macro for API hiding/exposing
#define PRIVATE
Definition api.h:16
#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