/*
* remove overlaps between a set of rectangles.
*
* Authors:
* Tim Dwyer <tgdwyer@gmail.com>
*
* Copyright (C) 2005 Authors
*
* Released under GNU LGPL. Read the file 'COPYING' for more information.
*/
#include <iostream>
#include <cassert>
#include "generate-constraints.h"
#include "solve_VPSC.h"
#include "variable.h"
#include "constraint.h"
#include "remove_rectangle_overlap.h" /* own include */
#ifdef RECTANGLE_OVERLAP_LOGGING
#include <fstream>
#include "blocks.h"
#endif
using namespace vpsc;
try {
// The extra gap avoids numerical imprecision problems
for(unsigned i=0;i<n;i++) {
}
double *oldX = new double[n];
for(unsigned i=0;i<n;i++) {
}
#ifdef RECTANGLE_OVERLAP_LOGGING
f.close();
#endif
for(unsigned i=0;i<n;i++) {
}
for(unsigned i = 0; i < m; ++i) {
delete cs[i];
}
delete [] cs;
// Removing the extra gap here ensures things that were moved to be adjacent to
// one another above are not considered overlapping
#ifdef RECTANGLE_OVERLAP_LOGGING
f.close();
#endif
for(unsigned i=0;i<n;i++) {
}
delete [] oldX;
for(unsigned i = 0; i < m; ++i) {
delete cs[i];
}
delete [] cs;
#ifdef RECTANGLE_OVERLAP_LOGGING
f.close();
#endif
for(unsigned i = 0; i < m; ++i) {
delete cs[i];
}
delete [] cs;
for(unsigned i=0;i<n;i++) {
delete vs[i];
}
delete [] vs;
} catch (char const *str) {
for(unsigned i=0;i<n;i++) {
}
}
}