Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

doc/porting/catalpa.md
Go to the documentation of this file.
1 [OGDF](../../README.md) » [Porting Guide](../porting.md) » Catalpa
2 
3 # Porting from Baobab to Catalpa
4 
5 ## General
6 
7 ### C++11
8 
9 OGDF now requires C++11 features.
10 Make sure you do not use another standard when compiling your user programs.
11 
12 
13 ### Compiling for debug mode
14 
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.
18 
19 
20 ### Header files
21 
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`.
25 
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`.
29 
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.
33 
34 The directory structure for internal headers (for example, helper classes)
35 has changed.
36 
37 ### Global namespace
38 
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.
42 
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.
46 
47 ### Exceptions
48 
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.
52 
53 
54 ### Enum Classes
55 
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.
60 
61 
62 ### COIN-OR
63 
64 We have removed Symphony and Cgl from the included COIN-OR package.
65 The only LP solver we ship is hence Clp.
66 
67 If your code used Cgl or Symphony, you have to link your objects to
68 the original versions of these libraries now.
69 
70 
71 ## Macros
72 
73 Some macros have been removed because they are not necessary any longer.
74 
75 This 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 
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`.
83 
84 ```cpp
85 node v;
86 Graph G;
87 
88 forall_nodes(v, G) { ... }
89 ```
90 should be replaced by
91 ```cpp
92 for(node v : G.nodes) { ... }
93 ```
94 
95 `OGDF_ASSERT_IF` was replaced by `OGDF_HEAVY_ASSERT`. The debug level argument was dropped.
96 
97 There 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 
103 To access the st-numbering functions, include `ogdf/basic/STNumbering.h`
104 (instead of `ogdf/basic/extended_graph_alg.h`).
105 
106 The respective functions were renamed:
107 
108 | Former | New |
109 |--------------|---------------------|
110 | stNumber | computeSTNumbering |
111 | testSTnumber | isSTNumbering |
112 
113 ### DTreeMultilevelEmbedder
114 
115 The `DTreeMultilevelEmbedder` header file is moved
116 from `include/ogdf/internal/energybased/` to `include/ogdf/energybased`
117 because it is not internal.
118 
119 Its internal header files however have moved to
120 `include/ogdf/energybased/dtree`.
121 
122 ### MixedForceLayout
123 
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`.
127 
128 ### TricComp
129 
130 The (formerly internal) class `TricComp` was renamed to `Triconnectivity`
131 and can now be found in `include/ogdf/graphalg/Triconnectivity.h`.
132 
133 ### PlanRepInc
134 
135 The method `writeGML(const char*, GraphAttributes&, bool)`
136 was deleted. Use `writeGML(ostream &os, const GraphAttributes&)` instead.
137 
138 ### Graph generators
139 
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:
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 
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.
157 
158 ## Changed method signatures
159 
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.
162 
163 ## Graph class
164 
165 ### List of Adjacent Edges
166 
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)`.
169 
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()`)
173  * `adjEdges()`
174  * `inEdges()`
175  * `outEdges()`
176 
177 
178 ### Hiding and restoring edges
179 
180 Hiding and restoring edges was not a safe operation in former releases.
181 Replace code like
182 ```c++
183  G.hideEdge(e);
184  // ...
185  G.restoreEdge(e);
186 ```
187 by
188 ```c++
189  Graph::HiddenEdgeSet hiddenSet(G);
190  hiddenSet.hide(e);
191  // ...
192  hiddenSet.restore(e);
193 ```
194 All edges are restored by `hiddenSet.restore()` or automatically by the `HiddenEdgeSet` destructor.
195 
196 
197 ### Typofix: collaps
198 
199 The method `collaps` has been renamed to `collapse`.
200 
201 ### Method to compute the next Power of 2
202 
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`.
206 
207 ## GraphCopy class
208 
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()`.
213 
214 ## Container Classes
215 
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.
220 
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
225 vice versa.
226 
227 ## Stack & StackPure & BoundedStack classes
228 
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()`.
233 
234 ## List & ListPure class
235 
236 The deprecated methods `List::exchange()` and `ListPure::exchange()` were removed.
237 Use `List::swap()` and `ListPure::swap()` instead.
238 
239 ## SList, SListPure, Queue & QueuePure class
240 
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.
244 
245 ## Planar Subgraph Algorithms
246 
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.
252 
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.
255 
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>`.
260 
261 ### MaximumCPlanarSubgraph
262 
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`.
266 
267 ## LayoutClusterPlanRepModule
268 
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).
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.
278 If you need a default constructor you may use `OGDF_DECLARE_COMPARER`.
279 
280 ## Heaps and Priority Queues
281 
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.
285 
286 The following heap implementations were introduced:
287  * `BinaryHeap`
288  * `BinomialHeap`
289  * `FibonacciHeap`
290  * `PairingHeap`
291  * `RadixHeap`
292 
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.
296 
297 The 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`.
303 Accessing 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 
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`.
366 
367 ## LayoutStatistics
368 
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
373 returned values.
374 
375 Moreover, `angularResolution()` was renamed to `angles()`.
376 
377 ## GraphIO
378 
379 Methods that take filenames (instead of streams) are removed.
380 For example, instead of using
381 
382 ```c++
383  GraphIO::readLEDA(G, "circulant.lgr");
384  GraphIO::writeChaco(G, "circulant.gml");
385 ```
386 
387 you 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 
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
399 
400 ```c++
401  GraphIO::read(G, "circulant.lgr", GraphIO::readLEDA);
402  GraphIO::write(G, "circulant.gml", GraphIO::writeGML);
403 ```
404 
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
408 
409 ```c++
410  GraphIO::read(G, "circulant.lgr");
411  GraphIO::write(G, "circulant.gml", GraphIO::writeGML);
412 ```
413 
414 ### Dot
415 
416 The 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 
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.
426 
427 edgeArrow is now "string" instead of "int".
428 
429 ### GEXF
430 
431 Edge weights are written into the `weight` attribute instead of the additional `thickness` value.
432 
433 ### GML
434 
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.
437 
438 stroketype, stipple and node type are now "string" instead of "int".
439 
440 The line color is written as "outline" rather than "line".
441 
442 Edge weight has been moved out of the graphics definition.
443 
444 GML files use one '\t' instead of two ' ' as indentChar now.
445 
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
450 is contained in.
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`.
453 
454 ### GraphML
455 
456 x,y,z and size are now "double" instead of "float".
457 
458 NodeType is now "int" instead of "string".
459 
460 The (misspelled) keyword "avaliable-for" is changed to "subgraphs".
461 
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.
464 
465 ### OGML
466 
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.
469 
470 The list of deleted classes includes
471  * `LineBuffer`
472  * `OgmlParser`
473  * `UmlToGraphConverter`
474  * `XmlParser`
475  * `XmlScanner`
476 
477 ## GmlParser
478 
479 This section applies if you happened to use the `GmlParser` class directly (instead of `GraphIO`).
480 
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
484 has been removed.
485 
486 ## Filesystem functions
487 
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>`.
492 
493 ## CombinatorialEmbedding
494 
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.
503 
504 ## OGDF_USE_SSE2, OGDF_CHECK_SSE2
505 
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)`.
509 
510 ## ModuleOption
511 
512 The template class `ModuleOption` was removed. `std::unique_ptr` should be used instead.
513 
514 ## Angle functions for DPoint and GenericPoint
515 
516 The static methods `angle` and `angleDegrees` of `DPoint` and `GenericPoint` are now
517 non-static. That means, old calls of
518 
519 ```c++
520  double angle = DPoint::angle(point1, point2, point3);
521 ```
522 
523 now become
524 
525 ```c++
526  double angle = point1.angle(point2, point3);
527 ```
528 
529 ## PoolMemoryAllocator
530 
531 Some 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
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.
552 
553 ## MMMExample layouts
554 
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`.
558 
559 ## FMMMLayout
560 
561 The enumerators from `FMMMLayout` are now in a new class `FMMMOptions`.
562 Hence, for example,
563 `FMMMLayout::apInteger` became `FMMMOptions::AllowedPositions::Integer` and
564 `FMMMLayout::gcNonUniformProbLowerMass` became `FMMMLayout::GalaxyChoice::NonUniformProbLowerMass`.
565 
566 ## DisjointSets
567 
568 The basic data structure `DisjointSets` is highly customizable using
569 template 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 
589 The following arrays (containing the string expansions of the settings)
590 are removed:
591  * `linkOptionNames`
592  * `compressionOptionNames`
593  * `interleavingOptionNames`
594 
595 ## isForest() and isFreeForest()
596 
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()`.
600 
601 Furthermore, `isFreeForest()` has been deprecated in favor of `isAcyclicUndirected()`.
602 
603 ## connectedIsolatedComponents()
604 
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)`.
607 
608 ## makeParallelFreeUndirected()
609 
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)`.
615 
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:
619 
620 ```
621 List<List<node>> cliques;
622 CliqueFinder cf(G);
623 cf.call(cliques);
624 ```
625 
626 It can be replaced by the following code:
627 
628 ```
629 List<List<node>*> cliques;
630 CliqueFinderHeuristic heurCf;
631 CliqueFinderSPQR cf(heurCf);
632 cf.call(G, cliques);
633 ```
634 
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`.
641 
642 Moreover, `CliqueReplacer::replaceByStar()` takes `List<List<node>*>` as a parameter instead of `List<List<node>>`.
643 
644 ## doDestruction()
645 
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.
650 
651 ## GraphAttributes
652 
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.
655 
656 The 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`.
661 Attributes can be enabled using the `ClusterGraphAttributes`-flags `clusterGraphics`, `clusterStyle`, `clusterLabel` and `clusterTemplate`.
662 
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.
665 
666 ## GraphCopyAttributes
667 
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()`).
671 
672 ## Sets of faces and nodes
673 
674 Some 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 
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`.
693 
694 The class `DScaler` and the methods `ogdf::DRound` and `DPolyline::convertToInt` were deleted.
695 
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.
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 
710 The methods `intersection()`, `verIntersection()` and `horIntersection()` of
711 `DLine` and `DSegment` now return an `IntersectionType` instead of a `bool`.
712 
713 ## HyperGraph
714 
715 The class `HyperGraph` was removed. Use `Hypergraph` instead.
716 
717 ## EFreeList, EList, and EStack
718 
719 The classes `EFreeList`, `EList` and `EStack` were removed. Use `List` and `Stack` instead.