summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/software_manual.org243
-rw-r--r--doc/software_manual.pdfbin180558 -> 179781 bytes
-rw-r--r--doc/software_manual.tex96
3 files changed, 250 insertions, 89 deletions
diff --git a/doc/software_manual.org b/doc/software_manual.org
index 981d863..eebcf17 100644
--- a/doc/software_manual.org
+++ b/doc/software_manual.org
@@ -5,7 +5,7 @@
#+STARTUP: entitiespretty fold inlineimages
* Design
-The LIZFCM static library (at [[https://github.com/Simponic/math-4610][[https://github.com/Simponic/math-4610]] is a successor to my
+The LIZFCM static library (at [[https://github.com/Simponic/math-4610]]) is a successor to my
attempt at writing codes for the Fundamentals of Computational Mathematics course in Common
Lisp, but the effort required to meet the requirement of creating a static library became
too difficult to integrate outside of the ~ASDF~ solution that Common Lisp already brings
@@ -14,13 +14,14 @@ to the table.
All of the work established in ~deprecated-cl~ has been painstakingly translated into
the C programming language. I have a couple tenets for its design:
-+ Implemntations of routines should all be done immutably in respect to arguments.
++ Implementations of routines should all be done immutably in respect to arguments.
+ Functional programming is good (it's... rough in C though).
-+ Routines are separated into "module" c files, and not individual files per function.
++ Routines are separated into "modules" that follow a form of separation of concerns
+ in files, and not individual files per function.
* Compilation
-A provided ~Makefile~ is added for convencience. It has been tested on an M1 machine running MacOS as
-well as Arch Linux.
+A provided ~Makefile~ is added for convencience. It has been tested on an ~arm~-based M1 machine running
+MacOS as well as ~x86~ Arch Linux.
1. ~cd~ into the root of the repo
2. ~make~
@@ -317,6 +318,39 @@ void free_vector(Array_double *v) {
}
#+END_SRC
+*** ~add_element~
++ Author: Elizabeth Hunt
++ Name: ~add_element~
++ Location: ~src/vector.c~
++ Input: a pointer to an ~Array_double~
++ Output: a new ~Array_double~ with element ~x~ appended.
+
+#+BEGIN_SRC c
+Array_double *add_element(Array_double *v, double x) {
+ Array_double *pushed = InitArrayWithSize(double, v->size + 1, 0.0);
+ for (size_t i = 0; i < v->size; ++i)
+ pushed->data[i] = v->data[i];
+ pushed->data[v->size] = x;
+ return pushed;
+}
+#+END_SRC
+
+*** ~slice_element~
++ Author: Elizabeth Hunt
++ Name: ~slice_element~
++ Location: ~src/vector.c~
++ Input: a pointer to an ~Array_double~
++ Output: a new ~Array_double~ with element ~x~ sliced.
+
+#+BEGIN_SRC c
+Array_double *slice_element(Array_double *v, size_t x) {
+ Array_double *sliced = InitArrayWithSize(double, v->size - 1, 0.0);
+ for (size_t i = 0; i < v->size - 1; ++i)
+ sliced->data[i] = i >= x ? v->data[i + 1] : v->data[i];
+ return sliced;
+}
+#+END_SRC
+
*** ~copy_vector~
+ Author: Elizabeth Hunt
+ Name: ~copy_vector~
@@ -370,55 +404,54 @@ void format_vector_into(Array_double *v, char *s) {
matrix $L$, $U$, respectively such that $LU = m$.
+ Output: a pointer to the location in memory in which two ~Matrix_double~'s reside: the first
representing $L$, the second, $U$.
-+ Errors: Exits and throws a status code of ~-1~ when encountering a matrix that cannot be
++ Errors: Fails assertions when encountering a matrix that cannot be
decomposed
#+BEGIN_SRC c
- Matrix_double **lu_decomp(Matrix_double *m) {
- assert(m->cols == m->rows);
+Matrix_double **lu_decomp(Matrix_double *m) {
+ assert(m->cols == m->rows);
- Matrix_double *u = copy_matrix(m);
- Matrix_double *l_empt = InitMatrixWithSize(double, m->rows, m->cols, 0.0);
- Matrix_double *l = put_identity_diagonal(l_empt);
- free(l_empt);
+ Matrix_double *u = copy_matrix(m);
+ Matrix_double *l_empt = InitMatrixWithSize(double, m->rows, m->cols, 0.0);
+ Matrix_double *l = put_identity_diagonal(l_empt);
+ free_matrix(l_empt);
+ Matrix_double **u_l = malloc(sizeof(Matrix_double *) * 2);
- Matrix_double **u_l = malloc(sizeof(Matrix_double *) * 2);
-
- for (size_t y = 0; y < m->rows; y++) {
- if (u->data[y]->data[y] == 0) {
- printf("ERROR: a pivot is zero in given matrix\n");
- exit(-1);
- }
+ for (size_t y = 0; y < m->rows; y++) {
+ if (u->data[y]->data[y] == 0) {
+ printf("ERROR: a pivot is zero in given matrix\n");
+ assert(false);
}
+ }
- if (u && l) {
- for (size_t x = 0; x < m->cols; x++) {
- for (size_t y = x + 1; y < m->rows; y++) {
- double denom = u->data[x]->data[x];
+ if (u && l) {
+ for (size_t x = 0; x < m->cols; x++) {
+ for (size_t y = x + 1; y < m->rows; y++) {
+ double denom = u->data[x]->data[x];
- if (denom == 0) {
- printf("ERROR: non-factorable matrix\n");
- exit(-1);
- }
+ if (denom == 0) {
+ printf("ERROR: non-factorable matrix\n");
+ assert(false);
+ }
- double factor = -(u->data[y]->data[x] / denom);
+ double factor = -(u->data[y]->data[x] / denom);
- Array_double *scaled = scale_v(u->data[x], factor);
- Array_double *added = add_v(scaled, u->data[y]);
- free_vector(scaled);
- free_vector(u->data[y]);
+ Array_double *scaled = scale_v(u->data[x], factor);
+ Array_double *added = add_v(scaled, u->data[y]);
+ free_vector(scaled);
+ free_vector(u->data[y]);
- u->data[y] = added;
- l->data[y]->data[x] = -factor;
- }
+ u->data[y] = added;
+ l->data[y]->data[x] = -factor;
}
}
-
- u_l[0] = u;
- u_l[1] = l;
- return u_l;
}
+
+ u_l[0] = u;
+ u_l[1] = l;
+ return u_l;
+}
#+END_SRC
*** ~bsubst~
+ Author: Elizabeth Hunt
@@ -467,7 +500,7 @@ Array_double *fsubst(Matrix_double *l, Array_double *b) {
}
#+END_SRC
-*** ~solve_matrix~
+*** ~solve_matrix_lu_bsubst~
+ Author: Elizabeth Hunt
+ Location: ~src/matrix.c~
+ Input: a pointer to a ~Matrix_double~ $m$ and a pointer to an ~Array_double~ $b$
@@ -480,7 +513,7 @@ Here we make use of forward substitution to first solve $Ly = b$ given $L$ as th
Then, $LUx = b$, thus $x$ is a solution.
#+BEGIN_SRC c
-Array_double *solve_matrix(Matrix_double *m, Array_double *b) {
+Array_double *solve_matrix_lu_bsubst(Matrix_double *m, Array_double *b) {
assert(b->size == m->rows);
assert(m->rows == m->cols);
@@ -495,11 +528,97 @@ Array_double *solve_matrix(Matrix_double *m, Array_double *b) {
free_matrix(u);
free_matrix(l);
+ free(u_l);
return x;
}
#+END_SRC
+*** ~gaussian_elimination~
++ Author: Elizabeth Hunt
++ Location: ~src/matrix.c~
++ Input: a pointer to a ~Matrix_double~ $m$
++ Output: a pointer to a copy of $m$ in reduced echelon form
+
+This works by finding the row with a maximum value in the column $k$. Then, it uses that as a pivot, and
+applying reduction to all other rows. The general idea is available at [[https://en.wikipedia.org/wiki/Gaussian_elimination]].
+
+#+BEGIN_SRC c
+Matrix_double *gaussian_elimination(Matrix_double *m) {
+ uint64_t h = 0;
+ uint64_t k = 0;
+
+ Matrix_double *m_cp = copy_matrix(m);
+
+ while (h < m_cp->rows && k < m_cp->cols) {
+ uint64_t max_row = 0;
+ double total_max = 0.0;
+
+ for (uint64_t row = h; row < m_cp->rows; row++) {
+ double this_max = c_max(fabs(m_cp->data[row]->data[k]), total_max);
+ if (c_max(this_max, total_max) == this_max) {
+ max_row = row;
+ }
+ }
+
+ if (max_row == 0) {
+ k++;
+ continue;
+ }
+
+ Array_double *swp = m_cp->data[max_row];
+ m_cp->data[max_row] = m_cp->data[h];
+ m_cp->data[h] = swp;
+
+ for (uint64_t row = h + 1; row < m_cp->rows; row++) {
+ double factor = m_cp->data[row]->data[k] / m_cp->data[h]->data[k];
+ m_cp->data[row]->data[k] = 0.0;
+
+ for (uint64_t col = k + 1; col < m_cp->cols; col++) {
+ m_cp->data[row]->data[col] -= m_cp->data[h]->data[col] * factor;
+ }
+ }
+
+ h++;
+ k++;
+ }
+
+ return m_cp;
+}
+#+END_SRC
+
+*** ~solve_matrix_gaussian~
++ Author: Elizabeth Hunt
++ Location: ~src/matrix.c~
++ Input: a pointer to a ~Matrix_double~ $m$ and a target ~Array_double~ $b$
++ Output: a pointer to a vector $x$ being the solution to the equation $mx = b$
+
+We first perform ~gaussian_elimination~ after augmenting $m$ and $b$. Then, as $m$ is in reduced echelon form, it's an upper
+triangular matrix, so we can perform back substitution to compute $x$.
+
+#+BEGIN_SRC c
+Array_double *solve_matrix_gaussian(Matrix_double *m, Array_double *b) {
+ assert(b->size == m->rows);
+ assert(m->rows == m->cols);
+
+ Matrix_double *m_augment_b = add_column(m, b);
+ Matrix_double *eliminated = gaussian_elimination(m_augment_b);
+
+ Array_double *b_gauss = col_v(eliminated, m->cols);
+ Matrix_double *u = slice_column(eliminated, m->rows);
+
+ Array_double *solution = bsubst(u, b_gauss);
+
+ free_matrix(m_augment_b);
+ free_matrix(eliminated);
+ free_matrix(u);
+ free_vector(b_gauss);
+
+ return solution;
+}
+#+END_SRC
+
+
*** ~m_dot_v~
+ Author: Elizabeth Hunt
+ Location: ~src/matrix.c~
@@ -535,6 +654,48 @@ Matrix_double *put_identity_diagonal(Matrix_double *m) {
}
#+END_SRC
+*** ~slice_column~
++ Author: Elizabeth Hunt
++ Location: ~src/matrix.c~
++ Input: a pointer to a ~Matrix_double~
++ Output: a pointer to a copy of the given ~Matrix_double~ with column at ~x~ sliced
+
+#+BEGIN_SRC c
+Matrix_double *slice_column(Matrix_double *m, size_t x) {
+ Matrix_double *sliced = copy_matrix(m);
+
+ for (size_t row = 0; row < m->rows; row++) {
+ Array_double *old_row = sliced->data[row];
+ sliced->data[row] = slice_element(old_row, x);
+ free_vector(old_row);
+ }
+ sliced->cols--;
+
+ return sliced;
+}
+#+END_SRC
+
+*** ~add_column~
++ Author: Elizabet Hunt
++ Location: ~src/matrix.c~
++ Input: a pointer to a ~Matrix_double~ and a new vector representing the appended column ~x~
++ Output: a pointer to a copy of the given ~Matrix_double~ with a new column ~x~
+
+#+BEGIN_SRC c
+Matrix_double *add_column(Matrix_double *m, Array_double *v) {
+ Matrix_double *pushed = copy_matrix(m);
+
+ for (size_t row = 0; row < m->rows; row++) {
+ Array_double *old_row = pushed->data[row];
+ pushed->data[row] = add_element(old_row, v->data[row]);
+ free_vector(old_row);
+ }
+
+ pushed->cols++;
+ return pushed;
+}
+#+END_SRC
+
*** ~copy_matrix~
+ Author: Elizabeth Hunt
+ Location: ~src/matrix.c~
diff --git a/doc/software_manual.pdf b/doc/software_manual.pdf
index ba0b14b..8cd70f4 100644
--- a/doc/software_manual.pdf
+++ b/doc/software_manual.pdf
Binary files differ
diff --git a/doc/software_manual.tex b/doc/software_manual.tex
index 292f868..c6eb910 100644
--- a/doc/software_manual.tex
+++ b/doc/software_manual.tex
@@ -1,4 +1,4 @@
-% Created 2023-10-18 Wed 13:06
+% Created 2023-10-30 Mon 09:44
% Intended LaTeX compiler: pdflatex
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
@@ -31,8 +31,8 @@
\setlength\parindent{0pt}
\section{Design}
-\label{sec:org7204e7c}
-The LIZFCM static library (at \href{https://github.com/Simponic/math-4610}{[https://github.com/Simponic/math-4610} is a successor to my
+\label{sec:org7f9c526}
+The LIZFCM static library (at \url{https://github.com/Simponic/math-4610}) is a successor to my
attempt at writing codes for the Fundamentals of Computational Mathematics course in Common
Lisp, but the effort required to meet the requirement of creating a static library became
too difficult to integrate outside of the \texttt{ASDF} solution that Common Lisp already brings
@@ -42,13 +42,13 @@ All of the work established in \texttt{deprecated-cl} has been painstakingly tra
the C programming language. I have a couple tenets for its design:
\begin{itemize}
-\item Implemntations of routines should all be done immutably in respect to arguments.
+\item Implementations of routines should all be done immutably in respect to arguments.
\item Functional programming is good (it's\ldots{} rough in C though).
\item Routines are separated into "module" c files, and not individual files per function.
\end{itemize}
\section{Compilation}
-\label{sec:org16cc307}
+\label{sec:org911a41e}
A provided \texttt{Makefile} is added for convencience. It has been tested on an M1 machine running MacOS as
well as Arch Linux.
@@ -74,11 +74,11 @@ Which is then bundled into a static library in \texttt{lib/lizfcm.a} which can b
in the standard method.
\section{The LIZFCM API}
-\label{sec:org832532a}
+\label{sec:orgd74cd2d}
\subsection{Simple Routines}
-\label{sec:org540b602}
+\label{sec:org66bba13}
\subsubsection{\texttt{smaceps}}
-\label{sec:org4d03b6e}
+\label{sec:orgeae9531}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Name: \texttt{smaceps}
@@ -104,7 +104,7 @@ float smaceps() {
\end{verbatim}
\subsubsection{\texttt{dmaceps}}
-\label{sec:org2603bfc}
+\label{sec:org237c904}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Name: \texttt{dmaceps}
@@ -130,9 +130,9 @@ double dmaceps() {
\end{verbatim}
\subsection{Derivative Routines}
-\label{sec:org95c28e9}
+\label{sec:org9cf9027}
\subsubsection{\texttt{central\_derivative\_at}}
-\label{sec:org950de62}
+\label{sec:org1fcd333}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Name: \texttt{central\_derivative\_at}
@@ -163,7 +163,7 @@ double central_derivative_at(double (*f)(double), double a, double h) {
\end{verbatim}
\subsubsection{\texttt{forward\_derivative\_at}}
-\label{sec:org832eda6}
+\label{sec:org6a768fc}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Name: \texttt{forward\_derivative\_at}
@@ -194,7 +194,7 @@ double forward_derivative_at(double (*f)(double), double a, double h) {
\end{verbatim}
\subsubsection{\texttt{backward\_derivative\_at}}
-\label{sec:org591836d}
+\label{sec:org610ce76}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Name: \texttt{backward\_derivative\_at}
@@ -225,9 +225,9 @@ double backward_derivative_at(double (*f)(double), double a, double h) {
\end{verbatim}
\subsection{Vector Routines}
-\label{sec:org5254fe4}
+\label{sec:orgfd176e6}
\subsubsection{Vector Arithmetic: \texttt{add\_v, minus\_v}}
-\label{sec:orgf802d61}
+\label{sec:org2dbc55f}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Name(s): \texttt{add\_v}, \texttt{minus\_v}
@@ -258,7 +258,7 @@ Array_double *minus_v(Array_double *v1, Array_double *v2) {
\end{verbatim}
\subsubsection{Norms: \texttt{l1\_norm}, \texttt{l2\_norm}, \texttt{linf\_norm}}
-\label{sec:orgc56e22d}
+\label{sec:org53a2ffc}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Name(s): \texttt{l1\_norm}, \texttt{l2\_norm}, \texttt{linf\_norm}
@@ -292,7 +292,7 @@ double linf_norm(Array_double *v) {
\end{verbatim}
\subsubsection{\texttt{vector\_distance}}
-\label{sec:orgb54922f}
+\label{sec:org1fb3f8c}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Name: \texttt{vector\_distance}
@@ -313,7 +313,7 @@ double vector_distance(Array_double *v1, Array_double *v2,
\end{verbatim}
\subsubsection{Distances: \texttt{l1\_distance}, \texttt{l2\_distance}, \texttt{linf\_distance}}
-\label{sec:orgf22f8e0}
+\label{sec:org4a25a94}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Name(s): \texttt{l1\_distance}, \texttt{l2\_distance}, \texttt{linf\_distance}
@@ -339,7 +339,7 @@ double linf_distance(Array_double *v1, Array_double *v2) {
\end{verbatim}
\subsubsection{\texttt{sum\_v}}
-\label{sec:org4593341}
+\label{sec:org035a547}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Name: \texttt{sum\_v}
@@ -359,7 +359,7 @@ double sum_v(Array_double *v) {
\subsubsection{\texttt{scale\_v}}
-\label{sec:org3123f61}
+\label{sec:org12b0853}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Name: \texttt{scale\_v}
@@ -378,7 +378,7 @@ Array_double *scale_v(Array_double *v, double m) {
\end{verbatim}
\subsubsection{\texttt{free\_vector}}
-\label{sec:org983efcf}
+\label{sec:org70ba90c}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Name: \texttt{free\_vector}
@@ -396,7 +396,7 @@ void free_vector(Array_double *v) {
\end{verbatim}
\subsubsection{\texttt{copy\_vector}}
-\label{sec:orgde05d32}
+\label{sec:org57afc74}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Name: \texttt{copy\_vector}
@@ -416,7 +416,7 @@ Array_double *copy_vector(Array_double *v) {
\end{verbatim}
\subsubsection{\texttt{format\_vector\_into}}
-\label{sec:org2e779f3}
+\label{sec:orgc346c3c}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Name: \texttt{format\_vector\_into}
@@ -446,9 +446,9 @@ void format_vector_into(Array_double *v, char *s) {
\end{verbatim}
\subsection{Matrix Routines}
-\label{sec:org2354147}
+\label{sec:org3b053ab}
\subsubsection{\texttt{lu\_decomp}}
-\label{sec:org3690faa}
+\label{sec:org5553968}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Name: \texttt{lu\_decomp}
@@ -509,7 +509,7 @@ Matrix_double **lu_decomp(Matrix_double *m) {
}
\end{verbatim}
\subsubsection{\texttt{bsubst}}
-\label{sec:orgdeba296}
+\label{sec:org253efdc}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Name: \texttt{bsubst}
@@ -534,7 +534,7 @@ Array_double *bsubst(Matrix_double *u, Array_double *b) {
}
\end{verbatim}
\subsubsection{\texttt{fsubst}}
-\label{sec:org60d3435}
+\label{sec:orge0c7bc6}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Name: \texttt{fsubst}
@@ -562,7 +562,7 @@ Array_double *fsubst(Matrix_double *l, Array_double *b) {
\end{verbatim}
\subsubsection{\texttt{solve\_matrix}}
-\label{sec:org914121f}
+\label{sec:orgbcd445a}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Location: \texttt{src/matrix.c}
@@ -598,7 +598,7 @@ Array_double *solve_matrix(Matrix_double *m, Array_double *b) {
\end{verbatim}
\subsubsection{\texttt{m\_dot\_v}}
-\label{sec:orgae0f4c9}
+\label{sec:orga9b1f68}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Location: \texttt{src/matrix.c}
@@ -620,7 +620,7 @@ Array_double *m_dot_v(Matrix_double *m, Array_double *v) {
\end{verbatim}
\subsubsection{\texttt{put\_identity\_diagonal}}
-\label{sec:org6d84f6a}
+\label{sec:org33ead5e}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Location: \texttt{src/matrix.c}
@@ -639,7 +639,7 @@ Matrix_double *put_identity_diagonal(Matrix_double *m) {
\end{verbatim}
\subsubsection{\texttt{copy\_matrix}}
-\label{sec:orge750c56}
+\label{sec:org34b3f5b}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Location: \texttt{src/matrix.c}
@@ -659,7 +659,7 @@ Matrix_double *copy_matrix(Matrix_double *m) {
\end{verbatim}
\subsubsection{\texttt{free\_matrix}}
-\label{sec:org4ebcf85}
+\label{sec:org9c91101}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Location: \texttt{src/matrix.c}
@@ -678,7 +678,7 @@ void free_matrix(Matrix_double *m) {
\end{verbatim}
\subsubsection{\texttt{format\_matrix\_into}}
-\label{sec:org308ee0d}
+\label{sec:org51f3e27}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Name: \texttt{format\_matrix\_into}
@@ -705,9 +705,9 @@ void format_matrix_into(Matrix_double *m, char *s) {
}
\end{verbatim}
\subsection{Root Finding Methods}
-\label{sec:org8981156}
+\label{sec:org0e83d47}
\subsubsection{\texttt{find\_ivt\_range}}
-\label{sec:orga5835b0}
+\label{sec:org3e4e34e}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Name: \texttt{find\_ivt\_range}
@@ -737,7 +737,7 @@ double *find_ivt_range(double (*f)(double), double start_x, double delta,
}
\end{verbatim}
\subsubsection{\texttt{bisect\_find\_root}}
-\label{sec:orgb118fc7}
+\label{sec:org48f0967}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Name(s): \texttt{bisect\_find\_root}
@@ -765,7 +765,7 @@ double bisect_find_root(double (*f)(double), double a, double b,
}
\end{verbatim}
\subsubsection{\texttt{bisect\_find\_root\_with\_error\_assumption}}
-\label{sec:orgf5124e7}
+\label{sec:org15e3c2d}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Name: \texttt{bisect\_find\_root\_with\_error\_assumption}
@@ -789,9 +789,9 @@ double bisect_find_root_with_error_assumption(double (*f)(double), double a,
\end{verbatim}
\subsection{Linear Routines}
-\label{sec:org6f4fce5}
+\label{sec:org98cb54b}
\subsubsection{\texttt{least\_squares\_lin\_reg}}
-\label{sec:orge810f5f}
+\label{sec:org0c0c5d7}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Name: \texttt{least\_squares\_lin\_reg}
@@ -821,12 +821,12 @@ Line *least_squares_lin_reg(Array_double *x, Array_double *y) {
}
\end{verbatim}
\subsection{Appendix / Miscellaneous}
-\label{sec:org85d2eae}
+\label{sec:orge34af18}
\subsubsection{Data Types}
-\label{sec:org198ca2d}
+\label{sec:org0f2f877}
\begin{enumerate}
\item \texttt{Line}
-\label{sec:org1866885}
+\label{sec:org3f27166}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Location: \texttt{inc/types.h}
@@ -839,7 +839,7 @@ typedef struct Line {
} Line;
\end{verbatim}
\item The \texttt{Array\_<type>} and \texttt{Matrix\_<type>}
-\label{sec:org4a1c956}
+\label{sec:org83fc1f3}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Location: \texttt{inc/types.h}
@@ -871,10 +871,10 @@ typedef struct {
\end{enumerate}
\subsubsection{Macros}
-\label{sec:org1976330}
+\label{sec:org2bf9bf0}
\begin{enumerate}
\item \texttt{c\_max} and \texttt{c\_min}
-\label{sec:org208b148}
+\label{sec:orgcaa569e}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Location: \texttt{inc/macros.h}
@@ -888,7 +888,7 @@ typedef struct {
\end{verbatim}
\item \texttt{InitArray}
-\label{sec:orgccc4528}
+\label{sec:org5805999}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Location: \texttt{inc/macros.h}
@@ -909,7 +909,7 @@ typedef struct {
\end{verbatim}
\item \texttt{InitArrayWithSize}
-\label{sec:org7e87550}
+\label{sec:org264d6b7}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Location: \texttt{inc/macros.h}
@@ -930,7 +930,7 @@ typedef struct {
\end{verbatim}
\item \texttt{InitMatrixWithSize}
-\label{sec:orge6ec2b1}
+\label{sec:org310d41a}
\begin{itemize}
\item Author: Elizabeth Hunt
\item Location: \texttt{inc/macros.h}