From 3a4bbd50a7b0f06b8bb126db2af10782d91eda28 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sun, 23 Mar 2014 18:59:12 +0100 Subject: remove files that interface through C with libvpsc, we are using C++ so... (bzr r13191) --- src/libvpsc/csolve_VPSC.cpp | 128 -------------------------------------------- 1 file changed, 128 deletions(-) delete mode 100644 src/libvpsc/csolve_VPSC.cpp (limited to 'src/libvpsc/csolve_VPSC.cpp') diff --git a/src/libvpsc/csolve_VPSC.cpp b/src/libvpsc/csolve_VPSC.cpp deleted file mode 100644 index 60e88a50b..000000000 --- a/src/libvpsc/csolve_VPSC.cpp +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Bridge for C programs to access solve_VPSC (which is in C++). - * - * Authors: - * Tim Dwyer - * - * Copyright (C) 2005 Authors - * - * Released under GNU LGPL. Read the file 'COPYING' for more information. - */ -#include -#include -#include -#include -#include "variable.h" -#include "constraint.h" -#include "generate-constraints.h" -#include "solve_VPSC.h" -#include "csolve_VPSC.h" -using namespace vpsc; -extern "C" { -Variable* newVariable(int id, double desiredPos, double weight) { - return new Variable(id,desiredPos,weight); -} -Constraint* newConstraint(Variable* left, Variable* right, double gap) { - return new Constraint(left,right,gap); -} -Solver* newSolver(int n, Variable* vs[], int m, Constraint* cs[]) { - return new Solver(n,vs,m,cs); -} -Solver* newIncSolver(int n, Variable* vs[], int m, Constraint* cs[]) { - return (Solver*)new vpsc::IncSolver(n,vs,m,cs); -} - -int genXConstraints(int n, boxf* bb, Variable** vs, Constraint*** cs,int transitiveClosure) { - Rectangle* rs[n]; - for(int i=0;i 0); - Rectangle* rs[n]; - for(int i=0;isatisfy(); - } catch(const char *e) { - std::cerr << e << std::endl; - exit(1); - } -} -int getSplitCnt(IncSolver *vpsc) { - return vpsc->splitCnt; -} -void deleteVPSC(Solver *vpsc) { - assert(vpsc!=NULL); - delete vpsc; -} -void solveVPSC(Solver* vpsc) { - vpsc->solve(); -} -void splitIncVPSC(IncSolver* vpsc) { - vpsc->splitBlocks(); -} -void setVariableDesiredPos(Variable *v, double desiredPos) { - v->desiredPosition = desiredPos; -} -double getVariablePos(Variable *v) { - return v->position(); -} -void remapInConstraints(Variable *u, Variable *v, double dgap) { - for(Constraints::iterator i=u->in.begin();i!=u->in.end();i++) { - Constraint* c=*i; - c->right=v; - c->gap+=dgap; - v->in.push_back(c); - } - u->in.clear(); -} -void remapOutConstraints(Variable *u, Variable *v, double dgap) { - for(Constraints::iterator i=u->out.begin();i!=u->out.end();i++) { - Constraint* c=*i; - c->left=v; - c->gap+=dgap; - v->out.push_back(c); - } - u->out.clear(); -} -int getLeftVarID(Constraint *c) { - return c->left->id; -} -int getRightVarID(Constraint *c){ - return c->right->id; -} -double getSeparation(Constraint *c){ - return c->gap; -} -} -- cgit v1.2.3