Kolja Strohm 6 years ago
parent
commit
7b86330087

+ 3 - 2
doc/chapter/1introduction.tex

@@ -6,5 +6,6 @@ Thus we develop an application that not only executes this phase, but also prese
 Then each stage of the node placing algorithm by Brandes and Köpf~\cite{brandes_fast_2001} can be executed step by step, either on user input or automatically with a certain delay.
 After each step the current progress of the algorithm is displayed visually.
 
-In chapter~\ref{ch:architecture} we provide an overview over the \appname 's architecture and chapter~\ref{ch:progress} lists the main features and their progress.
-\TODO{mention chapter 4?}
+In chapter~\ref{ch:architecture} we provide an overview over the \appname 's internal architecture while chapter~\ref{ch:ui} presents and explains the graphical user interface.
+\appname is currently a work in progress so keep in mind that any of the here presented information may be slightly outdated\footnote{even this one}.
+To provide an overview of what is going on, chapter~\ref{ch:progress} lists features and their degree of completion.

+ 26 - 1
doc/chapter/3ui.tex

@@ -2,6 +2,31 @@ Note that since the application is still under construction, so not all screensh
 
 \section{Graphical presentation of the running algorithm}\label{sec:graphicalPresentationOfTheRunningAlgorithm}
 \TODO{under construction}
+\TODO{reference~\ref{fig:animated}}
+\begin{figure}[tp]
+    \centering
+    \includegraphics[width=0.6\linewidth]{img/example.jpg}
+    \caption{A simple graph with 5 nodes after the four extremal layout have been computed, but not balanced yet.
+    The vertical directions are down (upper row), up (lower row) and the horizontal directions are left (left column) and right (right column).
+    The background colors of the nodes display which block they belong to: For example the two blue nodes on the top right are in the same block.
+    Round nodes are the roots of the blocks.
+    A colored circle on a node indicates the class that this node belongs to and is also the color of the topmost sink in the block graph.
+    The node that is currently in the focus of the algorithm (whatever this means for the current stage) is highlighted with a grey square (here the node in the rightmost column on the bottom right).
+    Although edges are not drawn during the node placement phase we added them here as straight lines to improve readability.}
+    \label{fig:animated}
+\end{figure}
 
 \section{User interface}\label{sec:userInterface}
-\TODO{under construction}
+Currently the only way to interact with the application is by keyboard events.
+It is planned to add both additional commands as well as some kind of graphical interface, see chapter~\ref{ch:progress}.
+
+\begin{longtable}{|l|l|}
+    \hline
+    Key & Action \\\hline\hline
+    Left arrow key & Perform one forward step of the algorithm. \\\hline
+    Right arrow key & Perform one backward step (\enquote{undo one step}) of the algorithm. \\\hline
+    P & Pause/unpause the automatic execution. Initially paused. \\\hline
+    D & Print a debug table to standard out. \\\hline
+    \caption{Overview over the currently available keyboard commands.}
+    \label{table:keys}
+\end{longtable}

+ 28 - 0
doc/chapter/6contributors.tex

@@ -0,0 +1,28 @@
+\begin{table}[ht]
+	\centering
+    \small
+    \begin{longtable}{p{7cm} p{7cm}}
+        \rowcolor{gray!50}
+		\textbf{Competency} & \textbf{Contributor} \\
+		Producer & Eren Bora Yilmaz \\
+        \rowcolor{gray!25}
+        Producer & Kolja Samuel Strohm \\
+		Lead Designer & Kolja Samuel Strohm \\
+        \rowcolor{gray!25}
+		Documentation & Eren Bora Yilmaz \\
+        Lead Systems Programmer & Kolja Samuel Strohm \\
+        \rowcolor{gray!25}
+		Lead Graphics Programmer & Kolja Samuel Strohm \\
+		Non-German Comments & Eren Bora Yilmaz \\
+        \rowcolor{gray!25}
+		Operations Director & Kolja Samuel Strohm \\
+        Director Of Quality Assurance & Eren Bora Yilmaz \\
+        \rowcolor{gray!25}
+		Senior Community Manager & Eren Bora Yilmaz \\
+        Creative Director & Kolja Samuel Strohm \\
+        \\\\\rowcolor{gray!25}
+		Special Thanks & Jens Burmeister \\\\
+	\end{longtable}
+	\caption{Contributors}
+	\label{table:contributors}
+\end{table}

+ 7 - 3
doc/doc.tex

@@ -84,7 +84,7 @@
 % Quellcode
 % für Formatierung in Quelltexten, hier im Anhang
 \usepackage{listings}
-\usepackage{color} % Farben
+\usepackage{color, colortbl} % Farben
 
 \colorlet{punct}{red!60!black}
 \definecolor{background}{HTML}{EEEEEE}
@@ -208,11 +208,12 @@ frame=tb}
         \end{Large}\\
         \vspace{8mm}
         Project documentation\\
-        \vspace{0.4cm}
-        \vspace{2 cm}
+        \vspace{2.4 cm}
         Eren Bora Yilmaz (1036085)\\
         Kolja Samuel Strohm (1036051)\\
         Summer term 2018\\
+        \vspace{8mm}
+	    \includegraphics[width=10cm]{img/logo}
     \end{center}
     \clearpage\null\clearpage
 
@@ -254,6 +255,9 @@ frame=tb}
     \chapter{Retrospection}
     \input{chapter/5retrospection}
 
+    \chapter{Contributors}
+    \input{chapter/6contributors}
+
     \appendix
     \chapter{Appendix}\label{ch:appendix}
     \input{chapter/appendix}

BIN
doc/img/example.jpg


BIN
material/lec07-Nodes-Size.pptx


+ 6 - 5
src/Algorithms/Animated/BK/Compaction.java

@@ -182,7 +182,7 @@ public class Compaction implements AlgorithmStage{
 						}
 					}	
 				}
-				else // der Teil nach "placeBlock(u)", genannt "absolute coordinates"
+				else // ein "placeBlock(u)" aufruf hat gerade returned
 				{
 				    // alte Werte merken für undo
 					LayeredGraphNode oldSink = sf.v.getSink( layout );	
@@ -241,15 +241,16 @@ public class Compaction implements AlgorithmStage{
 				}
 			}
 		}
-		else if( state == CompactionState.APPLY_SHIFT )
+		else if( state == CompactionState.APPLY_SHIFT )// "Compute absolute coordinates"
 		{
 			LayeredGraphNode v = graph.getContainedNodes().get( vIndex );
 			double oldX = v.getX( layout );
 			boolean oldDef = !v.isXUndefined( layout );
+			
 			v.setSelected( layout );
-			v.setX( v.getRoot( layout ).getX( layout ), true, layout );
-			if( v == v.getRoot( layout ) && v.getRoot( layout ).getSink( layout ).getShift( layout ) < Double.POSITIVE_INFINITY )
-				v.setX( v.getX( layout ) + v.getRoot( layout ).getSink( layout ).getShift( layout ), true, layout );
+			v.setX( v.getRoot( layout ).getX( layout ), true, layout ); // y_v = y_root[v]
+			if( v == v.getRoot( layout ) && v.getSink( layout ).getShift( layout ) < Double.POSITIVE_INFINITY )
+				v.setX( v.getX( layout ) + v.getSink( layout ).getShift( layout ), true, layout );
 			actions.add( 0, ()-> {
 				v.setX( oldX, oldDef, layout );
 				v.setSelected( layout );