**********************************************************/
#include <neatogen/digcola.h>
+#include <stdbool.h>
#ifdef IPSEPCOLA
#include <math.h>
#include <stdlib.h>
if (opt->noverlap == 1 && nsizeScale > 0.001) {
generateNonoverlapConstraints(cMajEnvHor, nsizeScale, coords,
0,
- nsizeScale < 0.5 ? FALSE : TRUE,
+ nsizeScale >= 0.5,
opt);
}
if (cMajEnvHor->m > 0) {
}
if (opt->noverlap == 1 && nsizeScale > 0.001) {
generateNonoverlapConstraints(cMajEnvVrt, nsizeScale, coords,
- 1, FALSE, opt);
+ 1, false, opt);
}
if (cMajEnvVrt->m > 0) {
#ifdef MOSEK
float nsizeScale,
float **coords,
int k,
- boolean transitiveClosure,
+ bool transitiveClosure,
ipsep_options * opt)
{
Constraint **csol, **csolptr;
{
int i;
CMajEnvVPSC *e = initCMajVPSC(n, NULL, NULL, opt, 0);
- generateNonoverlapConstraints(e, 1.0, coords, 0, TRUE, opt);
+ generateNonoverlapConstraints(e, 1.0, coords, 0, true, opt);
solveVPSC(e->vpsc);
for (i = 0; i < n; i++) {
coords[0][i] = getVariablePos(e->vs[i]);
}
- generateNonoverlapConstraints(e, 1.0, coords, 1, FALSE, opt);
+ generateNonoverlapConstraints(e, 1.0, coords, 1, false, opt);
solveVPSC(e->vpsc);
for (i = 0; i < n; i++) {
coords[1][i] = getVariablePos(e->vs[i]);
#ifdef MOSEK
#include <neatogen/mosek_quad_solve.h>
#endif /* MOSEK */
+#include <stdbool.h>
typedef struct CMajEnvVPSC {
float **A;
float nsizeScale,
float** coords,
int k,
- boolean transitiveClosure,
+ bool transitiveClosure,
ipsep_options* opt
);
return new IncVPSC(n,vs,m,cs);
}
-int genXConstraints(int n, boxf* bb, Variable** vs, Constraint*** cs,int transitiveClosure) {
+int genXConstraints(int n, boxf *bb, Variable **vs, Constraint ***cs,
+ bool transitiveClosure) {
std::vector<Rectangle> rs;
for(int i=0;i<n;i++) {
rs.emplace_back(bb[i].LL.x,bb[i].UR.x,bb[i].LL.y,bb[i].UR.y);
}
- int m = generateXConstraints(rs,vs,*cs,transitiveClosure?true:false);
+ int m = generateXConstraints(rs, vs, *cs, transitiveClosure);
return m;
}
int genYConstraints(int n, boxf* bb, Variable** vs, Constraint*** cs) {
* Adaptagrams repository.
*/
#pragma once
+
+#include <stdbool.h>
+
#ifdef __cplusplus
extern "C" {
#endif
typedef struct { pointf LL, UR; } boxf;
#endif
int genXConstraints(int n, boxf[], Variable** vs, Constraint*** cs,
- int transitiveClosure);
+ bool transitiveClosure);
int genYConstraints(int n, boxf[], Variable** vs, Constraint*** cs);
void satisfyVPSC(VPSC*);