12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- \section{Assumptions}\label{sec: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.
- \item No edges over multiple layers (the previous phases should have added dummy nodes).
- \end{itemize}
- \section{Input File Format}\label{sec:inputFileFormat}
- The input to \appname is a JSON file.
- 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}.
- \item An edge has the attributes that are displayed in table~\ref{table:edge-attributes}.
- \end{itemize}
- For parsing the JSON file the JSON-java library~\cite{leary_json-java:_2018} is used.
- The classes for reading and writing those JSON files are displayed in figure~\ref{fig:io}.
- The internal representation of graphs is further explained in the section~\ref{sec:model}.
- \begin{figure}[tp]
- \centering
- \includegraphics[width=\linewidth]{img/IO.pdf}
- \caption{Class diagram of the IO package, containing utilities for reading and writing graphs.}
- \label{fig:io}
- \end{figure}
- \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{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}
- \raggedright
- %\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}
- \begin{lstinputlisting}[language=json,emph={}]{img/graph.json}
- \end{lstinputlisting}
- \caption[Example Input File]{Example Input file that is understood by \appname.}
- \label{fig:json-example}
- \end{figure}
- \section{Internal graph representation, \enquote{Model}}\label{sec:model}
- One feature that is important to us, is to be able to work with hierarchical graphs (cf. chapter~\ref{ch:progress}).
- \section{TODO: More Class Diagrams}\label{sec:classDiagrams}
- \TODO{maybe even into appendix}
|