1[OGDF](../../README.md) » [Porting Guide](../porting.md) » Catalpa
2
3# Porting from Baobab to Catalpa
4
5## General
6
7### C++11
8
9OGDF now requires C++11 features.
10Make sure you do not use another standard when compiling your user programs.
11
12
13### Compiling for debug mode
14
15If you want to compile for debug mode (even if it is user code, linking
16against OGDF), you do not need to define `OGDF_DEBUG` any longer. This is
17automatically defined using CMake.
18
19
20### Header files
21
22It might be necessary that you need to include additional header files
23for code that worked before. For example, `#include <ogdf/basic/NodeArray.h>`
24does not ensure that you also have an `EdgeArray`.
25
26We also removed header files that contained declarations of classes whose
27implementation has already been removed in former releases.
28This includes `FixedUpwardEmbeddingInserter.h`.
29
30The `module` subdirectory has been dissolved.
31Please look for the module classes in the subdirectories of their implementations.
32`LayoutModule.h` has been moved into the `basic` subdirectory.
33
34The directory structure for internal headers (for example, helper classes)
35has changed.
36
37### Global namespace
38
39In former versions of the OGDF some symbols were added to the global namespace.
40This includes but is not limited to `ifstream`, `ofstream`, `cout`, `ios`, `endl`,
41and `numeric_limits`. Thus, you may be required to explicitly use the `std` namespace.
42
43Also 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
45like `std::stoul` cannot be called using `ogdf::stoul` any longer.
46
47### Exceptions
48
49When a `AlgorithmFailureException` was only thrown in debug mode, it is now replaced
50by an assertion (`OGDF_ASSERT`). `PreconditionViolationException` have been completely
51replaced by assertions.
52
53
54### Enum Classes
55
56All enums are now enum classes or const static.
57Since the enumerators are scoped, the distinguishing prefixes
58of the enumerators have been dropped.
59Unscoped enums are now forbidden in the OGDF.
60
61
62### COIN-OR
63
64We have removed Symphony and Cgl from the included COIN-OR package.
65The only LP solver we ship is hence Clp.
66
67If your code used Cgl or Symphony, you have to link your objects to
68the original versions of these libraries now.
69
70
71## Macros
72
73Some macros have been removed because they are not necessary any longer.
74
75This includes
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)
80
81We also have removed most of the iteration macros since C++11 offers range-based for loops.
82This includes the removal of `forall_nodes` and `forall_edges`.
83
84```cpp
85node v;
86Graph G;
87
88forall_nodes(v, G) { ... }
89```
90should be replaced by
91```cpp
92for(node v : G.nodes) { ... }
93```
94
95`OGDF_ASSERT_IF` was replaced by `OGDF_HEAVY_ASSERT`. The debug level argument was dropped.
96
97There must now be a semicolon after usage of the macro `OGDF_ASSERT` and `OGDF_HEAVY_ASSERT`.
98
99## Changed class, function, header names
100
101### stNumber(), testSTnumber()
102
103To access the st-numbering functions, include `ogdf/basic/STNumbering.h`
104(instead of `ogdf/basic/extended_graph_alg.h`).
105
106The respective functions were renamed:
107
108| Former       | New                 |
109|--------------|---------------------|
110| stNumber     | computeSTNumbering  |
111| testSTnumber | isSTNumbering       |
112
113### DTreeMultilevelEmbedder
114
115The `DTreeMultilevelEmbedder` header file is moved
116from `include/ogdf/internal/energybased/` to `include/ogdf/energybased`
117because it is not internal.
118
119Its internal header files however have moved to
120`include/ogdf/energybased/dtree`.
121
122### MixedForceLayout
123
124The class `MixedForceLayout` was removed.
125Instead of calling this layout algorithm, call the `FastMultipoleEmbedder`
126directly followed by a call to the `SpringEmbedderGridVariant`.
127
128### TricComp
129
130The (formerly internal) class `TricComp` was renamed to `Triconnectivity`
131and can now be found in `include/ogdf/graphalg/Triconnectivity.h`.
132
133### PlanRepInc
134
135The method `writeGML(const char*, GraphAttributes&, bool)`
136was deleted. Use `writeGML(ostream &os, const GraphAttributes&)` instead.
137
138### Graph generators
139
140The random planar graph generators got a `random` prefix. All directed graph
141generators are now called `Digraph` instead of `DiGraph` to keep consistency
142in capitalization across the OGDF. This affects the following generators:
143
144| Former                         | New                                  |
145|--------------------------------|--------------------------------------|
146| randomDiGraph                  | randomDigraph                        |
147| planarConnectedGraph           | randomPlanarConnectedGraph           |
148| planarBiconnectedGraph         | randomPlanarBiconnectedGraph         |
149| planarBiconnectedDiGraph       | randomPlanarBiconnectedDigraph       |
150| upwardPlanarBiconnectedDiGraph | randomUpwardPlanarBiconnectedDigraph |
151| planarCNBGraph                 | randomPlanarCNBGraph                 |
152| planarTriconnectedGraph        | randomPlanarTriconnectedGraph        |
153
154Additionally, if you require only either deterministic or randomized generators,
155you can now include `include/ogdf/basic/graph_generators/deterministic.h` and
156 `include/ogdf/basic/graph_generators/randomized.h` respectively.
157
158## Changed method signatures
159
160The parameter `BlockOrder* order` was deleted from the constructors of `Block` in `BlockOrder.h`.
161Use the constructors `Block(edge e)` and `Block(node v)` instead.
162
163## Graph class
164
165### List of Adjacent Edges
166
167`NodeElement::adjEdges` was renamed to `NodeElement::adjEntries`.
168This means you have to change `for(adjEntry adj : v->adjEdges)` to `for(adjEntry adj : v->adjEntries)`.
169
170The following getter-methods were moved from `Graph` to `NodeElement`.
171All of these methods take a single list as the only parameter now.
172 * `adjEntries()` (renamed to `allAdjEntries()`)
173 * `adjEdges()`
174 * `inEdges()`
175 * `outEdges()`
176
177
178### Hiding and restoring edges
179
180Hiding and restoring edges was not a safe operation in former releases.
181Replace code like
182```c++
183    G.hideEdge(e);
184    // ...
185    G.restoreEdge(e);
186```
187by
188```c++
189   Graph::HiddenEdgeSet hiddenSet(G);
190   hiddenSet.hide(e);
191   // ...
192   hiddenSet.restore(e);
193```
194All edges are restored by `hiddenSet.restore()` or automatically by the `HiddenEdgeSet` destructor.
195
196
197### Typofix: collaps
198
199The method `collaps` has been renamed to `collapse`.
200
201### Method to compute the next Power of 2
202
203The static method `nextPower2` was slightly changed and moved to `Math`.
204The computed result is no longer strictly larger than the second parameter.
205`nextPower2(0)` is now `0` instead of `1`.
206
207## GraphCopy class
208
209The `newEdge()` methods to add edges at predefined positions in the adjacency list
210have been removed from `GraphCopy`.
211You can instead use the respective `newEdge()` function inherited from `Graph`,
212followed by `GraphCopy::setEdge()`.
213
214## Container Classes
215
216The 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
219order can be done by iterating over their respective keys in this order.
220
221The methods `rbegin()` and `rend()` of all container classes now
222return reverse iterators. `succ()`, `operator++()`, `&operator++()` and
223`cyclicSucc()` of reverse iterators behave like `pred()`, `operator--()`,
224`&operator--()` and `cyclicPred()` of normal iterators respectively, and
225vice versa.
226
227## Stack & StackPure & BoundedStack classes
228
229The classes `Stack`, `StackPure` and `BoundedStack` are deleted.
230Use `ArrayBuffer` instead (which provides the functionality of all three
231classes (and more) and outperforms all implementations). Change
232`pop()` in your implementations to `popRet()`.
233
234## List & ListPure class
235
236The deprecated methods `List::exchange()` and `ListPure::exchange()` were removed.
237Use `List::swap()` and `ListPure::swap()` instead.
238
239## SList, SListPure, Queue & QueuePure class
240
241The `rbegin()`-methods of the classes `SList`, `SListPure`, `Queue` and
242`QueuePure` were replaced by `backIterator()`-methods. The name `rbegin()` was
243misleading since the methods do not return reverse iterators.
244
245## Planar Subgraph Algorithms
246
247`BoyerMyrvoldSubgraph` was renamed to `PlanarSubgraphBoyerMyrvold` and `FastPlanarSubgraph` to `PlanarSubgraphFast`.
248`MaximalPlanarSubgraphSimple` now supports arbitrary start heuristics.
249As such, the `doMaximize` option was removed from `PlanarSubgraphBoyerMyrvold` (formerly `BoyerMyrvoldSubgraph`).
250`MaximalPlanarSubgraphSimple::clone()` should be used to obtain a copy of the respective instance
251since `MaximalPlanarSubgraphSimple(const MaximalPlanarSubgraphSimple &mps)` is no longer available.
252
253Support for edge weights was added to `MaximumCPlanarSubgraph`.
254The signature of `call` includes the new parameter `EdgeArray<int> *pCost` that can be set to `nullptr` for uniform weight.
255
256The Module `PlanarSubgraphModule` is now a template.
257The following implementations are templates themselves: `PlanarSubgraphCactus`, `MaximalPlanarSubgraphSimple`,
258`PlanarSubgraphEmpty`, `PlanarSubgraphFast`, `MaximumPlanarSubgraph`.
259All other implementations of the module inherit from `PlanarSubgraphModule<int>`.
260
261### MaximumCPlanarSubgraph
262
263`MaximumCPlanarSubgraph` supports advanced calls that also return the edges required to connect the input graph.
264To avoid conflicts with the method defined by `CPlanarSubgraphModule`, `MaximumCPlanarSubgraph::call` was renamed to
265`MaximumCPlanarSubgraph::callAndConnect`.
266
267## LayoutClusterPlanRepModule
268
269The signature of `call()` changed. The last two parameters `List<NodePair>& npEdges` and `List<edge>& newEdges`
270became the single parameter `List<edge>& origEdges` that contains all edges in the original that still need to be inserted.
271The original graph must now contain all edges prior to the call.
272This also means that the input graph is no longer modified (except for embedding it).
273
274## Comparers
275
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.
278If you need a default constructor you may use `OGDF_DECLARE_COMPARER`.
279
280## Heaps and Priority Queues
281
282In an attempt to unify the existing heap classes, `BinaryHeap` and `BinaryHeap2` were replaced by a new `BinaryHeap`.
283All heap implementations are derived from the common interface `HeapBase`.
284Additionally, the classes `MinPriorityQueue` and `PQueue` were removed.
285
286The following heap implementations were introduced:
287 * `BinaryHeap`
288 * `BinomialHeap`
289 * `FibonacciHeap`
290 * `PairingHeap`
291 * `RadixHeap`
292
293Priority queues might be realized using the newly introduced `PriorityQueue` independently of the desired heap implementation.
294In contrast to `PriorityQueue` that merely stores directly comparable elements, `PrioritizedQueue` is used to store elements with priorities assigned upon insertion.
295For even simpler usage see `PrioritizedMapQueue` that keeps track of handles for the inserted elements but requires elements to be unique.
296
297The tests in `test/src/basic/heap.cpp` show exemplary usage of the new classes.
298
299### Method equivalents
300
301#### BinaryHeap
302`BinaryHeap` was replaced by `PrioritizedQueue`.
303Accessing elements at arbitrary positions is no longer supported.
304
305| Former                    | New                                                      |
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`                           |
318
319#### BinaryHeap2
320
321`BinaryHeap2` was replaced by `PrioritizedMapQueue`. Querying the capacity of the heap is no longer supported.
322
323| Former                       | New                                                            |
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`                              |
335
336#### PQueue
337
338`PQueue` was replaced by `PrioritizedQueue`.
339
340| Former                       | New            |
341|------------------------------|----------------|
342| `PQueue::del_min`  | `PrioritizedQueue::pop`  |
343| `PQueue::find_min` | `PrioritizedQueue::top`  |
344| `PQueue::insert`   | `PrioritizedQueue::push` |
345
346#### MinPriorityQueue
347
348`MinPriorityQueue` was replaced by `PrioritizedQueue`. Note that `PrioritizedQueue::size` returns the number of elements in the heap instead of the capacity.
349
350| Former                               | New                          |
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`             | -                            |
359
360## Layout algorithms and graph constraints
361
362Layout algorithms no longer support `GraphConstraints`.
363Use `call(GraphAttributes)` instead of `call(GraphAttributes, GraphConstraints)`.
364Graph constraints were removed entirely.
365Removed classes: `Constraint`, `ConstraintManager`, and `GraphConstraints`.
366
367## LayoutStatistics
368
369`edgeLengths()`, `numberOfBends()`, `angularResolution()` and
370`numberOfCrossings()` now return `ArrayBuffer`s with values for each
371edge/angle/node. The mininum, maximum, mean and standard deviation can no longer
372be obtained using function parameters but by applying `Math`-functions to the
373returned values.
374
375Moreover, `angularResolution()` was renamed to `angles()`.
376
377## GraphIO
378
379Methods that take filenames (instead of streams) are removed.
380For example, instead of using
381
382```c++
383	GraphIO::readLEDA(G, "circulant.lgr");
384	GraphIO::writeChaco(G, "circulant.gml");
385```
386
387you have to create the streams manually, i.e.,
388
389```c++
390	std::ifstream is("circulant.lgr");
391	GraphIO::readLEDA(G, is);
392	std::ofstream os("circulant.gml");
393	GraphIO::writeGML(G, os);
394```
395
396There are also helper functions `GraphIO::read()` and `GraphIO::write()`
397that accept filenames for `GraphAttribute`s and `Graph`s,
398so you can also write
399
400```c++
401	GraphIO::read(G, "circulant.lgr", GraphIO::readLEDA);
402	GraphIO::write(G, "circulant.gml", GraphIO::writeGML);
403```
404
405Do not confuse the new filename-based `GraphIO::read()` helper function with
406our new (experimental) generic reader function of the same name.
407However, this generic reader even allows to write
408
409```c++
410	GraphIO::read(G, "circulant.lgr");
411	GraphIO::write(G, "circulant.gml", GraphIO::writeGML);
412```
413
414### Dot
415
416The keywords for nodeshapes changed for some shapes.
417
418| Shape                   | Former                           | New                    |
419|-------------------------|----------------------------------|------------------------|
420| Shape::RoundedRect      | "rect"                           | "roundedrect"          |
421| Shape::InvParallelogram | "parallelogram"                  | "invparallelogram"     |
422| Shape::Image            | "box"                            | "image"                |
423
424This can result in these node shapes not being recognized by other programs when parsed, but provides better
425OGDF to OGDF parsing and writing.
426
427edgeArrow is now "string" instead of "int".
428
429### GEXF
430
431Edge weights are written into the `weight` attribute instead of the additional `thickness` value.
432
433### GML
434
435When parsing bends the first (last) point of the bend is deleted, if it is inside the source (target) node,
436i.e., if its distance to the source (target) node is zero.
437
438stroketype, stipple and node type are now "string" instead of "int".
439
440The line color is written as "outline" rather than "line".
441
442Edge weight has been moved out of the graphics definition.
443
444GML files use one '\t' instead of two ' ' as indentChar now.
445
446The `GraphAttributes::edgeSubGraphs` feature allows to define up to 32 subgraphs by assigning a subset of
447these subgraphs to each edge. These subsets are internally stored in a bitmask. In former versions of OGDF,
448the GML representation of this attribute was simply `subgraph <bitmask>` (in the definition scope of an edge).
449This has been changed to output one line containing `subgraph <subgraph-id>` for each subgraph the edge
450is contained in.
451Note that this change implies that GML files exported by former versions of OGDF and using this feature
452are not recognized correctly. One can fix this manually, e.g., `subgraph 5` now becomes `subgraph 0 subgraph 2`.
453
454### GraphML
455
456x,y,z and size are now "double" instead of "float".
457
458NodeType is now "int" instead of "string".
459
460The (misspelled) keyword "avaliable-for" is changed to "subgraphs".
461
462If custom node IDs are supplied, they are written into an extra field "nodeid" instead of the node's "id"
463attribute, to keep source and target references for edges consistent.
464
465### OGML
466
467Support for the `OGML`-format was dropped entirely.
468This includes several methods of `GraphIO` and some classes that were used only by the `OGML` reader/writer.
469
470The list of deleted classes includes
471 * `LineBuffer`
472 * `OgmlParser`
473 * `UmlToGraphConverter`
474 * `XmlParser`
475 * `XmlScanner`
476
477## GmlParser
478
479This section applies if you happened to use the `GmlParser` class directly (instead of `GraphIO`).
480
481The class has been moved and renamed to `gml::Parser`.
482The constructor with filename argument is gone now. Use the constructor for input streams instead.
483Error messages are now output via the central logger; the ability to directly query the last error
484has been removed.
485
486## Filesystem functions
487
488The filesystem functions previously found in `ogdf/basic/filesystem.h` have been
489removed since there are maintained and portable alternatives like
490[tinydir](https://github.com/cxong/tinydir).
491C++17 also offers filesystem functions via `#include <filesystem>`.
492
493## CombinatorialEmbedding
494
495`CombinatorialEmbedding::splitFace(adjEntry, node)` and `CombinatorialEmbedding::splitFace(node, adjEntry)`
496are used to insert degree-0 nodes without having to call `CombinatorialEmbedding::computeFaces()` again.
497In previous version both methods could be used with non-isolated nodes
498if the last adjacency entry belonged to the same face as the other adjacency entry.
499This is no longer supported and the node has to be isolated.
500To reflect this functional change the respective versions of `splitFace` were renamed to `addEdgeToIsolatedNode`.
501Use `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!).
502Use `myEmbedding.addEdgeToIsolatedNode(v, adj)` if `v` is isolated.
503
504## OGDF_USE_SSE2, OGDF_CHECK_SSE2
505
506The macros mentioned above have been removed.
507You can check for the SSE2 CPU feature directly using
508`ogdf::System::cpuSupports(ogdf::CPUFeature::SSE2)`.
509
510## ModuleOption
511
512The template class `ModuleOption` was removed. `std::unique_ptr` should be used instead.
513
514## Angle functions for DPoint and GenericPoint
515
516The static methods `angle` and `angleDegrees` of `DPoint` and `GenericPoint` are now
517non-static. That means, old calls of
518
519```c++
520	double angle = DPoint::angle(point1, point2, point3);
521```
522
523now become
524
525```c++
526	double angle = point1.angle(point2, point3);
527```
528
529## PoolMemoryAllocator
530
531Some types / constants of `PoolMemoryAllocator` were deleted or renamed.
532
533| Former              | New          |
534|---------------------|--------------|
535| `BlockChainPtr`     | -            |
536| `eBlockSize`        | `BLOCK_SIZE` |
537| `eMinBytes`         | `MIN_BYTES`  |
538| `ePoolVectorLength` | -            |
539| `eTableSize`        | `TABLE_SIZE` |
540| `MemElemEx`         | -            |
541| `MemElemExPtr`      | -            |
542| `PoolVector`        | -            |
543
544
545## NonPlanarCore
546
547`NonPlanarCore<TCost>::mincut(edge e)` now returns an `NonPlanarCore<TCost>::CutEdge` which is
548a struct with the two parameters `edge e`, the edge itself and a `bool dir` which indicates the
549direction of the edge, i.e. indicates if the edge goes from s to t or the other way round.
550Furthermore the `NonPlanarCore` can now handle weighted edges and therefore is templated with
551the type of the weights.
552
553## MMMExample layouts
554
555Some very simple example layout algorithms (using the `ModularMultilevelMixer`) were removed.
556This includes `MMMExampleFast`, `MMMExampleNice`, and `MMMExampleNoTwist`.
557The respective code can still be found in `doc/examples/layout/multilevelmixer.cpp`.
558
559## FMMMLayout
560
561The enumerators from `FMMMLayout` are now in a new class `FMMMOptions`.
562Hence, for example,
563`FMMMLayout::apInteger` became `FMMMOptions::AllowedPositions::Integer` and
564`FMMMLayout::gcNonUniformProbLowerMass` became `FMMMLayout::GalaxyChoice::NonUniformProbLowerMass`.
565
566## DisjointSets
567
568The basic data structure `DisjointSets` is highly customizable using
569template parameters. The enumerator names to do so have now changed.
570
571| Former  | New                                         |
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` |
588
589The following arrays (containing the string expansions of the settings)
590are removed:
591 * `linkOptionNames`
592 * `compressionOptionNames`
593 * `interleavingOptionNames`
594
595## isForest() and isFreeForest()
596
597The 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.
599This is no longer the case for `isArborescenceForest()`.
600
601Furthermore, `isFreeForest()` has been deprecated in favor of `isAcyclicUndirected()`.
602
603## connectedIsolatedComponents()
604
605The 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)`.
607
608## makeParallelFreeUndirected()
609
610The overloaded functions of `makeParallelFreeUndirected()` in
611`basic/simple_graph_alg.h` have been deprecated in favor of a single function
612that takes pointers as parameters (their default being `nullptr`).
613`makeParallelFreeUndirected(graph, parEdges, cardPositive, cardNegative)` can be rewritten as
614`makeParallelFreeUndirected(graph, &parEdges, &cardPositive, &cardNegative)`.
615
616## CliqueFinder and CliqueReplacer
617The old `CliqueFinder` was replaced by `CliqueFinderSPQR` which is a subclass of `CliquerFinderModule`.
618Previously, a call to `CliqueFinder` using `Graph G` looked as follows:
619
620```
621List<List<node>> cliques;
622CliqueFinder cf(G);
623cf.call(cliques);
624```
625
626It can be replaced by the following code:
627
628```
629List<List<node>*> cliques;
630CliqueFinderHeuristic heurCf;
631CliqueFinderSPQR cf(heurCf);
632cf.call(G, cliques);
633```
634
635The 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`.
641
642Moreover, `CliqueReplacer::replaceByStar()` takes `List<List<node>*>` as a parameter instead of `List<List<node>>`.
643
644## doDestruction()
645
646The function template `template<class E> doDestruction(const E *)` has been removed
647in favor of `!std::is_trivially_destructible<E>::value`. Hence, lists of elements with
648trivial destructors are now deallocated in constant time automatically, without
649the necessity of writing a template specialization.
650
651## GraphAttributes
652
653The methods `setDirected`, `setStrokeType`, and `setFillPattern` have been removed from `GraphAttributes`.
654Use the respective getters (`directed`, `strokeType`, and `fillPattern`) instead to obtain a non-const reference to the underlying value.
655
656The method `initAttributes` was renamed to `addAttributes` as it does not disable previously enabled attributes.
657
658## ClusterGraphAttributes
659
660`ClusterGraphAttributes` was adapted to work similarly to `GraphAttributes`.
661Attributes can be enabled using the `ClusterGraphAttributes`-flags `clusterGraphics`, `clusterStyle`, `clusterLabel` and `clusterTemplate`.
662
663The methods `setStrokeType`, and `setFillPattern` have been removed from `GraphClusterAttributes`.
664Use the respective getters (`strokeType` and `fillPattern`) instead to obtain a non-const reference to the underlying value.
665
666## GraphCopyAttributes
667
668`GraphCopyAttributes` was removed, it must be replaced by `GraphAttributes`.
669Calls to `copyAttr.transform()` must be replaced by `copyAttr.transferToOriginal(origAttr)`.
670Calls to `copyAttr.getWidth()` must be replaced by `graphCopy.isDummy(v) ? 0.0 : copyAttr.width(v)` (analogously for `getHeight()`).
671
672## Sets of faces and nodes
673
674Some set classes were removed / renamed.
675
676| Former          | New                                       |
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>`) |
684
685## Math class
686
687`Math` is no longer a class with static methods but a namespace.
688
689## Geometry
690
691The classes `DPoint` and `DVector` are now merged. Note that `DVector::length()` is now `DPoint::norm()`.
692Furthermore, `DVector::operator^` is now `DPoint::determinant`.
693
694The class `DScaler` and the methods `ogdf::DRound` and `DPolyline::convertToInt` were deleted.
695
696The classes `DLine` and `DSegment` were rewritten in such a way that `DLine`
697represents infinite lines and `DSegment` represents finite line segments with
698start 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.
700
701| Former                            | New                             |
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()`                  |
709
710The methods `intersection()`, `verIntersection()` and `horIntersection()` of
711`DLine` and `DSegment` now return an `IntersectionType` instead of a `bool`.
712
713## HyperGraph
714
715The class `HyperGraph` was removed. Use `Hypergraph` instead.
716
717## EFreeList, EList, and EStack
718
719The classes `EFreeList`, `EList` and `EStack` were removed. Use `List` and `Stack` instead.
720