Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

GraphUtils.h File Reference

Some missing utilities for working with Graphs, their embeddings, and cyclic orders. TODO should be moved to a central location (some maybe part of the Graph class?). More...

#include <ogdf/basic/Graph.h>
#include <ogdf/basic/basic.h>
#include <functional>

Go to the source code of this file.

Classes

class  ogdf::List< E >
 Doubly linked lists (maintaining the length of the list). More...
 

Namespaces

 ogdf
 The namespace for all OGDF objects.
 

Enumerations

enum  ogdf::OrderComp { ogdf::OrderComp::SAME, ogdf::OrderComp::REVERSED, ogdf::OrderComp::DIFFERENT }
 

Functions

void ogdf::assertStarCentreAndRay (node centre, node ray)
 Check that one vertex is the centre of star while the other is one of its rays. More...
 
OrderComp ogdf::compareCyclicOrder (node n, List< adjEntry > &o, bool full_check=false)
 Cyclically compare the rotation of a node with a given cyclic order. More...
 
node ogdf::getCentreOfStar (node g_n)
 Given a vertex that is either the centre or ray of a star, return the centre of the respective star. More...
 
bool ogdf::joinEdge (Graph &G, adjEntry u_adj, adjEntry v_adj, node u, node v)
 Join two edges into one, keeping the two endpoints corresponding to the adjEntries. More...
 
bool ogdf::joinEdge (Graph &G, adjEntry u_adj, adjEntry v_adj, node u, node v, const std::function< void(edge)> &deleteEdge)
 Join two edges into one, keeping the two endpoints corresponding to the adjEntries and using a custom function for deleting the old edge. More...
 
bool ogdf::joinEdge (Graph &G, edge u_e, edge v_e, node u, node v)
 Join two edges into one, keeping the two given endpoints. More...
 
bool ogdf::joinEdge (Graph &G, edge u_e, edge v_e, node u, node v, const std::function< void(edge)> &deleteEdge)
 Join two edges into one, keeping the two given endpoints and using a custom function for deleting the old edge. More...
 
void ogdf::moveAdjToBack (Graph &G, adjEntry b)
 Rotate a node to move a given adjEntry to the back of its list. More...
 
void ogdf::moveAdjToFront (Graph &G, adjEntry f)
 Rotate a node to move a given adjEntry to the front of its list. More...
 
void ogdf::moveEnd (Graph &G, adjEntry keep_adj, adjEntry new_adj, Direction dir=Direction::after)
 Change one endpoint of an edge observing a certain embedding, no matter its direction. More...
 
void ogdf::moveEnd (Graph &G, edge e, node keep_end, node new_end)
 Change one endpoint of an edge, no matter its direction. More...
 
adjEntry ogdf::splitEdge (Graph &G, adjEntry adj, node new_adj_to_node, node new_adj_to_twin, edge new_edge=nullptr)
 Split an edge, moving the two new middle endpoints to some other vertices observing a certain embedding. More...
 
edge ogdf::splitEdge (Graph &G, edge old_edge, node new_adj_to_source, node new_adj_to_target, edge new_edge=nullptr)
 Split an edge, moving the two new middle endpoints to some other vertices. More...
 

Detailed Description

Some missing utilities for working with Graphs, their embeddings, and cyclic orders. TODO should be moved to a central location (some maybe part of the Graph class?).

Author
Simon D. Fink ogdf@.nosp@m.niko.nosp@m..fink.nosp@m..bay.nosp@m.ern
License:
This file is part of the Open Graph Drawing Framework (OGDF).
Copyright (C)
See README.md in the OGDF root directory for details.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Version 2 or 3 as published by the Free Software Foundation; see the file LICENSE.txt included in the packaging of this file for details.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/copyleft/gpl.html

Definition in file GraphUtils.h.