/*
* A block structure defined over the variables.
*
* Authors:
* Tim Dwyer <tgdwyer@gmail.com>
*
* Copyright (C) 2005 Authors
*
* Released under GNU LGPL. Read the file 'COPYING' for more information.
*/
#include "blocks.h"
#include "block.h"
#include "constraint.h"
#ifdef RECTANGLE_OVERLAP_LOGGING
#include <fstream>
#endif
namespace vpsc {
long blockTimeCtr;
blockTimeCtr=0;
for(int i=0;i<nvs;i++) {
}
}
{
blockTimeCtr=0;
delete *i;
}
clear();
}
for(int i=0;i<nvs;i++) {
}
for(int i=0;i<nvs;i++) {
}
}
return order;
}
// Recursive depth first search giving total order by pushing nodes in the DAG
// onto the front of the list when we finish searching them
v->visited=true;
Constraint *c=*it;
}
}
#ifdef RECTANGLE_OVERLAP_LOGGING
#endif
order->push_front(v);
}
#ifdef RECTANGLE_OVERLAP_LOGGING
#endif
r->timeStamp=++blockTimeCtr;
r->setUpInConstraints();
Constraint *c=r->findMinInConstraint();
#ifdef RECTANGLE_OVERLAP_LOGGING
#endif
r->deleteMinInConstraint();
}
blockTimeCtr++;
r->mergeIn(l);
removeBlock(l);
c=r->findMinInConstraint();
}
#ifdef RECTANGLE_OVERLAP_LOGGING
#endif
}
#ifdef RECTANGLE_OVERLAP_LOGGING
#endif
l->setUpOutConstraints();
Constraint *c = l->findMinOutConstraint();
#ifdef RECTANGLE_OVERLAP_LOGGING
#endif
l->deleteMinOutConstraint();
r->setUpOutConstraints();
}
l->mergeOut(r);
removeBlock(r);
c=l->findMinOutConstraint();
}
#ifdef RECTANGLE_OVERLAP_LOGGING
#endif
}
//erase(doomed);
}
Block *b=*i;
if(b->deleted) {
erase(b);
delete b;
}
}
}
b->split(l,r,c);
#ifdef RECTANGLE_OVERLAP_LOGGING
#endif
mergeLeft(l);
// r may have been merged!
r->wposn = r->desiredWeightedPosition();
mergeRight(r);
removeBlock(b);
insert(l);
insert(r);
}
double c = 0;
c += (*i)->cost();
}
return c;
}
}