diff options
| author | Tim Dwyer <tgdwyer@gmail.com> | 2006-07-14 04:09:40 +0000 |
|---|---|---|
| committer | tgdwyer <tgdwyer@users.sourceforge.net> | 2006-07-14 04:09:40 +0000 |
| commit | d18b8150ba16f4a930b213dae1f4fb369cb3d0bf (patch) | |
| tree | 72afddfbcafd6b51e6797a7674c963886cce75b0 /src/libvpsc/csolve_VPSC.cpp | |
| parent | * src/libavoid/router.cpp: Fixed a bug in the libavoid function (diff) | |
| download | inkscape-d18b8150ba16f4a930b213dae1f4fb369cb3d0bf.tar.gz inkscape-d18b8150ba16f4a930b213dae1f4fb369cb3d0bf.zip | |
- Connectors with end-markers now constrained to point downwards in graph layout
- vpsc namespace added to libvpsc
(bzr r1408)
Diffstat (limited to 'src/libvpsc/csolve_VPSC.cpp')
| -rw-r--r-- | src/libvpsc/csolve_VPSC.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/libvpsc/csolve_VPSC.cpp b/src/libvpsc/csolve_VPSC.cpp index b78b01054..bd7db5ab2 100644 --- a/src/libvpsc/csolve_VPSC.cpp +++ b/src/libvpsc/csolve_VPSC.cpp @@ -15,6 +15,7 @@ #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); @@ -22,11 +23,11 @@ Variable* newVariable(int id, double desiredPos, double weight) { Constraint* newConstraint(Variable* left, Variable* right, double gap) { return new Constraint(left,right,gap); } -VPSC* newVPSC(int n, Variable* vs[], int m, Constraint* cs[]) { - return new VPSC(n,vs,m,cs); +Solver* newSolver(int n, Variable* vs[], int m, Constraint* cs[]) { + return new Solver(n,vs,m,cs); } -VPSC* newIncVPSC(int n, Variable* vs[], int m, Constraint* cs[]) { - return (VPSC*)new IncVPSC(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) { @@ -67,7 +68,7 @@ void deleteConstraint(Constraint* c) { void deleteVariable(Variable* v) { delete v; } -void satisfyVPSC(VPSC* vpsc) { +void satisfyVPSC(Solver* vpsc) { try { vpsc->satisfy(); } catch(const char *e) { @@ -75,17 +76,17 @@ void satisfyVPSC(VPSC* vpsc) { exit(1); } } -int getSplitCnt(IncVPSC *vpsc) { +int getSplitCnt(IncSolver *vpsc) { return vpsc->splitCnt; } -void deleteVPSC(VPSC *vpsc) { +void deleteVPSC(Solver *vpsc) { assert(vpsc!=NULL); delete vpsc; } -void solveVPSC(VPSC* vpsc) { +void solveVPSC(Solver* vpsc) { vpsc->solve(); } -void splitIncVPSC(IncVPSC* vpsc) { +void splitIncVPSC(IncSolver* vpsc) { vpsc->splitBlocks(); } void setVariableDesiredPos(Variable *v, double desiredPos) { |
