|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
46 template<
typename PipeCmp>
57 }
else if (y ==
nullptr) {
62 return cmp->comparePipes(x, y);
67 return first == second || !(*this)(second, first);
72 template<
typename PipeCmp>
116 for (
Pipe& p : pipes_list) {
143 pipes_heap = std::make_unique<PipesHeap>(
this);
164 gen.discard(5 + p->
degree() % 20);
171 }
else if (y ==
nullptr) {
179 template<
typename PipeCmp1,
typename PipeCmp2>
261 :
public DoublePipeQueue<PipeQueueByDegreePreferContract, PipeQueueByDegreePreferContract> {
271 bool invertContract =
false)
272 : PQ(pq), invert_degree(invertDegree), invert_contract(invertContract) {
273 pipes_heap = std::make_unique<PipesHeap>(
this);
274 pipes_heap2 = std::make_unique<PipesHeap2>(
this);
277 bool comparePipes(
const Pipe* x,
const Pipe* y)
const;
279 bool isQueue1(
Pipe* p)
const override;
A queue of all pipes, ordered by an arbitrary comparator function.
void addPipe(Pipe *p) override
Manages the matching of P-nodes via pipes in an instance of SyncPlan.
PipeQueue yielding pipes in some random (but stable and deterministic) order.
A null-safe and priority aware comparator (wrapper) for pipes.
std::unique_ptr< PipesHeap2 > pipes_heap2
bool comparePipes(const Pipe *x, const Pipe *y) const
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
Priority queue interface wrapping various heaps.
int index() const
Returns the (unique) node index.
void removePipe(Pipe *pipe) override
typename PipesHeap2::handle PipesHeapHandle2
engine::result_type hash(const Pipe *p) const
virtual bool isQueue1(Pipe *p) const =0
void removePipe(Pipe *pipe) override
void addPipe(Pipe *p) override
PipeQueueByDegreePreferContract(SyncPlan *pq, bool invertDegree=false, bool invertContract=false)
SimplePipeQueue & operator=(const SimplePipeQueue ©)=delete
A class for modelling and solving Synchronized Planarity instances.
A pair of matched vertices of the same degree, whose rotation shall be synchronized.
typename PipesHeap::handle PipesHeapHandle
static void copy(const T &from, T &to)
int degree() const
Returns the degree of the node (indegree + outdegree).
const T & move(const T &v)
PipeQueue yielding pipes in order of descending or ascending degree.
Doubly linked lists (maintaining the length of the list).
SimplePipeQueue()=default
Basic declarations, included by all source files.
bool checkOrder(const Pipe *first, const Pipe *second) const
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
PipeQueue yielding contractable pipes first (or last), in order of descending (or ascending) degree.
PipeQueue CRTP base class for ordering pipes by some simple comparator function.
bool operator()(const Pipe *x, const Pipe *y) const
Declaration of doubly linked lists and iterators.
PipeCmpPtr(const PipeCmp *queue)
void rebuild(List< Pipe > &pipes_list) override
std::unique_ptr< PipesHeap > pipes_heap
typename SpecImpl::Handle handle
bool comparePipes(const Pipe *x, const Pipe *y) const
Base class for PipeQueues providing a "priority lane" for some pipes and sorting with different funct...
PipeQueueByDegree(bool invert=false)
Priority queue interface wrapper for heaps.
static uint32_t hash(uint32_t x)