Graphviz 13.0.0~dev.20241222.1117
|
#include <algorithm>
#include <set>
#include <cassert>
#include <cstdlib>
#include <memory>
#include <vector>
#include <vpsc/generate-constraints.h>
#include <vpsc/constraint.h>
Go to the source code of this file.
Data Structures | |
struct | Event |
Enumerations | |
enum | EventType { Open , Close } |
Functions | |
std::ostream & | operator<< (std::ostream &os, const Rectangle &r) |
static NodeSet | getLeftNeighbours (NodeSet &scanline, Node *v) |
static NodeSet | getRightNeighbours (NodeSet &scanline, Node *v) |
static bool | compare_events (const Event &ea, const Event &eb) |
int | generateXConstraints (const vector< Rectangle > &rs, Variable **vars, Constraint **&cs, const bool useNeighbourLists) |
int | generateYConstraints (const vector< Rectangle > &rs, Variable **vars, Constraint **&cs) |
enum EventType |
Enumerator | |
---|---|
Open | |
Close |
Definition at line 116 of file generate-constraints.cpp.
Definition at line 125 of file generate-constraints.cpp.
References Open, Event::pos, Event::type, and Event::v.
Referenced by generateXConstraints(), and generateYConstraints().
int generateXConstraints | ( | const vector< Rectangle > & | rs, |
Variable ** | vars, | ||
Constraint **& | cs, | ||
const bool | useNeighbourLists | ||
) |
Prepares constraints in order to apply VPSC horizontally. Assumes variables have already been created. useNeighbourLists determines whether or not a heuristic is used to deciding whether to resolve all overlap in the x pass, or leave some overlaps for the y pass.
Definition at line 144 of file generate-constraints.cpp.
References Close, compare_events(), Variable::desiredPosition, getLeftNeighbours(), getRightNeighbours(), Open, and Rectangle::width().
Referenced by genXConstraints().
int generateYConstraints | ( | const vector< Rectangle > & | rs, |
Variable ** | vars, | ||
Constraint **& | cs | ||
) |
Prepares constraints in order to apply VPSC vertically to remove ALL overlap.
Definition at line 221 of file generate-constraints.cpp.
References Close, compare_events(), Variable::desiredPosition, Rectangle::height(), and Open.
Referenced by genYConstraints().
|
static |
Definition at line 85 of file generate-constraints.cpp.
Referenced by generateXConstraints().
|
static |
Definition at line 100 of file generate-constraints.cpp.
Referenced by generateXConstraints().
std::ostream & operator<< | ( | std::ostream & | os, |
const Rectangle & | r | ||
) |
Definition at line 31 of file generate-constraints.cpp.