Kolja Strohm 6 жил өмнө
parent
commit
17b9d83c90

+ 2 - 1
.gitignore

@@ -2,4 +2,5 @@ bin
 .idea
 out
 auxil
-svg-inkscape
+svg-inkscape
+*.synctex*

BIN
bin/Model/LayeredGraphNode.class


BIN
bin/Model/LayeredNode.class


BIN
bin/View/MainView.class


BIN
bin/View/NodeView.class


+ 54 - 17
doc/chapter/2architecture.tex

@@ -1,15 +1,58 @@
 \TODO{some text}
+
+\section{Assumptions}
+The following assumptions are made for the implementation of the node placement algorithm:
+\begin{itemize}
+    \item There are no hyperedges.
+    \item There are no port constraints.
+    \item There are no labels.
+    \item There are no cross-hierarchy edges.
+\end{itemize}
+
 \section{Input File Format}\label{sec:inputFileFormat}
 The input to \appname is a JSON file.
-The data structure is modeled as a higher order entity relationship model in figure~\ref{fig:iff}.
-An example is displayed in figure~\ref{fig:json-example}
+An example is displayed in figure~\ref{fig:json-example}.
+The structure is as follows:
+\begin{itemize}
+    \item The object in the JSON file is a node.
+    \item A node has the attributes that are displayed in table~\ref{table:node-attributes}. \TODO{remove x and y from implementation}
+    \item An edge has the attributes that are displayed in table~\ref{table:edge-attributes}.
+\end{itemize}
+
+
+\centering
+\begin{longtable}{|p{1.8cm}|p{2cm}|p{1.8cm}|p{8.5cm}|}
+    \hline
+    Attribute & Type & Optional & Explanation \\\hline\hline
+    name & string & yes & If not omitted, this must be unique for a given parent node. \\\hline
+    width & integer & yes & The minimum width of the node.
+    The node can be wider if it contains other nodes that need more space. \\\hline
+    height & integer & yes & The minimum height of the node.
+    The node can be higher if it contains other nodes that need more space. \\\hline
+    layers & list of lists of nodes & yes & The layers of nodes inside this node (Hierarchy). \\\hline
+    edges & list of edges & yes & The edges between nodes whose parent node is this node. \\\hline
+\caption{Node Attributes}
+\label{table:node-attributes}
+\end{longtable}
 
-\begin{figure}[tp]
-    \centering
-    \includegraphics[width=0.9\textwidth]{img/json.png}
-    \caption[Input file format]{Input file format illustrated as a HERM diagram}
-    \label{fig:iff}
-\end{figure}
+\centering
+\begin{longtable}{|p{1.8cm}|p{2cm}|p{1.8cm}|p{8.5cm}|}
+    \hline
+    Attribute & Type & Optional & Explanation \\\hline\hline
+    source & string & no & The name of the source of this edge.
+    Must be a node with the same parent node as the node specified by the \enquote{target} attribute. \\\hline
+    target & string & no & The name of the target of this edge.
+    Must be a node with the same parent node as the node specified by the \enquote{source} attribute. \\\hline
+\caption{Edge Attributes}
+\label{table:edge-attributes}
+\end{longtable}
+
+%\begin{figure}[tp]
+%    \centering
+%    \includegraphics[width=0.9\textwidth]{img/json.png}
+%    \caption[Input file format]{Input file format illustrated as a HERM diagram}
+%    \label{fig:iff}
+%\end{figure}
 
 \begin{figure}
     %    \lstinputlisting[language=Python,emph={Conv2D,MaxPooling2D,Dropout,Flatten,Sequential,Dense}]{src/keras_example_conv.py}
@@ -20,24 +63,18 @@ An example is displayed in figure~\ref{fig:json-example}
              {
                 "name":"n2",
                 "width":10,
-                "height":10,
-                "x":0,
-                "y":0
+                "height":10
              },
              {
-                "name":"n2",
+                "name":"n1",
                 "width":10,
                 "height":10,
-                "x":20,
-                "y":0,
                 "layers":[
                    [
                       {
                          "name":"n2",
                          "width":10,
-                         "height":10,
-                         "x":0,
-                         "y":0
+                         "height":10
                       }
                    ]
                 ]

+ 10 - 1
doc/chapter/3progress.tex

@@ -1 +1,10 @@
-\TODO{some text}
+The following features are either \planned{planned}, \inprogress{under construction} or \done{done}:
+\begin{itemize}
+    \item \done{Reading from an input file as described in section~\ref{sec:inputFileFormat}.}
+    \item \inprogress{Drawing a graph with specified node sizes and positions.}
+    \item \planned{Running the BK node placement algorithm.}\TODO{cite and refer to in introduction}
+    \item \planned{Illustrating the progress of the BK node placement algorithm while it is running.}
+    \item \planned{Running the algorithm step by step manually (by pushing a button labeled \enquote{Step}).}
+    \item \planned{Running the algorithm step by step with configurable delay.}
+    \item \planned{Configuring the verbosity of the animation.}
+\end{itemize}

+ 7 - 4
doc/doc.tex

@@ -30,7 +30,7 @@
 \usepackage[english]{todonotes}
 \newcommand{\TODO}[1]{\todo[inline]{TODO: #1}}
 \newcommand{\Thema}{Placing Nodes Moderately Well While Showing What Is Happening}
-\newcommand{\appname}{\TODO{appname}}
+\newcommand{\appname}{NodeShuffler}
 \usepackage[hyphens]{url} % ermögliche Links (URLs) und erlaube sie am zeilenende umzubrechen
 \usepackage[english,pdfauthor={Eren B. Yilmaz and Kolja S. Strohm}, pdftitle={\Thema}, breaklinks=true]{hyperref}
 \usepackage[final]{microtype} % mikrotypographische Optimierungen
@@ -79,10 +79,13 @@
 \DeclareFixedFont{\ttb}{T1}{txtt}{bx}{n}{8} % for bold
 \DeclareFixedFont{\ttm}{T1}{txtt}{m}{n}{8}  % for normal
 % Custom colors
-\definecolor{deepblue}{rgb}{0,0,0.4}
-\definecolor{deepred}{rgb}{0.4,0,0}
+\definecolor{deepblue}{rgb}{0,0,0.6}
+\definecolor{deepred}{rgb}{0.8,0,0}
 \definecolor{deepgreen}{rgb}{0,0.4,0}
 \definecolor{grau}{gray}{0.3}
+\newcommand{\planned}[1]{\textcolor{deepred}{#1}}
+\newcommand{\done}[1]{\textcolor{deepgreen}{#1}}
+\newcommand{\inprogress}[1]{\textcolor{deepblue}{#1}}
 % python style code
 \lstset{
 extendedchars=true,
@@ -188,7 +191,7 @@ frame=tb}
             \\
 
             \vspace{20mm}
-            \Thema
+            \appname: \Thema
         \end{Large}\\
         \vspace{8mm}
         Project documentation\\