29 return new Variable(
id,desiredPos,weight);
39 bool transitiveClosure) {
40 std::vector<Rectangle> rs;
41 for(
int i=0;i<n;i++) {
42 rs.emplace_back(bb[i].LL.x,bb[i].
UR.
x,bb[i].
LL.
y,bb[i].
UR.
y);
48 std::vector<Rectangle> rs;
49 for(
int i=0;i<n;i++) {
50 rs.emplace_back(bb[i].LL.x,bb[i].
UR.
x,bb[i].
LL.
y,bb[i].
UR.
y);
60 for(
int i=0;i<m;i++) {
74 }
catch(
const char *e) {
75 std::cerr << e <<
"\n";
80 assert(vpsc!=
nullptr);
void setVariableDesiredPos(Variable *v, double desiredPos)
Variable * newVariable(int id, double desiredPos, double weight)
Bridge for C programs to access solve_VPSC (which is in C++)
Constraint ** newConstraints(int m)
void deleteConstraint(Constraint *c)
VPSC * newIncVPSC(int n, Variable *vs[], int m, Constraint *cs[])
void deleteVariable(Variable *v)
void deleteConstraints(int m, Constraint **cs)
Constraint * newConstraint(Variable *left, Variable *right, double gap)
void remapInConstraints(Variable *u, Variable *v, double dgap)
int genXConstraints(int n, boxf *bb, Variable **vs, Constraint ***cs, bool transitiveClosure)
void remapOutConstraints(Variable *u, Variable *v, double dgap)
double getVariablePos(const Variable *v)
void satisfyVPSC(VPSC *vpsc)
int genYConstraints(int n, boxf *bb, Variable **vs, Constraint ***cs)
void deleteVPSC(VPSC *vpsc)
void solveVPSC(VPSC *vpsc)
int generateYConstraints(const vector< Rectangle > &rs, Variable **vars, Constraint **&cs)
int generateXConstraints(const vector< Rectangle > &rs, Variable **vars, Constraint **&cs, const bool useNeighbourLists)
A constraint determines a minimum or exact spacing required between two variables.