13.07.2015 Views

Node and Label Placement in a Layered Layout Algorithm - About ...

Node and Label Placement in a Layered Layout Algorithm - About ...

Node and Label Placement in a Layered Layout Algorithm - About ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.3. ImplementationFigure 3.14. Some layout options for KLay <strong>Layered</strong>, especially the node placement selection<strong>and</strong> some other relevant options.3.3.1 Implementation <strong>in</strong> the context of KLay <strong>Layered</strong>Be<strong>in</strong>g a part of the KLay <strong>Layered</strong> layout algorithm, the newly created node placerhas to be <strong>in</strong>tegrated <strong>in</strong>to its source code structure. The choice of the right package<strong>in</strong> the Java source tree is fortunately obvious, due to the clear structure of KLay<strong>Layered</strong>. Every phase of the algorithm, as listed <strong>in</strong> subsection 2.4.1, has its ownsub package. The new node placer is thus <strong>in</strong>cluded <strong>in</strong> the package for phase four,de.cau.cs.kieler.klay.layered.p4nodes.The implement<strong>in</strong>g class itself is called BK<strong>Node</strong>Placer, <strong>in</strong> reference to the authorsof the basic approach, Ulrik Br<strong>and</strong>es <strong>and</strong> Boris Köpf. It extends Abstract<strong>Algorithm</strong>,the abstract base class of algorithms <strong>in</strong> the KIELER project offer<strong>in</strong>g a reference tothe currently used progress monitor. The progress monitor can be used to give theuser visible feedback on the steps already done <strong>and</strong> steps to follow for the currenttask. Furthermore, the I<strong>Layout</strong>Phase <strong>in</strong>terface is implemented which is required byevery phase of the KLay <strong>Layered</strong> algorithm. It declares methods for the layout itself<strong>and</strong> the required <strong>in</strong>termediate processors.This node placer can be chosen by the user via a so called layout option <strong>in</strong> theKIELER tool. The node placer has to be selected from a list of other implementationsfor phase four, as shown <strong>in</strong> Figure 3.14. Additionally, the results of the nodeplacement can also be <strong>in</strong>fluenced by these options. For example, a balanced orunbalanced layout can be chosen, or the m<strong>in</strong>imum separation constra<strong>in</strong>t δ (calledspac<strong>in</strong>g <strong>in</strong> KIELER) can be changed.On the code level, the implementation has to differ slightly from the pseudocode given <strong>in</strong> Section 3.2. Normally, these differences are only small; for example,the position of a port <strong>in</strong> the graph data structure, the so called LGraph, is relative to49

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!