diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2011-10-27 04:55:51 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2011-10-27 04:55:51 +0000 |
| commit | 2633767789e4264b13ef91a684accf734fb4e94f (patch) | |
| tree | 0f6bc8d758b8e4bcf01d2dd393166907906c156e /src/libvpsc/solve_VPSC.cpp | |
| parent | Cleanup pass on documentation that was dumping garbage into doxygen output. (diff) | |
| download | inkscape-2633767789e4264b13ef91a684accf734fb4e94f.tar.gz inkscape-2633767789e4264b13ef91a684accf734fb4e94f.zip | |
Fixing more broken and split doc comments.
(bzr r10697)
Diffstat (limited to 'src/libvpsc/solve_VPSC.cpp')
| -rw-r--r-- | src/libvpsc/solve_VPSC.cpp | 40 |
1 files changed, 5 insertions, 35 deletions
diff --git a/src/libvpsc/solve_VPSC.cpp b/src/libvpsc/solve_VPSC.cpp index ec2c48d46..f9bed649c 100644 --- a/src/libvpsc/solve_VPSC.cpp +++ b/src/libvpsc/solve_VPSC.cpp @@ -1,5 +1,5 @@ -/** - * \brief Solve an instance of the "Variable Placement with Separation +/* + * Solve an instance of the "Variable Placement with Separation * Constraints" problem. * * Authors: @@ -59,16 +59,7 @@ void Solver::printBlocks() { } #endif } -/** -* Produces a feasible - though not necessarily optimal - solution by -* examining blocks in the partial order defined by the directed acyclic -* graph of constraints. For each block (when processing left to right) we -* maintain the invariant that all constraints to the left of the block -* (incoming constraints) are satisfied. This is done by repeatedly merging -* blocks into bigger blocks across violated constraints (most violated -* first) fixing the position of variables inside blocks relative to one -* another so that constraints internal to the block are satisfied. -*/ + void Solver::satisfy() { list<Variable*> *vs=bs->totalOrder(); for(list<Variable*>::iterator i=vs->begin();i!=vs->end();++i) { @@ -129,12 +120,7 @@ void Solver::refine() { } } } -/** - * Calculate the optimal solution. After using satisfy() to produce a - * feasible solution, refine() examines each block to see if further - * refinement is possible by splitting the block. This is done repeatedly - * until no further improvement is possible. - */ + void Solver::solve() { satisfy(); refine(); @@ -156,19 +142,7 @@ void IncSolver::solve() { #endif } while(fabs(lastcost-cost)>0.0001); } -/** - * incremental version of satisfy that allows refinement after blocks are - * moved. - * - * - move blocks to new positions - * - repeatedly merge across most violated constraint until no more - * violated constraints exist - * - * Note: there is a special case to handle when the most violated constraint - * is between two variables in the same block. Then, we must split the block - * over an active constraint between the two variables. We choose the - * constraint with the most negative lagrangian multiplier. - */ + void IncSolver::satisfy() { #ifdef RECTANGLE_OVERLAP_LOGGING ofstream f(LOGFILE,ios::app); @@ -270,10 +244,6 @@ void IncSolver::splitBlocks() { bs->cleanup(); } -/** - * Scan constraint list for the most violated constraint, or the first equality - * constraint - */ Constraint* IncSolver::mostViolated(ConstraintList &l) { double minSlack = DBL_MAX; Constraint* v=NULL; |
