From e1db8f8f09f25facd7f091fba6d2e5aaad500e97 Mon Sep 17 00:00:00 2001 From: David Kaufmann Date: Mon, 17 Jun 2019 04:15:09 +0200 Subject: [PATCH] more ex3.3 --- ex3/main.tex | 3 ++- ex3/main_3.tex | 15 ++++++++++----- ex3/results/result_3e.tex | 3 +++ 3 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 ex3/results/result_3e.tex diff --git a/ex3/main.tex b/ex3/main.tex index 0d0b087..6d3ca16 100644 --- a/ex3/main.tex +++ b/ex3/main.tex @@ -41,7 +41,7 @@ } \usepackage{listings} -\usepackage{color} +\usepackage{xcolor} \definecolor{backcolour}{rgb}{0.95,0.95,0.92} \lstdefinestyle{block}{ @@ -52,6 +52,7 @@ showstringspaces=false } \lstdefinestyle{command}{ + language=C, backgroundcolor=\color{backcolour}, basicstyle=\small\ttfamily, columns=flexible, diff --git a/ex3/main_3.tex b/ex3/main_3.tex index d4493fa..da83685 100644 --- a/ex3/main_3.tex +++ b/ex3/main_3.tex @@ -70,7 +70,7 @@ RETURN type(r) AS relation, t.node_id AS node least one of the entities should have dierent values in its \texttt{jurisdiction} and \texttt{country\_codes} attributes.} \begin{lstlisting}[style=command] -MATCH (i:Intermediary)-[]->(e1:Entity)<-[]-(o:Officer)-[]->(e2:Entity)<-[]-(i:Intermediary) +MATCH (i:Intermediary)-->(e1:Entity)<--(o:Officer)-->(e2:Entity)<--(i:Intermediary) WHERE e1 <> e2 AND e1.countries <> e2.countries AND (e1.jurisdiction <> e1.country_codes @@ -78,9 +78,10 @@ MATCH (i:Intermediary)-[]->(e1:Entity)<-[]-(o:Officer)-[]->(e2:Entity)<-[]-(i:In RETURN i, e1, e2, o LIMIT 1 \end{lstlisting} - \includegraphics{results/result_3d.png} - \newline - \newline + \begin{figure}[H] + \centering + \includegraphics[width=6cm]{results/result_3d.png} + \end{figure} \item\textbf{For the final task we want to make the \texttt{countries} attribute a real part of the graph. The best way to do this is in Neo4j is @@ -93,8 +94,12 @@ MATCH (other:Other) WHERE exists(other.countries) MERGE (country:Country { name: other.countries }) MERGE (other)-[r:IN_COUNTRY]->(country) \end{lstlisting} + \input{results/result_3e.tex} \begin{lstlisting}[style=command] MATCH (c:Country{ name:"Bermuda" }) RETURN c \end{lstlisting} - \includegraphics{results/result_3d.png} + \begin{figure}[H] + \centering + \includegraphics[width=5cm]{results/result_3e.png} + \end{figure} \end{enumerate} diff --git a/ex3/results/result_3e.tex b/ex3/results/result_3e.tex new file mode 100644 index 0000000..a1de898 --- /dev/null +++ b/ex3/results/result_3e.tex @@ -0,0 +1,3 @@ +\begin{lstlisting}[frame=single] +Added 63 labels, created 63 nodes, set 63 properties, created 386 relationships, completed after 1006 ms. +\end{lstlisting} -- 2.43.0