Skip to content

Latest commit

 

History

History
76 lines (60 loc) · 4.87 KB

unreleased.md

File metadata and controls

76 lines (60 loc) · 4.87 KB

OGDF » Developer's Guide » Porting Guide » Unreleased

Porting from Elderberry to current unreleased version

Requirements

OGDF now requires C++17 features. We no longer officially support compilers older than gcc 9, clang 9 or Visual Studio 2017 15.8 (MSVC 19.15).

GraphIO

SvgPrinter

When their height is equal to their width, Shape::Triangle and Shape::InvTriangle are now drawn as regular triangles in SVGs (and not as just isosceles ones).

TikzWriter

TikzWriter::isCoveredBy() was removed in favor of isPointCoveredByNode() in geometry.h.

RegisteredArrays

RegisteredArray, the underlying class for NodeArray, EdgeArray etc. now uses std::vector instead of ogdf::Array for data storage. If the stored elements have a non-trivial move-constructor, it should be marked noexcept. Otherwise, all elements will be copied when the array grows.

ClusterSetSimple and ClusterSetPure

ClusterSetSimple was removed in favor of ClusterArray<bool> and ClusterSetPure in favor of ClusterSet<false> (which does not keep track of its size).

Graph

The move constructor and assignment operators of Graph are now deleted, which especially means that NodeArray<Graph>, EdgeArray<Graph>, FaceArray<Graph>, etc. is no longer possible. (Previously it compiled, but randomly broke at runtime when adding new nodes.) Use NodeArrayP<Graph>, EdgeArrayP<Graph>, FaceArrayP<Graph>, etc. instead to wrap the Graphs in std::unique_ptrs and then make one pass over all entries to initialize the pointers. See the documentation of NodeArrayP for usage as member variable on MSVC<=16. For this reason, SimDraw::getBasicGraph now returns a std::unique_ptr<GraphCopy> instead of copying a Graph object on return.

GraphCopy

GraphCopy::createEmpty() was deprecated in favor of setOriginalGraph(). The same holds for createEmpty() of GraphCopySimple and EdgeWeightedGraph.

GraphObserver

GraphObservers are now notified when their Graph is destructed through GraphObserver::registrationChanged().

ClusterGraphObservers are now notified of their ClusterGraph being cleared through ClusterGraphObserver::clustersCleared().

HypergraphObserver::init() was deprecated in favor of reregister().

Observers and their Observables now have deleted copy and move constructors and assignment operators. Subclasses can instead explicitly declare their copy and move behaviour using the default constructors of Observer / Observable, Observer::getObservers(), Observer::clearObservers() and Observable::reregister().

Graph::insert

Multiple methods for inserting (parts of) a graph were merged into a single Graph::insert implementation. This implementation is also used when copy-constructing or (in combination with clear) when copy-assigning. It replaces the following different implementations, which were removed:

void Graph::construct(const Graph &G, NodeArray<node> &mapNode, EdgeArray<edge> &mapEdge);
void Graph::assign(const Graph &G, NodeArray<node> &mapNode, EdgeArray<edge> &mapEdge);
void Graph::insert(const Graph &G, NodeArray<node> &nodeMap);
void Graph::copy(const Graph &G);
void Graph::copy(const Graph &G, NodeArray<node> &mapNode, EdgeArray<edge> &mapEdge);
void Graph::constructInitByNodes(const Graph &G, const List<node> &nodeList, NodeArray<node> &mapNode, EdgeArray<edge> &mapEdge);
void Graph::constructInitByActiveNodes(const List<node> &nodeList, const NodeArray<bool> &activeNodes, NodeArray<node> &mapNode, EdgeArray<edge> &mapEdge);
void Graph::constructInitByCC(const CCsInfo &info, int cc, NodeArray<node> &mapNode, EdgeArray<edge> &mapEdge);
void GraphCopySimple::init(const Graph &G);
void GraphCopySimple::initGC(const GraphCopySimple &GC, NodeArray<node> &vCopy, EdgeArray<edge> &eCopy);
void GraphCopy::init(const Graph &G);
void GraphCopy::initByCC(const CCsInfo &info, int cc, EdgeArray<edge> &eCopy);
void GraphCopy::initByNodes(const List<node> &origNodes, EdgeArray<edge> &eCopy);
void GraphCopy::initByActiveNodes(const List<node> &nodeList, const NodeArray<bool> &activeNodes, EdgeArray<edge> &eCopy);
void GraphCopy::initGC(const GraphCopy &GC, NodeArray<node> &vCopy, EdgeArray<edge> &eCopy);
// from <extended_graph_alg.h>:
void inducedSubGraph(const Graph &G, LISTITERATOR start, Graph &subGraph);
void inducedSubGraph(const Graph &G, LISTITERATOR start, Graph &subGraph, NodeArray<node> &nodeTableOrig2New);
void inducedSubGraph(const Graph &G, LISTITERATOR start, Graph &subGraph, NodeArray<node> &nodeTableOrig2New, EdgeArray<edge> &edgeTableOrig2New);
void inducedSubGraph(const Graph &G, LISTITERATOR start, GraphCopySimple &subGraph);

GraphCopy::insert (and GraphCopySimple::insert) will automatically update its mappings when inserting parts of the original Graph. This can be disabled by using setLinkCopiesOnInsert.