1 [OGDF](../../README.md) » [Porting Guide](../porting.md) » Catalpa
3 # Porting from Baobab to Catalpa
9 OGDF now requires C++11 features.
10 Make sure you do not use another standard when compiling your user programs.
13 ### Compiling for debug mode
15 If you want to compile for debug mode (even if it is user code, linking
16 against OGDF), you do not need to define `OGDF_DEBUG` any longer. This is
17 automatically defined using CMake.
22 It might be necessary that you need to include additional header files
23 for code that worked before. For example, `#include <ogdf/basic/NodeArray.h>`
24 does not ensure that you also have an `EdgeArray`.
26 We also removed header files that contained declarations of classes whose
27 implementation has already been removed in former releases.
28 This includes `FixedUpwardEmbeddingInserter.h`.
30 The `module` subdirectory has been dissolved.
31 Please look for the module classes in the subdirectories of their implementations.
32 `LayoutModule.h` has been moved into the `basic` subdirectory.
34 The directory structure for internal headers (for example, helper classes)
39 In former versions of the OGDF some symbols were added to the global namespace.
40 This includes but is not limited to `ifstream`, `ofstream`, `cout`, `ios`, `endl`,
41 and `numeric_limits`. Thus, you may be required to explicitly use the `std` namespace.
43 Also many `std` functions and classes that were also available in the `ogdf` namespace are now
44 *only* available in the `std` namespace. For example, string-to-number conversion functions
45 like `std::stoul` cannot be called using `ogdf::stoul` any longer.
49 When a `AlgorithmFailureException` was only thrown in debug mode, it is now replaced
50 by an assertion (`OGDF_ASSERT`). `PreconditionViolationException` have been completely
51 replaced by assertions.
56 All enums are now enum classes or const static.
57 Since the enumerators are scoped, the distinguishing prefixes
58 of the enumerators have been dropped.
59 Unscoped enums are now forbidden in the OGDF.
64 We have removed Symphony and Cgl from the included COIN-OR package.
65 The only LP solver we ship is hence Clp.
67 If your code used Cgl or Symphony, you have to link your objects to
68 the original versions of these libraries now.
73 Some macros have been removed because they are not necessary any longer.
76 * `OGDF_NEW` (simply use `new` instead)
77 * `ABACUS_LP_OSI` (Abacus always uses COIN)
78 * `OGDF_NO_COMPILER_TLS` (thread-local storage is a C++11 feature)
79 * `OGDF_DECL_THREAD` (simply use `thread_local` instead)
81 We also have removed most of the iteration macros since C++11 offers range-based for loops.
82 This includes the removal of `forall_nodes` and `forall_edges`.
88 forall_nodes(v, G) { ... }
92 for(node v : G.nodes) { ... }
95 `OGDF_ASSERT_IF` was replaced by `OGDF_HEAVY_ASSERT`. The debug level argument was dropped.
97 There must now be a semicolon after usage of the macro `OGDF_ASSERT` and `OGDF_HEAVY_ASSERT`.
99 ## Changed class, function, header names
101 ### stNumber(), testSTnumber()
103 To access the st-numbering functions, include `ogdf/basic/STNumbering.h`
104 (instead of `ogdf/basic/extended_graph_alg.h`).
106 The respective functions were renamed:
109 |--------------|---------------------|
110 | stNumber | computeSTNumbering |
111 | testSTnumber | isSTNumbering |
113 ### DTreeMultilevelEmbedder
115 The `DTreeMultilevelEmbedder` header file is moved
116 from `include/ogdf/internal/energybased/` to `include/ogdf/energybased`
117 because it is not internal.
119 Its internal header files however have moved to
120 `include/ogdf/energybased/dtree`.
124 The class `MixedForceLayout` was removed.
125 Instead of calling this layout algorithm, call the `FastMultipoleEmbedder`
126 directly followed by a call to the `SpringEmbedderGridVariant`.
130 The (formerly internal) class `TricComp` was renamed to `Triconnectivity`
131 and can now be found in `include/ogdf/graphalg/Triconnectivity.h`.
135 The method `writeGML(const char*, GraphAttributes&, bool)`
136 was deleted. Use `writeGML(ostream &os, const GraphAttributes&)` instead.
140 The random planar graph generators got a `random` prefix. All directed graph
141 generators are now called `Digraph` instead of `DiGraph` to keep consistency
142 in capitalization across the OGDF. This affects the following generators:
145 |--------------------------------|--------------------------------------|
146 | randomDiGraph | randomDigraph |
147 | planarConnectedGraph | randomPlanarConnectedGraph |
148 | planarBiconnectedGraph | randomPlanarBiconnectedGraph |
149 | planarBiconnectedDiGraph | randomPlanarBiconnectedDigraph |
150 | upwardPlanarBiconnectedDiGraph | randomUpwardPlanarBiconnectedDigraph |
151 | planarCNBGraph | randomPlanarCNBGraph |
152 | planarTriconnectedGraph | randomPlanarTriconnectedGraph |
154 Additionally, if you require only either deterministic or randomized generators,
155 you can now include `include/ogdf/basic/graph_generators/deterministic.h` and
156 `include/ogdf/basic/graph_generators/randomized.h` respectively.
158 ## Changed method signatures
160 The parameter `BlockOrder* order` was deleted from the constructors of `Block` in `BlockOrder.h`.
161 Use the constructors `Block(edge e)` and `Block(node v)` instead.
165 ### List of Adjacent Edges
167 `NodeElement::adjEdges` was renamed to `NodeElement::adjEntries`.
168 This means you have to change `for(adjEntry adj : v->adjEdges)` to `for(adjEntry adj : v->adjEntries)`.
170 The following getter-methods were moved from `Graph` to `NodeElement`.
171 All of these methods take a single list as the only parameter now.
172 * `adjEntries()` (renamed to `allAdjEntries()`)
178 ### Hiding and restoring edges
180 Hiding and restoring edges was not a safe operation in former releases.
189 Graph::HiddenEdgeSet hiddenSet(G);
192 hiddenSet.restore(e);
194 All edges are restored by `hiddenSet.restore()` or automatically by the `HiddenEdgeSet` destructor.
199 The method `collaps` has been renamed to `collapse`.
201 ### Method to compute the next Power of 2
203 The static method `nextPower2` was slightly changed and moved to `Math`.
204 The computed result is no longer strictly larger than the second parameter.
205 `nextPower2(0)` is now `0` instead of `1`.
209 The `newEdge()` methods to add edges at predefined positions in the adjacency list
210 have been removed from `GraphCopy`.
211 You can instead use the respective `newEdge()` function inherited from `Graph`,
212 followed by `GraphCopy::setEdge()`.
216 The methods `rbegin()` and `rend()` were removed from all
217 `GraphArrayIterator`-classes, i.e. from `AdjEntryArray`, `ClusterArray`,
218 `EdgeArray`, `FaceArray` and `NodeArray`. Iterating over their elements in any
219 order can be done by iterating over their respective keys in this order.
221 The methods `rbegin()` and `rend()` of all container classes now
222 return reverse iterators. `succ()`, `operator++()`, `&operator++()` and
223 `cyclicSucc()` of reverse iterators behave like `pred()`, `operator--()`,
224 `&operator--()` and `cyclicPred()` of normal iterators respectively, and
227 ## Stack & StackPure & BoundedStack classes
229 The classes `Stack`, `StackPure` and `BoundedStack` are deleted.
230 Use `ArrayBuffer` instead (which provides the functionality of all three
231 classes (and more) and outperforms all implementations). Change
232 `pop()` in your implementations to `popRet()`.
234 ## List & ListPure class
236 The deprecated methods `List::exchange()` and `ListPure::exchange()` were removed.
237 Use `List::swap()` and `ListPure::swap()` instead.
239 ## SList, SListPure, Queue & QueuePure class
241 The `rbegin()`-methods of the classes `SList`, `SListPure`, `Queue` and
242 `QueuePure` were replaced by `backIterator()`-methods. The name `rbegin()` was
243 misleading since the methods do not return reverse iterators.
245 ## Planar Subgraph Algorithms
247 `BoyerMyrvoldSubgraph` was renamed to `PlanarSubgraphBoyerMyrvold` and `FastPlanarSubgraph` to `PlanarSubgraphFast`.
248 `MaximalPlanarSubgraphSimple` now supports arbitrary start heuristics.
249 As such, the `doMaximize` option was removed from `PlanarSubgraphBoyerMyrvold` (formerly `BoyerMyrvoldSubgraph`).
250 `MaximalPlanarSubgraphSimple::clone()` should be used to obtain a copy of the respective instance
251 since `MaximalPlanarSubgraphSimple(const MaximalPlanarSubgraphSimple &mps)` is no longer available.
253 Support for edge weights was added to `MaximumCPlanarSubgraph`.
254 The signature of `call` includes the new parameter `EdgeArray<int> *pCost` that can be set to `nullptr` for uniform weight.
256 The Module `PlanarSubgraphModule` is now a template.
257 The following implementations are templates themselves: `PlanarSubgraphCactus`, `MaximalPlanarSubgraphSimple`,
258 `PlanarSubgraphEmpty`, `PlanarSubgraphFast`, `MaximumPlanarSubgraph`.
259 All other implementations of the module inherit from `PlanarSubgraphModule<int>`.
261 ### MaximumCPlanarSubgraph
263 `MaximumCPlanarSubgraph` supports advanced calls that also return the edges required to connect the input graph.
264 To avoid conflicts with the method defined by `CPlanarSubgraphModule`, `MaximumCPlanarSubgraph::call` was renamed to
265 `MaximumCPlanarSubgraph::callAndConnect`.
267 ## LayoutClusterPlanRepModule
269 The signature of `call()` changed. The last two parameters `List<NodePair>& npEdges` and `List<edge>& newEdges`
270 became the single parameter `List<edge>& origEdges` that contains all edges in the original that still need to be inserted.
271 The original graph must now contain all edges prior to the call.
272 This also means that the input graph is no longer modified (except for embedding it).
276 `NodeComparer` was removed. Instead of `NodeComparer<T> foo(array, asc)` use `GenericComparer<node, T, asc> foo(array)`.
277 `IndexComparer` also was removed. Use `GenericComparer<node, int>([](node v) { return v->index(); });` instead.
278 If you need a default constructor you may use `OGDF_DECLARE_COMPARER`.
280 ## Heaps and Priority Queues
282 In an attempt to unify the existing heap classes, `BinaryHeap` and `BinaryHeap2` were replaced by a new `BinaryHeap`.
283 All heap implementations are derived from the common interface `HeapBase`.
284 Additionally, the classes `MinPriorityQueue` and `PQueue` were removed.
286 The following heap implementations were introduced:
293 Priority queues might be realized using the newly introduced `PriorityQueue` independently of the desired heap implementation.
294 In contrast to `PriorityQueue` that merely stores directly comparable elements, `PrioritizedQueue` is used to store elements with priorities assigned upon insertion.
295 For even simpler usage see `PrioritizedMapQueue` that keeps track of handles for the inserted elements but requires elements to be unique.
297 The tests in `test/src/basic/heap.cpp` show exemplary usage of the new classes.
299 ### Method equivalents
302 `BinaryHeap` was replaced by `PrioritizedQueue`.
303 Accessing elements at arbitrary positions is no longer supported.
306 |---------------------------|----------------------------------------------------------|
307 | `BinaryHeap::clear` | `PrioritizedQueue::clear` |
308 | `BinaryHeap::decPriority` | `PrioritizedQueue::decrease` |
309 | `BinaryHeap::empty` | `PrioritizedQueue::empty` |
310 | `BinaryHeap::extractMin` | `PrioritizedQueue::topElement` & `PrioritizedQueue::pop` |
311 | `BinaryHeap::getMin` | `PrioritizedQueue::topElement` |
312 | `BinaryHeap::insert` | `PrioritizedQueue::push` |
313 | `BinaryHeap::operator[]` | - |
314 | `BinaryHeap::pop` | `PrioritizedQueue::pop` |
315 | `BinaryHeap::push` | `PrioritizedQueue::push` |
316 | `BinaryHeap::size` | `PrioritizedQueue::size` |
317 | `BinaryHeap::top` | `PrioritizedQueue::topElement` |
321 `BinaryHeap2` was replaced by `PrioritizedMapQueue`. Querying the capacity of the heap is no longer supported.
324 |------------------------------|----------------------------------------------------------------|
325 | `BinaryHeap2::capacity` | - |
326 | `BinaryHeap2::clear` | `PrioritizedMapQueue::clear` |
327 | `BinaryHeap2::decreaseKey` | `PrioritizedMapQueue::decrease` |
328 | `BinaryHeap2::empty` | `PrioritizedMapQueue::empty` |
329 | `BinaryHeap2::extractMin` | `PrioritizedMapQueue::topElement` & `PrioritizedMapQueue::pop` |
330 | `BinaryHeap2::getMinimumKey` | `PrioritizedMapQueue::topPriority` |
331 | `BinaryHeap2::getPriority` | `PrioritizedMapQueue::priority` |
332 | `BinaryHeap2::insert` | `PrioritizedMapQueue::push` |
333 | `BinaryHeap2::size` | `PrioritizedMapQueue::size` |
334 | `BinaryHeap2::topElement` | `PrioritizedMapQueue::topElement` |
338 `PQueue` was replaced by `PrioritizedQueue`.
341 |------------------------------|----------------|
342 | `PQueue::del_min` | `PrioritizedQueue::pop` |
343 | `PQueue::find_min` | `PrioritizedQueue::top` |
344 | `PQueue::insert` | `PrioritizedQueue::push` |
346 #### MinPriorityQueue
348 `MinPriorityQueue` was replaced by `PrioritizedQueue`. Note that `PrioritizedQueue::size` returns the number of elements in the heap instead of the capacity.
351 |--------------------------------------|------------------------------|
352 | `MinPriorityQueue::count` | `PrioritizedQueue::size` |
353 | `MinPriorityQueue::decreasePriority` | `PrioritizedQueue::decrease` |
354 | `MinPriorityQueue::empty` | `PrioritizedQueue::empty` |
355 | `MinPriorityQueue::getMin` | `PrioritizedQueue::top` |
356 | `MinPriorityQueue::insert` | `PrioritizedQueue::push` |
357 | `MinPriorityQueue::pop` | `PrioritizedQueue::pop` |
358 | `MinPriorityQueue::size` | - |
360 ## Layout algorithms and graph constraints
362 Layout algorithms no longer support `GraphConstraints`.
363 Use `call(GraphAttributes)` instead of `call(GraphAttributes, GraphConstraints)`.
364 Graph constraints were removed entirely.
365 Removed classes: `Constraint`, `ConstraintManager`, and `GraphConstraints`.
369 `edgeLengths()`, `numberOfBends()`, `angularResolution()` and
370 `numberOfCrossings()` now return `ArrayBuffer`s with values for each
371 edge/angle/node. The mininum, maximum, mean and standard deviation can no longer
372 be obtained using function parameters but by applying `Math`-functions to the
375 Moreover, `angularResolution()` was renamed to `angles()`.
379 Methods that take filenames (instead of streams) are removed.
380 For example, instead of using
383 GraphIO::readLEDA(G, "circulant.lgr");
384 GraphIO::writeChaco(G, "circulant.gml");
387 you have to create the streams manually, i.e.,
390 std::ifstream is("circulant.lgr");
391 GraphIO::readLEDA(G, is);
392 std::ofstream os("circulant.gml");
393 GraphIO::writeGML(G, os);
396 There are also helper functions `GraphIO::read()` and `GraphIO::write()`
397 that accept filenames for `GraphAttribute`s and `Graph`s,
398 so you can also write
401 GraphIO::read(G, "circulant.lgr", GraphIO::readLEDA);
402 GraphIO::write(G, "circulant.gml", GraphIO::writeGML);
405 Do not confuse the new filename-based `GraphIO::read()` helper function with
406 our new (experimental) generic reader function of the same name.
407 However, this generic reader even allows to write
410 GraphIO::read(G, "circulant.lgr");
411 GraphIO::write(G, "circulant.gml", GraphIO::writeGML);
416 The keywords for nodeshapes changed for some shapes.
418 | Shape | Former | New |
419 |-------------------------|----------------------------------|------------------------|
420 | Shape::RoundedRect | "rect" | "roundedrect" |
421 | Shape::InvParallelogram | "parallelogram" | "invparallelogram" |
422 | Shape::Image | "box" | "image" |
424 This can result in these node shapes not being recognized by other programs when parsed, but provides better
425 OGDF to OGDF parsing and writing.
427 edgeArrow is now "string" instead of "int".
431 Edge weights are written into the `weight` attribute instead of the additional `thickness` value.
435 When parsing bends the first (last) point of the bend is deleted, if it is inside the source (target) node,
436 i.e., if its distance to the source (target) node is zero.
438 stroketype, stipple and node type are now "string" instead of "int".
440 The line color is written as "outline" rather than "line".
442 Edge weight has been moved out of the graphics definition.
444 GML files use one '\t' instead of two ' ' as indentChar now.
446 The `GraphAttributes::edgeSubGraphs` feature allows to define up to 32 subgraphs by assigning a subset of
447 these subgraphs to each edge. These subsets are internally stored in a bitmask. In former versions of OGDF,
448 the GML representation of this attribute was simply `subgraph <bitmask>` (in the definition scope of an edge).
449 This has been changed to output one line containing `subgraph <subgraph-id>` for each subgraph the edge
451 Note that this change implies that GML files exported by former versions of OGDF and using this feature
452 are not recognized correctly. One can fix this manually, e.g., `subgraph 5` now becomes `subgraph 0 subgraph 2`.
456 x,y,z and size are now "double" instead of "float".
458 NodeType is now "int" instead of "string".
460 The (misspelled) keyword "avaliable-for" is changed to "subgraphs".
462 If custom node IDs are supplied, they are written into an extra field "nodeid" instead of the node's "id"
463 attribute, to keep source and target references for edges consistent.
467 Support for the `OGML`-format was dropped entirely.
468 This includes several methods of `GraphIO` and some classes that were used only by the `OGML` reader/writer.
470 The list of deleted classes includes
473 * `UmlToGraphConverter`
479 This section applies if you happened to use the `GmlParser` class directly (instead of `GraphIO`).
481 The class has been moved and renamed to `gml::Parser`.
482 The constructor with filename argument is gone now. Use the constructor for input streams instead.
483 Error messages are now output via the central logger; the ability to directly query the last error
486 ## Filesystem functions
488 The filesystem functions previously found in `ogdf/basic/filesystem.h` have been
489 removed since there are maintained and portable alternatives like
490 [tinydir](https://github.com/cxong/tinydir).
491 C++17 also offers filesystem functions via `#include <filesystem>`.
493 ## CombinatorialEmbedding
495 `CombinatorialEmbedding::splitFace(adjEntry, node)` and `CombinatorialEmbedding::splitFace(node, adjEntry)`
496 are used to insert degree-0 nodes without having to call `CombinatorialEmbedding::computeFaces()` again.
497 In previous version both methods could be used with non-isolated nodes
498 if the last adjacency entry belonged to the same face as the other adjacency entry.
499 This is no longer supported and the node has to be isolated.
500 To reflect this functional change the respective versions of `splitFace` were renamed to `addEdgeToIsolatedNode`.
501 Use `myEmbedding.splitFace(v->lastAdj(), adj)` instead of `myEmbedding.splitFace(v, adj)` if `v` isn't isolated (and you are sure that the adjacency entries lie on the same face!).
502 Use `myEmbedding.addEdgeToIsolatedNode(v, adj)` if `v` is isolated.
504 ## OGDF_USE_SSE2, OGDF_CHECK_SSE2
506 The macros mentioned above have been removed.
507 You can check for the SSE2 CPU feature directly using
508 `ogdf::System::cpuSupports(ogdf::CPUFeature::SSE2)`.
512 The template class `ModuleOption` was removed. `std::unique_ptr` should be used instead.
514 ## Angle functions for DPoint and GenericPoint
516 The static methods `angle` and `angleDegrees` of `DPoint` and `GenericPoint` are now
517 non-static. That means, old calls of
520 double angle = DPoint::angle(point1, point2, point3);
526 double angle = point1.angle(point2, point3);
529 ## PoolMemoryAllocator
531 Some types / constants of `PoolMemoryAllocator` were deleted or renamed.
534 |---------------------|--------------|
535 | `BlockChainPtr` | - |
536 | `eBlockSize` | `BLOCK_SIZE` |
537 | `eMinBytes` | `MIN_BYTES` |
538 | `ePoolVectorLength` | - |
539 | `eTableSize` | `TABLE_SIZE` |
541 | `MemElemExPtr` | - |
547 `NonPlanarCore<TCost>::mincut(edge e)` now returns an `NonPlanarCore<TCost>::CutEdge` which is
548 a struct with the two parameters `edge e`, the edge itself and a `bool dir` which indicates the
549 direction of the edge, i.e. indicates if the edge goes from s to t or the other way round.
550 Furthermore the `NonPlanarCore` can now handle weighted edges and therefore is templated with
551 the type of the weights.
553 ## MMMExample layouts
555 Some very simple example layout algorithms (using the `ModularMultilevelMixer`) were removed.
556 This includes `MMMExampleFast`, `MMMExampleNice`, and `MMMExampleNoTwist`.
557 The respective code can still be found in `doc/examples/layout/multilevelmixer.cpp`.
561 The enumerators from `FMMMLayout` are now in a new class `FMMMOptions`.
563 `FMMMLayout::apInteger` became `FMMMOptions::AllowedPositions::Integer` and
564 `FMMMLayout::gcNonUniformProbLowerMass` became `FMMMLayout::GalaxyChoice::NonUniformProbLowerMass`.
568 The basic data structure `DisjointSets` is highly customizable using
569 template parameters. The enumerator names to do so have now changed.
572 |---------|---------------------------------------------|
573 | `NL` | `LinkOptions::Naive` |
574 | `LI` | `LinkOptions::Index` |
575 | `LS` | `LinkOptions::Size` |
576 | `LR` | `LinkOptions::Rank` |
577 | `PC` | `CompressionOptions::PathCompression` |
578 | `PS` | `CompressionOptions::PathSplitting` |
579 | `PH` | `CompressionOptions::PathHalving` |
580 | `R1` | `CompressionOptions::Type1Reversal` |
581 | `CO` | `CompressionOptions::Collapsing` |
582 | `NF` | `CompressionOptions::Disabled` |
583 | `NI` | `InterleavingOptions::Disabled` |
584 | `Rem` | `InterleavingOptions::Rem` |
585 | `TvL` | `InterleavingOptions::Tarjan` |
586 | `IR0` | `InterleavingOptions::Type0Reversal` |
587 | `IPSPC` | `InterleavingOptions::SplittingCompression` |
589 The following arrays (containing the string expansions of the settings)
592 * `compressionOptionNames`
593 * `interleavingOptionNames`
595 ## isForest() and isFreeForest()
597 The function `isForest()` in `basic/simple_graph_alg.h` has been deprecated in favor of `isArborescenceForest()`.
598 `isForest()` formerly returned `true` even when the graph contained multi-edges or self-loops.
599 This is no longer the case for `isArborescenceForest()`.
601 Furthermore, `isFreeForest()` has been deprecated in favor of `isAcyclicUndirected()`.
603 ## connectedIsolatedComponents()
605 The function `connectedIsolatedComponents()` in `basic/simple_graph_alg.h` has been deprecated in favor of `connectedComponents()`.
606 `connectedIsolatedComponents(graph, isolatedNodes, component)` can be rewritten as `connectedComponents(graph, component, &isolatedNodes)`.
608 ## makeParallelFreeUndirected()
610 The overloaded functions of `makeParallelFreeUndirected()` in
611 `basic/simple_graph_alg.h` have been deprecated in favor of a single function
612 that takes pointers as parameters (their default being `nullptr`).
613 `makeParallelFreeUndirected(graph, parEdges, cardPositive, cardNegative)` can be rewritten as
614 `makeParallelFreeUndirected(graph, &parEdges, &cardPositive, &cardNegative)`.
616 ## CliqueFinder and CliqueReplacer
617 The old `CliqueFinder` was replaced by `CliqueFinderSPQR` which is a subclass of `CliquerFinderModule`.
618 Previously, a call to `CliqueFinder` using `Graph G` looked as follows:
621 List<List<node>> cliques;
626 It can be replaced by the following code:
629 List<List<node>*> cliques;
630 CliqueFinderHeuristic heurCf;
631 CliqueFinderSPQR cf(heurCf);
635 The breaking changes made to the `CliqueFinder` include:
636 * The instance graph is passed to a `CliqueFinderModule` via `call()`, not via the constructor.
637 * `call()` takes `List<List<node>*>` as a parameter instead of `List<List<node>>`.
638 * `m_density` is a double in [0..1] instead of an int in [0..100].
639 * `m_postProcess` is a bool instead of an enum value.
640 * `writeGraph()` was removed in favor of the static function `cliqueGraphAttributes()`, which can be used to modify a `GraphAttributes` object in order to pass it to `GraphIO:write`.
642 Moreover, `CliqueReplacer::replaceByStar()` takes `List<List<node>*>` as a parameter instead of `List<List<node>>`.
646 The function template `template<class E> doDestruction(const E *)` has been removed
647 in favor of `!std::is_trivially_destructible<E>::value`. Hence, lists of elements with
648 trivial destructors are now deallocated in constant time automatically, without
649 the necessity of writing a template specialization.
653 The methods `setDirected`, `setStrokeType`, and `setFillPattern` have been removed from `GraphAttributes`.
654 Use the respective getters (`directed`, `strokeType`, and `fillPattern`) instead to obtain a non-const reference to the underlying value.
656 The method `initAttributes` was renamed to `addAttributes` as it does not disable previously enabled attributes.
658 ## ClusterGraphAttributes
660 `ClusterGraphAttributes` was adapted to work similarly to `GraphAttributes`.
661 Attributes can be enabled using the `ClusterGraphAttributes`-flags `clusterGraphics`, `clusterStyle`, `clusterLabel` and `clusterTemplate`.
663 The methods `setStrokeType`, and `setFillPattern` have been removed from `GraphClusterAttributes`.
664 Use the respective getters (`strokeType` and `fillPattern`) instead to obtain a non-const reference to the underlying value.
666 ## GraphCopyAttributes
668 `GraphCopyAttributes` was removed, it must be replaced by `GraphAttributes`.
669 Calls to `copyAttr.transform()` must be replaced by `copyAttr.transferToOriginal(origAttr)`.
670 Calls to `copyAttr.getWidth()` must be replaced by `graphCopy.isDummy(v) ? 0.0 : copyAttr.width(v)` (analogously for `getHeight()`).
672 ## Sets of faces and nodes
674 Some set classes were removed / renamed.
677 |-----------------|-------------------------------------------|
678 | `FaceSetSimple` | `FaceSet<false>` |
679 | `FaceSetPure` | `FaceSet<false>` |
680 | `FaceSet` | `FaceSet<>` (defaults to `FaceSet<true>`) |
681 | `NodeSetSimple` | `NodeSet<false>` |
682 | `NodeSetPure` | `NodeSet<false>` |
683 | `NodeSet` | `NodeSet<>` (defaults to `NodeSet<true>`) |
687 `Math` is no longer a class with static methods but a namespace.
691 The classes `DPoint` and `DVector` are now merged. Note that `DVector::length()` is now `DPoint::norm()`.
692 Furthermore, `DVector::operator^` is now `DPoint::determinant`.
694 The class `DScaler` and the methods `ogdf::DRound` and `DPolyline::convertToInt` were deleted.
696 The classes `DLine` and `DSegment` were rewritten in such a way that `DLine`
697 represents infinite lines and `DSegment` represents finite line segments with
698 start and end points. The methods to access the sides of a `DRect` now return
699 `DSegment`s instead of `DLine`s, and they were renamed appropriately.
702 |-----------------------------------|---------------------------------|
703 | `DLine::intersectionOfLines()` | `DLine::intersection()` |
704 | `DSegment::intersectionOfLines()` | `DLine::intersection()` |
705 | `DRect::bottomLine()` | `DRect::bottom()` |
706 | `DRect::leftLine()` | `DRect::left()` |
707 | `DRect::rightLine()` | `DRect::right()` |
708 | `DRect::topLine()` | `DRect::top()` |
710 The methods `intersection()`, `verIntersection()` and `horIntersection()` of
711 `DLine` and `DSegment` now return an `IntersectionType` instead of a `bool`.
715 The class `HyperGraph` was removed. Use `Hypergraph` instead.
717 ## EFreeList, EList, and EStack
719 The classes `EFreeList`, `EList` and `EStack` were removed. Use `List` and `Stack` instead.