Graphviz  2.41.20170921.2350
quad_prog_vpsc.h
Go to the documentation of this file.
1 /* $Id$ $Revision$ */
2 /* vim:set shiftwidth=4 ts=8: */
3 
19 /**********************************************************
20 * Written by Tim Dwyer for the graphviz package *
21 * http://www.graphviz.org/ *
22 * *
23 **********************************************************/
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 #ifndef _QUAD_PROG_VPSC_H_
30 #define _QUAD_PROG_VPSC_H_
31 
32 #ifdef DIGCOLA
33 
34 #include "defs.h"
35 #include "digcola.h"
36 #ifdef MOSEK
37 #include "mosek_quad_solve.h"
38 #endif /* MOSEK */
39 
40 typedef struct CMajEnvVPSC {
41  float **A;
42  float *packedMat;
43  int nv; /* number of actual vars */
44  int nldv; /* number of dummy nodes included in lap matrix */
45  int ndv; /* number of dummy nodes not included in lap matrix */
46  Variable **vs;
47  int m; /* total number of constraints for next iteration */
48  int gm; /* number of global constraints */
49  Constraint **cs;
50  /* global constraints are persistent throughout optimisation process */
51  Constraint **gcs;
52  VPSC *vpsc;
53  float *fArray1; /* utility arrays - reusable memory */
54  float *fArray2;
55  float *fArray3;
56 #ifdef MOSEK
57  MosekEnv *mosekEnv;
58 #endif /* MOSEK */
59 } CMajEnvVPSC;
60 
61 extern CMajEnvVPSC* initCMajVPSC(int n, float *packedMat, vtx_data* graph, ipsep_options *opt, int diredges);
62 
63 extern int constrained_majorization_vpsc(CMajEnvVPSC*, float*, float*, int);
64 
65 extern void deleteCMajEnvVPSC(CMajEnvVPSC *e);
66 extern void generateNonoverlapConstraints(
67  CMajEnvVPSC* e,
68  float nsizeScale,
69  float** coords,
70  int k,
71  boolean transitiveClosure,
72  ipsep_options* opt
73 );
74 
75 extern void removeoverlaps(int,float**,ipsep_options*);
76 
77 typedef struct {
78  int *nodes;
79  int num_nodes;
80 } DigColaLevel;
81 
82 /*
83  * unpack the "ordering" array into an array of DigColaLevel (as defined above)
84  */
85 extern DigColaLevel* assign_digcola_levels(int *ordering, int n, int *level_inds, int num_divisions);
86 extern void delete_digcola_levels(DigColaLevel *l, int num_levels);
87 extern void print_digcola_levels(FILE* logfile, DigColaLevel *levels, int num_levels);
88 int get_num_digcola_constraints(DigColaLevel *levels, int num_levels);
89 #endif
90 
91 #endif /* _QUAD_PROG_VPSC_H_ */
92 
93 #ifdef __cplusplus
94 }
95 #endif
Agraph_t * graph(char *name)
Definition: gv.cpp:38