Browse Source

work on documentation, mainly update diagrams and architecture chapter

Eren Yilmaz 6 years ago
parent
commit
65d39e5239
6 changed files with 32 additions and 16 deletions
  1. 29 15
      doc/chapter/2architecture.tex
  2. 1 1
      doc/chapter/4progress.tex
  3. 2 0
      doc/chapter/appendix.tex
  4. BIN
      doc/img/graph.pdf
  5. BIN
      doc/vpp/bk.vpp
  6. BIN
      doc/vpp/graph.vpp

+ 29 - 15
doc/chapter/2architecture.tex

@@ -16,18 +16,17 @@ This example is included in the appendix (figures~\ref{fig:error_disconnected_im
 
 \section{Overview}\label{sec:components}
 The \code{main} package contains an executable class \code{Main}.
-This classes main method reads a graph from a file using the \code{graph.io} package and then creates a MainView.
-It is also possible to create a MainView directly from an \code{ElkNode}.
-The view then instantiates a \code{BKNodePlacement} algorithm and runs it.
-The \code{BKNodePlacement} repeatedly asks the \code{AnimationController} if a step should be done (this is further explained in section~\ref{sec:theActualAlgorithm}).
-It uses \code{LayeredGraphNode}s and \code{LayeredGraphEdge}s.
+This classes \code{main} method reads a graph from a file using the \code{graph.io} package and then creates a \code{MainView}.
+It is also possible to create a \code{MainView} directly from an \code{ElkNode}.
+The view then creates the pseudo code for a \code{BKNodePlacement} algorithm and instantiates a \code{PseudoCodeProcessor} to run it.
+The \code{PseudoCodeProcessor} repeatedly asks an associated \code{ProcessController} if and what kind of step should be done (this is further explained in section~\ref{sec:theActualAlgorithm}).
 Meanwhile the view displays the same \code{LayeredGraphNode}s and \code{LayeredGraphEdge}s on the screen.
 
 Figure~\ref{fig:components} contains a component diagram that illustrates these dependencies of the different packages.
 
 \begin{figure}[htp]
     \centering
-    \includegraphics[width=\linewidth,trim=0 11cm 0 0,clip]{img/components.pdf}
+    \includegraphics[width=0.8\linewidth,trim=0 1cm 0 0,clip]{img/components.pdf}
     \caption[Component diagram]{Component diagram visualizing the architecture of \appname. Each component resembles a java package.}
     \label{fig:components}
 \end{figure}
@@ -136,10 +135,11 @@ Similarly, edges have the following attributes in addition to those given throug
 The last bullet point is available separately for each of the four extremal layouts and for the combined layout.
 
 A class diagram of the package \code{graph} is displayed in figure~\ref{fig:graph}.
+There you will find some less important (from a documentation point of view) attributes that were not listed here.
 
 \begin{figure}[htp]
     \centering
-    \includegraphics[width=\linewidth,trim=0 10cm 0 0,clip]{img/graph.pdf}
+    \includegraphics[width=\linewidth,trim=0 7cm 0 0,clip]{img/graph.pdf}
     \caption{Class diagram of the \code{graph} package.}
     \label{fig:graph}
 \end{figure}
@@ -165,14 +165,15 @@ A class diagram of the package \code{graph} is displayed in figure~\ref{fig:grap
 
 \section{The actual algorithm}\label{sec:theActualAlgorithm}
 This section expects the reader to be familiar with the node placement algorithm by Brandes and Köpf~\cite{brandes_fast_2001}.
-We recommend section 3.2.1 of Carstens~\cite{carstens_node_2012} for a detailed explanation.
+We recommend section 3.2.1 of Carstens~\cite{carstens_node_2012} for a detailed explanation, although Carstens uses some terms differently than Brandes and Köpf and draws the graph from left to right.
+By these means our implementation is oriented more towards the original paper by Brandes and Köpf~\cite{brandes_fast_2001}.
 
-A stage of the algorithm, interface \code{AlgorithmStage}, is an interval during which each step of the algorithm is performed in a similar way.
-Each time such a step is performed it returns whether the stage is already finished or a breakpoint has been reached.
-For example, a forward step in the stage of calculating one extremal layout, \code{ExtremalLayoutCalc}, consists of either a step of calculating the blocks, \code{BlockCalc}, or a step of compacting the layout, \code{Compaction}.
+The \enquote{stages} of the algorithm, located in the package \code{bk}, represent intervals during which each step of the algorithm is performed in a similar way.
+These stages, however, do not run the algorithm, but instead create lines of pseudocode, class \code{PseudoCodeNode}, that can be executed (don't be mislead by the term pseudocode!).
+More precisely each \code{PseudoCodeNode} is a line of code that can be displayed and contains a \code{CodeLine} that can be executed.
 All the stages are displayed in class diagram~\ref{fig:bk}.
 
-To be able to undo a step each stage needs to implement methods for both forward and backward steps.
+\TODO{write about processor}
 
 Note that the \code{AnimationController} is not a controller in the MVC sense that it processes user input, but in the sense that it \emph{controls} the execution of steps/stages.
 This works the following:
@@ -189,11 +190,24 @@ This works the following:
 \begin{figure}[htp]
     \centering
     \includegraphics[width=\linewidth,trim=0 11cm 0 0,clip]{img/bk.pdf}
-    \caption{Class diagram of the packages \code{bk} and \code{animation}.
-    For better readability the class \code{PseudoCodeNode} has been omitted.}
+    \caption{Class diagram of the \code{bk} package.}
     \label{fig:bk}
 \end{figure}
 
+\begin{figure}[htp]
+    \centering
+    \includegraphics[width=\linewidth,trim=0 25cm 0 0,clip]{img/codeline.pdf}
+    \caption{Class diagram of the \code{codeline} package.}
+    \label{fig:codeline}
+\end{figure}
+
+\begin{figure}[htp]
+    \centering
+    \includegraphics[width=\linewidth,trim=0 5cm 0 0,clip]{img/processor.pdf}
+    \caption{Class diagram of the \code{processor} package.}
+    \label{fig:processor}
+\end{figure}
+
 
 \section{View}\label{sec:view}
 This section only covers the software architecture regarding the views.
@@ -215,7 +229,7 @@ A class diagram of the packages \code{view} and \code{main} is displayed in figu
 
 \begin{figure}[htp]
     \centering
-    \includegraphics[width=\linewidth,trim=0 19cm 0 0,clip]{img/main_and_view.pdf}
+    \includegraphics[width=0.9\linewidth,trim=0 8cm 0 0,clip]{img/main_and_view.pdf}
     \caption{Class diagram of the packages \code{view} and \code{main}.}
     \label{fig:view}
 \end{figure}

+ 1 - 1
doc/chapter/4progress.tex

@@ -62,7 +62,7 @@ The following features are either planned (\planned), under construction (\progr
 
 \section{Known Issues}\label{sec:knownIssues}
 Only the most important unsolved issues are listed here.
-For a complete list, see \url{https://koljastrohm-games.com:3000/GraphDrawer/NodeShuffler/issues}.
+For a complete list, see \url{http://gogs.koljastrohm-games.com/GraphDrawer/NodeShuffler/issues}.
 \begin{itemize}
     \item The most important issues were solved.
 \end{itemize}

+ 2 - 0
doc/chapter/appendix.tex

@@ -21,6 +21,8 @@
         Automatic execution & The state of the \code{AnimationController} where it repeatedly sends step commands with a certain delay & See section~\ref{sec:userInterface} \\
         Automatic backwards execution & Special case of automatic execution in backwards direction & See section~\ref{sec:userInterface} \\
         \rowcolor{gray!25}
+        pseudocode & Code that does not clearly belong to a specific programming language.
+        It can actually be executed. & \TODO{reference} \\
         step overrun & The state of the \code{AnimationController} where it repeatedly sends step commands, but only inserts a delay after steps whose line of pseudocode is currently unfolded in the pseudocode view. & See section~\ref{sec:userInterface} \\
         \\\\
 	\end{longtable}

BIN
doc/img/graph.pdf


BIN
doc/vpp/bk.vpp


BIN
doc/vpp/graph.vpp