Graphviz 13.0.0~dev.20241222.1117
|
#include <algorithm>
#include <cassert>
#include <ostream>
#include <vector>
#include <vpsc/constraint.h>
#include <vpsc/block.h>
#include <vpsc/blocks.h>
#include <fstream>
Go to the source code of this file.
Macros | |
#define | RECTANGLE_OVERLAP_LOGGING 0 |
Functions | |
static bool | gt (const Constraint *const lhs, const Constraint *const rhs) |
> comparator for constraints | |
static void | make_heap (std::vector< Constraint * > &heap) |
static void | merge_heaps (std::vector< Constraint * > &heap1, const std::vector< Constraint * > &heap2) |
add all elements from heap2 into the heap heap1 | |
static Constraint * | findMin (std::vector< Constraint * > &heap) |
get the minimum heap element | |
static void | deleteMin (std::vector< Constraint * > &heap) |
remove the minimum heap element | |
static void | insert (std::vector< Constraint * > &heap, Constraint *c) |
add an item to a heap | |
std::ostream & | operator<< (std::ostream &os, const Block &b) |
|
static |
Definition at line 63 of file block.cpp.
References gt().
Referenced by Block::deleteMinInConstraint(), Block::deleteMinOutConstraint(), Block::findMinInConstraint(), and Block::findMinOutConstraint().
|
static |
Definition at line 57 of file block.cpp.
References gt().
Referenced by Block::findMinInConstraint(), and Block::findMinOutConstraint().
|
static |
Definition at line 37 of file block.cpp.
References compareConstraints().
Referenced by deleteMin(), findMin(), insert(), and make_heap().
|
static |
|
static |
create a heap within a vector
The standard library’s heap functionality is all structured around creating a max-heap but we want a min-heap. So we flip the comparator we give it.
Definition at line 45 of file block.cpp.
References gt().
Referenced by merge_heaps().
|
static |
Definition at line 50 of file block.cpp.
References make_heap().
Referenced by Block::mergeIn(), and Block::mergeOut().