From 3a4c1197606a7e9d6048e0e40dff57ae27b7c8ec Mon Sep 17 00:00:00 2001
From: Andreas Kapp Lindquist <andkaplin05@gmail.com>
Date: Wed, 29 Oct 2025 22:26:36 +0100
Subject: report(array_maker): Changed algorithm to wrapfigure

---
 report/report.tex | 36 +++++++++++++++++-------------------
 1 file changed, 17 insertions(+), 19 deletions(-)

(limited to 'report/report.tex')

diff --git a/report/report.tex b/report/report.tex
index 82f0766..efc976d 100755
--- a/report/report.tex
+++ b/report/report.tex
@@ -215,29 +215,27 @@ $i^\text{th}$ pair in the array points to. The psudocode for this can be seen on
 from this psudocode, hence the psudocode instead of assembly. This also makes it
 easier to understand.}
 
-\begin{algorithm}[H]
-    \DontPrintSemicolon        % optional: removes ;
-    \SetAlgoNoLine
-    \SetKwInOut{Input}{Input}
-    \SetKwInOut{Output}{Output}
-
-    \Input{File descriptor $f$}
-    \Output{Pointer and size of array $A$}
-    \BlankLine
-
-    \texttt{// Pointer to file data in $p$ and length of that data in $n$.}\\
+\begin{wrapfigure}[18]{r}{0.5\textwidth}
+    \textbf{Input\ \ :} File descriptor $f$\\
+    \textbf{Output:} Pointer and size of array $A$\\
+    \\
+    \texttt{// Pointer to file data in $p$ and}\\
+    \texttt{// length of that data in $n$.}\\
     $p,n\leftarrow$ create\_file\_buffer($f$)\\
-    \texttt{// Pointer to pairwise data in $p$ and number of pairs in $n$}\\
+    \texttt{// Pointer to pairwise data in $p$}\\
+    \texttt{// and number of pairs in $n$}\\
     $p,n\leftarrow$ make\_pairwise\_data($p,n$)\\
-    \texttt{// Allocate space for final array, and save pointer in $A$}\\
+    \texttt{// Allocate space for final array,}\\
+    \texttt{// and save pointer in $A$}\\
     $A\leftarrow$ allocate($8n$)\\
-    \texttt{// Put memmory address of pair $i$ at index $i$ in $A$}\\
-    \For{$i\leftarrow 0$ \KwTo $n-1$}{
-        $A[i]\leftarrow$ mem\_addr($p[2i]$)
-    }
-    \Return $A$ and $n$
+    \texttt{// Put memmory address of pair $i$}\\
+    \texttt{// at index $i$ in $A$}\\
+    \textbf{for } $i\leftarrow 0$\textbf{ to }$n-1$\textbf{ do}\\
+    \hspace*{2em}$A[i]\leftarrow$ mem\_addr($p[2i]$)\\
+    \textbf{end}\\
+    \textbf{return} $A$ and $n$
     \caption{Pseudocode for \texttt{array\_maker}}\label{fig:arraymaker}
-\end{algorithm}
+\end{wrapfigure}
 
 \newpage
 
-- 
cgit v1.2.3-70-g09d2

