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