Graphviz 13.0.0~dev.20250101.2024
|
#include <blocks.h>
Public Member Functions | |
Blocks (const int n, Variable *vs[]) | |
~Blocks () | |
void | mergeLeft (Block *r) |
void | mergeRight (Block *l) |
void | split (Block *b, Block *&l, Block *&r, Constraint *c) |
std::list< Variable * > | totalOrder () |
void | cleanup () |
double | cost () |
A block structure defined over the variables such that each block contains 1 or more variables, with the invariant that all constraints inside a block are satisfied by keeping the variables fixed relative to one another
Blocks::Blocks | ( | const int | n, |
Variable * | vs[] | ||
) |
Definition at line 37 of file blocks.cpp.
References blockTimeCtr, and insert().
Blocks::~Blocks | ( | ) |
Definition at line 43 of file blocks.cpp.
References blockTimeCtr.
void Blocks::cleanup | ( | ) |
Definition at line 156 of file blocks.cpp.
References Block::deleted.
Referenced by VPSC::satisfy(), IncVPSC::satisfy(), and IncVPSC::splitBlocks().
double Blocks::cost | ( | ) |
returns the cost total squared distance of variables from their desired positions
Definition at line 195 of file blocks.cpp.
Referenced by IncVPSC::solve().
void Blocks::mergeLeft | ( | Block * | r | ) |
Processes incoming constraints, most violated to least, merging with the neighbouring (left) block until no more violated constraints are found
Definition at line 86 of file blocks.cpp.
References Variable::block, blockTimeCtr, Block::deleteMinInConstraint(), dist(), Block::findMinInConstraint(), Constraint::gap, Block::in, Constraint::left, LOGFILE, Block::merge(), Block::mergeIn(), Variable::offset, RECTANGLE_OVERLAP_LOGGING, Constraint::right, Block::setUpInConstraints(), Constraint::slack(), Block::timeStamp, and Block::vars.
Referenced by VPSC::satisfy(), and split().
void Blocks::mergeRight | ( | Block * | l | ) |
Symmetrical to mergeLeft
Definition at line 122 of file blocks.cpp.
References Variable::block, Block::deleteMinOutConstraint(), dist(), Block::findMinOutConstraint(), Constraint::gap, Constraint::left, LOGFILE, Block::merge(), Block::mergeOut(), Variable::offset, RECTANGLE_OVERLAP_LOGGING, Constraint::right, Block::setUpOutConstraints(), Constraint::slack(), and Block::vars.
Referenced by split().
void Blocks::split | ( | Block * | b, |
Block *& | l, | ||
Block *& | r, | ||
Constraint * | c | ||
) |
Splits block b across constraint c into two new blocks, l and r (c's left and right sides respectively)
Definition at line 171 of file blocks.cpp.
References Variable::block, Block::desiredWeightedPosition(), insert(), LOGFILE, mergeLeft(), mergeRight(), Block::posn, RECTANGLE_OVERLAP_LOGGING, Constraint::right, Block::split(), Block::weight, and Block::wposn.
list< Variable * > Blocks::totalOrder | ( | ) |
returns a list of variables with total ordering determined by the constraint DAG
Definition at line 55 of file blocks.cpp.
References Variable::visited.
Referenced by VPSC::satisfy().