This function writes a debug message that includes the filename, line number, and a custom message. The function is wrapped in an ifdef that checks if DBG is defined, so one can choose to display the debug messages by adding the -DDBG flag when compiling.
+
This macro writes a debug message that includes the filename, line number, and a custom message. The function is wrapped in an ifdef that checks if DBG is defined, so one can choose to display the debug messages by adding the -DDBG flag when compiling.
diff --git a/man_pages/man3/Particle.3 b/man_pages/man3/Particle.3
index db9056a..f37639d 100644
--- a/man_pages/man3/Particle.3
+++ b/man_pages/man3/Particle.3
@@ -1,4 +1,4 @@
-.TH "Particle" 3 "Mon Oct 2 2023" "Penning Trap Simulation" \" -*- nroff -*-
+.TH "Particle" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man_pages/man3/Particle.cpp.3 b/man_pages/man3/Particle.cpp.3
index 2799e38..7a93b45 100644
--- a/man_pages/man3/Particle.cpp.3
+++ b/man_pages/man3/Particle.cpp.3
@@ -1,4 +1,4 @@
-.TH "src/Particle.cpp" 3 "Mon Oct 2 2023" "Penning Trap Simulation" \" -*- nroff -*-
+.TH "src/Particle.cpp" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man_pages/man3/Particle.hpp.3 b/man_pages/man3/Particle.hpp.3
index 2a5a85e..abb26a7 100644
--- a/man_pages/man3/Particle.hpp.3
+++ b/man_pages/man3/Particle.hpp.3
@@ -1,4 +1,4 @@
-.TH "include/Particle.hpp" 3 "Mon Oct 2 2023" "Penning Trap Simulation" \" -*- nroff -*-
+.TH "include/Particle.hpp" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man_pages/man3/PenningTrap.3 b/man_pages/man3/PenningTrap.3
index 42c26cf..2087bb5 100644
--- a/man_pages/man3/PenningTrap.3
+++ b/man_pages/man3/PenningTrap.3
@@ -1,4 +1,4 @@
-.TH "PenningTrap" 3 "Mon Oct 2 2023" "Penning Trap Simulation" \" -*- nroff -*-
+.TH "PenningTrap" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -85,7 +85,7 @@ A class that simulates a Penning trap\&.
This class simulates a Penning trap\&. It can take in a number of particles and simulate how they would behave inside a Penning trap\&.
.PP
-Definition at line \fB25\fP of file \fBPenningTrap\&.hpp\fP\&.
+Definition at line \fB29\fP of file \fBPenningTrap\&.hpp\fP\&.
.SH "Constructor & Destructor Documentation"
.PP
.SS "PenningTrap::PenningTrap (double B_0 = \fC\fBT\fP\fP, double V_0 = \fC25\&.*\fBV\fP/1000\&.\fP, double d = \fC500\&.\fP)"
@@ -93,7 +93,7 @@ Definition at line \fB25\fP of file \fBPenningTrap\&.hpp\fP\&.
.PP
Set B_0, V_0 and d\&.
.PP
-Definition at line \fB26\fP of file \fBPenningTrap\&.cpp\fP\&.
+Definition at line \fB20\fP of file \fBPenningTrap\&.cpp\fP\&.
.SH "Member Function Documentation"
.PP
.SS "void PenningTrap::add_particle (\fBParticle\fP particle)"
@@ -101,63 +101,63 @@ Definition at line \fB26\fP of file \fBPenningTrap\&.cpp\fP\&.
.PP
Add a particle to the system\&.
.PP
-Definition at line \fB33\fP of file \fBPenningTrap\&.cpp\fP\&.
+Definition at line \fB27\fP of file \fBPenningTrap\&.cpp\fP\&.
.SS "void PenningTrap::evolve_forward_euler (double dt)"
.PP
Go forward one timestep using the forward Euler method\&.
.PP
-Definition at line \fB121\fP of file \fBPenningTrap\&.cpp\fP\&.
+Definition at line \fB167\fP of file \fBPenningTrap\&.cpp\fP\&.
.SS "void PenningTrap::evolve_RK4 (double dt)"
.PP
Go forward one timestep using the RK4 method\&.
.PP
-Definition at line \fB116\fP of file \fBPenningTrap\&.cpp\fP\&.
+Definition at line \fB104\fP of file \fBPenningTrap\&.cpp\fP\&.
.SS "arma::vec PenningTrap::external_B_field (arma::vec r)"
.PP
Calculate B at point r\&.
.PP
-Definition at line \fB49\fP of file \fBPenningTrap\&.cpp\fP\&.
+Definition at line \fB43\fP of file \fBPenningTrap\&.cpp\fP\&.
.SS "arma::vec PenningTrap::external_E_field (arma::vec r)"
.PP
Calculate E at point r\&.
.PP
-Definition at line \fB38\fP of file \fBPenningTrap\&.cpp\fP\&.
+Definition at line \fB32\fP of file \fBPenningTrap\&.cpp\fP\&.
.SS "arma::vec PenningTrap::force_on_particle (int i, int j)"
.PP
Calculate the force between 2 particles\&. Calculate the force exhibited on particle p_i from particle p_j\&.
.PP
-Definition at line \fB59\fP of file \fBPenningTrap\&.cpp\fP\&.
+Definition at line \fB50\fP of file \fBPenningTrap\&.cpp\fP\&.
.SS "double PenningTrap::get_d ()"
.PP
-Definition at line \fB142\fP of file \fBPenningTrap\&.cpp\fP\&.
+Definition at line \fB188\fP of file \fBPenningTrap\&.cpp\fP\&.
.SS "arma::vec PenningTrap::get_particle (int i)"
.PP
-Definition at line \fB137\fP of file \fBPenningTrap\&.cpp\fP\&.
+Definition at line \fB183\fP of file \fBPenningTrap\&.cpp\fP\&.
.SS "arma::vec PenningTrap::total_force (int i)"
.PP
calculate the total force on a particle\&.
.PP
-Definition at line \fB111\fP of file \fBPenningTrap\&.cpp\fP\&.
+Definition at line \fB99\fP of file \fBPenningTrap\&.cpp\fP\&.
.SS "arma::vec PenningTrap::total_force_external (int i)"
.PP
Calculate the total external force on a particle\&. Calculate the total amount of force that E and B exhibits on particle p_i\&.
.PP
-Definition at line \fB74\fP of file \fBPenningTrap\&.cpp\fP\&.
+Definition at line \fB65\fP of file \fBPenningTrap\&.cpp\fP\&.
.SS "arma::vec PenningTrap::total_force_particles (int i)"
.PP
Calculate the total force on a particle from other particles\&.
.PP
-Definition at line \fB92\fP of file \fBPenningTrap\&.cpp\fP\&.
+Definition at line \fB80\fP of file \fBPenningTrap\&.cpp\fP\&.
.SH "Member Data Documentation"
.PP
.SS "double PenningTrap::B_0\fC [private]\fP"
@@ -165,25 +165,25 @@ Definition at line \fB92\fP of file \fBPenningTrap\&.cpp\fP\&.
.PP
Magnetic field strength\&.
.PP
-Definition at line \fB27\fP of file \fBPenningTrap\&.hpp\fP\&.
+Definition at line \fB31\fP of file \fBPenningTrap\&.hpp\fP\&.
.SS "double PenningTrap::d\fC [private]\fP"
.PP
Characteristic dimension\&.
.PP
-Definition at line \fB29\fP of file \fBPenningTrap\&.hpp\fP\&.
+Definition at line \fB33\fP of file \fBPenningTrap\&.hpp\fP\&.
.SS "std::vector<\fBParticle\fP> PenningTrap::particles\fC [private]\fP"
.PP
The particles in the Penning trap\&.
.PP
-Definition at line \fB30\fP of file \fBPenningTrap\&.hpp\fP\&.
+Definition at line \fB34\fP of file \fBPenningTrap\&.hpp\fP\&.
.SS "double PenningTrap::V_0\fC [private]\fP"
.PP
Applied potential\&.
.PP
-Definition at line \fB28\fP of file \fBPenningTrap\&.hpp\fP\&.
+Definition at line \fB32\fP of file \fBPenningTrap\&.hpp\fP\&.
.SH "Author"
.PP
diff --git a/man_pages/man3/PenningTrap.cpp.3 b/man_pages/man3/PenningTrap.cpp.3
index fecf53b..f850299 100644
--- a/man_pages/man3/PenningTrap.cpp.3
+++ b/man_pages/man3/PenningTrap.cpp.3
@@ -1,4 +1,4 @@
-.TH "src/PenningTrap.cpp" 3 "Mon Oct 2 2023" "Penning Trap Simulation" \" -*- nroff -*-
+.TH "src/PenningTrap.cpp" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -7,17 +7,11 @@ src/PenningTrap.cpp \- The implementation of the \fBPenningTrap\fP class\&.
.SH SYNOPSIS
.br
.PP
-\fC#include 'utils\&.hpp'\fP
-.br
\fC#include 'PenningTrap\&.hpp'\fP
.br
\fC#include 'constants\&.hpp'\fP
.br
-\fC#include \fP
-.br
-\fC#include \fP
-.br
-\fC#include \fP
+\fC#include 'utils\&.hpp'\fP
.br
.SH "Detailed Description"
diff --git a/man_pages/man3/PenningTrap.hpp.3 b/man_pages/man3/PenningTrap.hpp.3
index 4d434f2..c16a94b 100644
--- a/man_pages/man3/PenningTrap.hpp.3
+++ b/man_pages/man3/PenningTrap.hpp.3
@@ -1,4 +1,4 @@
-.TH "include/PenningTrap.hpp" 3 "Mon Oct 2 2023" "Penning Trap Simulation" \" -*- nroff -*-
+.TH "include/PenningTrap.hpp" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -9,10 +9,12 @@ include/PenningTrap.hpp \- A class for simulating a Penning trap\&.
.PP
\fC#include \fP
.br
-\fC#include 'constants\&.hpp'\fP
+\fC#include \fP
.br
\fC#include 'Particle\&.hpp'\fP
.br
+\fC#include 'constants\&.hpp'\fP
+.br
.SS "Classes"
diff --git a/man_pages/man3/PenningTrapTest.3 b/man_pages/man3/PenningTrapTest.3
new file mode 100644
index 0000000..07c0b75
--- /dev/null
+++ b/man_pages/man3/PenningTrapTest.3
@@ -0,0 +1,56 @@
+.TH "PenningTrapTest" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
+.ad l
+.nh
+.SH NAME
+PenningTrapTest
+.SH SYNOPSIS
+.br
+.PP
+.SS "Static Public Member Functions"
+
+.in +1c
+.ti -1c
+.RI "static void \fBtest_external_E_field\fP ()"
+.br
+.ti -1c
+.RI "static void \fBtest_external_B_field\fP ()"
+.br
+.ti -1c
+.RI "static void \fBtest_force_on_particle\fP ()"
+.br
+.ti -1c
+.RI "static void \fBtest_total_force_external\fP ()"
+.br
+.ti -1c
+.RI "static void \fBtest_total_force_particles\fP ()"
+.br
+.in -1c
+.SH "Detailed Description"
+.PP
+Definition at line \fB20\fP of file \fBtest_suite\&.cpp\fP\&.
+.SH "Member Function Documentation"
+.PP
+.SS "static void PenningTrapTest::test_external_B_field ()\fC [inline]\fP, \fC [static]\fP"
+
+.PP
+Definition at line \fB59\fP of file \fBtest_suite\&.cpp\fP\&.
+.SS "static void PenningTrapTest::test_external_E_field ()\fC [inline]\fP, \fC [static]\fP"
+
+.PP
+Definition at line \fB22\fP of file \fBtest_suite\&.cpp\fP\&.
+.SS "static void PenningTrapTest::test_force_on_particle ()\fC [inline]\fP, \fC [static]\fP"
+
+.PP
+Definition at line \fB70\fP of file \fBtest_suite\&.cpp\fP\&.
+.SS "static void PenningTrapTest::test_total_force_external ()\fC [inline]\fP, \fC [static]\fP"
+
+.PP
+Definition at line \fB95\fP of file \fBtest_suite\&.cpp\fP\&.
+.SS "static void PenningTrapTest::test_total_force_particles ()\fC [inline]\fP, \fC [static]\fP"
+
+.PP
+Definition at line \fB108\fP of file \fBtest_suite\&.cpp\fP\&.
+
+.SH "Author"
+.PP
+Generated automatically by Doxygen for Penning Trap Simulation from the source code\&.
diff --git a/man_pages/man3/bug.3 b/man_pages/man3/bug.3
index 0362f46..f93d6e3 100644
--- a/man_pages/man3/bug.3
+++ b/man_pages/man3/bug.3
@@ -1,4 +1,4 @@
-.TH "bug" 3 "Mon Oct 2 2023" "Penning Trap Simulation" \" -*- nroff -*-
+.TH "bug" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man_pages/man3/constants.hpp.3 b/man_pages/man3/constants.hpp.3
index 2002a1b..ed6ff65 100644
--- a/man_pages/man3/constants.hpp.3
+++ b/man_pages/man3/constants.hpp.3
@@ -1,4 +1,4 @@
-.TH "include/constants.hpp" 3 "Mon Oct 2 2023" "Penning Trap Simulation" \" -*- nroff -*-
+.TH "include/constants.hpp" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man_pages/man3/main.cpp.3 b/man_pages/man3/main.cpp.3
index 4cab7a6..e02bbe4 100644
--- a/man_pages/man3/main.cpp.3
+++ b/man_pages/man3/main.cpp.3
@@ -1,4 +1,4 @@
-.TH "src/main.cpp" 3 "Mon Oct 2 2023" "Penning Trap Simulation" \" -*- nroff -*-
+.TH "src/main.cpp" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -7,12 +7,8 @@ src/main.cpp \- The main program for this project\&.
.SH SYNOPSIS
.br
.PP
-\fC#include \fP
-.br
\fC#include \fP
.br
-\fC#include \fP
-.br
\fC#include \fP
.br
\fC#include \fP
@@ -40,7 +36,7 @@ src/main.cpp \- The main program for this project\&.
.in +1c
.ti -1c
-.RI "void \fBeuler_100_particles\fP ()"
+.RI "void \fBsimulate_100_particles\fP ()"
.br
.ti -1c
.RI "int \fBmain\fP ()"
@@ -78,29 +74,29 @@ Definition in file \fBmain\&.cpp\fP\&.
.SS "#define CHARGE 1\&."
.PP
-Definition at line \fB23\fP of file \fBmain\&.cpp\fP\&.
+Definition at line \fB21\fP of file \fBmain\&.cpp\fP\&.
.SS "#define MASS 40\&."
.PP
-Definition at line \fB24\fP of file \fBmain\&.cpp\fP\&.
+Definition at line \fB22\fP of file \fBmain\&.cpp\fP\&.
.SS "#define N 10000"
.PP
-Definition at line \fB22\fP of file \fBmain\&.cpp\fP\&.
+Definition at line \fB20\fP of file \fBmain\&.cpp\fP\&.
.SS "#define PARTICLES 100"
.PP
-Definition at line \fB21\fP of file \fBmain\&.cpp\fP\&.
+Definition at line \fB19\fP of file \fBmain\&.cpp\fP\&.
.SH "Function Documentation"
.PP
-.SS "void euler_100_particles ()"
-
-.PP
-Definition at line \fB26\fP of file \fBmain\&.cpp\fP\&.
.SS "int main ()"
.PP
Definition at line \fB77\fP of file \fBmain\&.cpp\fP\&.
+.SS "void simulate_100_particles ()"
+
+.PP
+Definition at line \fB24\fP of file \fBmain\&.cpp\fP\&.
.SH "Author"
.PP
Generated automatically by Doxygen for Penning Trap Simulation from the source code\&.
diff --git a/man_pages/man3/test_suite.cpp.3 b/man_pages/man3/test_suite.cpp.3
index 35cfa4b..fa522ef 100644
--- a/man_pages/man3/test_suite.cpp.3
+++ b/man_pages/man3/test_suite.cpp.3
@@ -1,4 +1,4 @@
-.TH "src/test_suite.cpp" 3 "Mon Oct 2 2023" "Penning Trap Simulation" \" -*- nroff -*-
+.TH "src/test_suite.cpp" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -7,6 +7,24 @@ src/test_suite.cpp \- The test suite for the project\&.
.SH SYNOPSIS
.br
.PP
+\fC#include 'PenningTrap\&.hpp'\fP
+.br
+\fC#include 'utils\&.hpp'\fP
+.br
+\fC#include \fP
+.br
+\fC#include \fP
+.br
+\fC#include \fP
+.br
+
+.SS "Classes"
+
+.in +1c
+.ti -1c
+.RI "class \fBPenningTrapTest\fP"
+.br
+.in -1c
.SS "Functions"
.in +1c
@@ -46,7 +64,7 @@ Definition in file \fBtest_suite\&.cpp\fP\&.
.SS "int main ()"
.PP
-Definition at line \fB12\fP of file \fBtest_suite\&.cpp\fP\&.
+Definition at line \fB135\fP of file \fBtest_suite\&.cpp\fP\&.
.SH "Author"
.PP
Generated automatically by Doxygen for Penning Trap Simulation from the source code\&.
diff --git a/man_pages/man3/todo.3 b/man_pages/man3/todo.3
index c342666..a66e064 100644
--- a/man_pages/man3/todo.3
+++ b/man_pages/man3/todo.3
@@ -1,4 +1,4 @@
-.TH "todo" 3 "Mon Oct 2 2023" "Penning Trap Simulation" \" -*- nroff -*-
+.TH "todo" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man_pages/man3/utils.cpp.3 b/man_pages/man3/utils.cpp.3
index 910bd0a..3d60a86 100644
--- a/man_pages/man3/utils.cpp.3
+++ b/man_pages/man3/utils.cpp.3
@@ -1,4 +1,4 @@
-.TH "src/utils.cpp" 3 "Mon Oct 2 2023" "Penning Trap Simulation" \" -*- nroff -*-
+.TH "src/utils.cpp" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -21,6 +21,14 @@ src/utils.cpp \- Implementation of the utils\&.
.RI "std::string \fBscientific_format\fP (const std::vector< double > &v, int width, int prec)"
.br
.RI "Turns a vector of doubles into a string written in scientific format\&. "
+.ti -1c
+.RI "void \fBm_assert\fP (bool expr, std::string expr_str, std::string f, std::string file, int line, std::string msg)"
+.br
+.RI "Test an expression, confirm that test is ok, or abort execution\&. "
+.ti -1c
+.RI "bool \fBarma_vector_close_to\fP (arma::vec &a, arma::vec &b, double tol)"
+.br
+.RI "Test if two armadillo vectors are close to each other\&. "
.in -1c
.SH "Detailed Description"
.PP
@@ -51,6 +59,51 @@ No known bugs
Definition in file \fButils\&.cpp\fP\&.
.SH "Function Documentation"
.PP
+.SS "bool arma_vector_close_to (arma::vec & a, arma::vec & b, double tol = \fC1e\-8\fP)"
+
+.PP
+Test if two armadillo vectors are close to each other\&. This function takes in 2 vectors and checks if they are approximately equal to each other given a tolerance\&.
+.PP
+\fBParameters\fP
+.RS 4
+\fIa\fP Vector a
+.br
+\fIb\fP Vector b
+.br
+\fItol\fP The tolerance
+.RE
+.PP
+\fBReturns\fP
+.RS 4
+Boolean
+.RE
+.PP
+
+.PP
+Definition at line \fB59\fP of file \fButils\&.cpp\fP\&.
+.SS "void m_assert (bool expr, std::string expr_str, std::string func, std::string file, int line, std::string msg)"
+
+.PP
+Test an expression, confirm that test is ok, or abort execution\&. This function takes in an expression and prints an OK message if it's true, or it prints a fail message and aborts execution if it fails\&.
+.PP
+\fBParameters\fP
+.RS 4
+\fIexpr\fP The expression to be evaluated
+.br
+\fIexpr_str\fP The stringified version of the expression
+.br
+\fIfunc\fP The function name of the caller
+.br
+\fIfile\fP The file of the caller
+.br
+\fIline\fP The line number where this function is called from
+.br
+\fImsg\fP The message to be displayed
+.RE
+.PP
+
+.PP
+Definition at line \fB40\fP of file \fButils\&.cpp\fP\&.
.SS "std::string scientific_format (const std::vector< double > & v, int width = \fC20\fP, int prec = \fC10\fP)"
.PP
diff --git a/man_pages/man3/utils.hpp.3 b/man_pages/man3/utils.hpp.3
index 76556bd..a67beb7 100644
--- a/man_pages/man3/utils.hpp.3
+++ b/man_pages/man3/utils.hpp.3
@@ -1,4 +1,4 @@
-.TH "include/utils.hpp" 3 "Mon Oct 2 2023" "Penning Trap Simulation" \" -*- nroff -*-
+.TH "include/utils.hpp" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -7,14 +7,16 @@ include/utils.hpp \- Function prototypes and macros that are useful\&.
.SH SYNOPSIS
.br
.PP
-\fC#include \fP
-.br
-\fC#include \fP
+\fC#include \fP
.br
\fC#include \fP
.br
\fC#include \fP
.br
+\fC#include \fP
+.br
+\fC#include \fP
+.br
.SS "Macros"
@@ -23,6 +25,13 @@ include/utils.hpp \- Function prototypes and macros that are useful\&.
.RI "#define \fBDEBUG\fP(msg)"
.br
.RI "Writes a debug message\&. "
+.ti -1c
+.RI "#define \fBASSERT\fP(expr, msg)"
+.br
+.RI "A prettier assertion function\&. "
+.ti -1c
+.RI "#define \fB__METHOD_NAME__\fP methodName(__PRETTY_FUNCTION__)"
+.br
.in -1c
.SS "Functions"
@@ -35,6 +44,14 @@ include/utils.hpp \- Function prototypes and macros that are useful\&.
.RI "std::string \fBscientific_format\fP (const std::vector< double > &v, int width=20, int prec=10)"
.br
.RI "Turns a vector of doubles into a string written in scientific format\&. "
+.ti -1c
+.RI "void \fBm_assert\fP (bool expr, std::string expr_str, std::string func, std::string file, int line, std::string msg)"
+.br
+.RI "Test an expression, confirm that test is ok, or abort execution\&. "
+.ti -1c
+.RI "bool \fBarma_vector_close_to\fP (arma::vec &a, arma::vec &b, double tol=1e\-8)"
+.br
+.RI "Test if two armadillo vectors are close to each other\&. "
.in -1c
.SH "Detailed Description"
.PP
@@ -67,14 +84,74 @@ No known bugs
Definition in file \fButils\&.hpp\fP\&.
.SH "Macro Definition Documentation"
.PP
+.SS "#define __METHOD_NAME__ methodName(__PRETTY_FUNCTION__)"
+
+.PP
+Definition at line \fB48\fP of file \fButils\&.hpp\fP\&.
+.SS "#define ASSERT(expr, msg)"
+\fBValue:\fP.PP
+.nf
+ m_assert(expr, #expr, __METHOD_NAME__, __FILE__, \\
+ __LINE__, msg)
+.fi
+
+.PP
+A prettier assertion function\&. This macro calls the m_assert function which is a more informative assertion function than the regular assert function from cassert\&.
+.PP
+Definition at line \fB45\fP of file \fButils\&.hpp\fP\&.
.SS "#define DEBUG(msg)"
.PP
-Writes a debug message\&. This function writes a debug message that includes the filename, line number, and a custom message\&. The function is wrapped in an ifdef that checks if DBG is defined, so one can choose to display the debug messages by adding the -DDBG flag when compiling\&.
+Writes a debug message\&. This macro writes a debug message that includes the filename, line number, and a custom message\&. The function is wrapped in an ifdef that checks if DBG is defined, so one can choose to display the debug messages by adding the -DDBG flag when compiling\&.
.PP
-Definition at line \fB35\fP of file \fButils\&.hpp\fP\&.
+Definition at line \fB36\fP of file \fButils\&.hpp\fP\&.
.SH "Function Documentation"
.PP
+.SS "bool arma_vector_close_to (arma::vec & a, arma::vec & b, double tol = \fC1e\-8\fP)"
+
+.PP
+Test if two armadillo vectors are close to each other\&. This function takes in 2 vectors and checks if they are approximately equal to each other given a tolerance\&.
+.PP
+\fBParameters\fP
+.RS 4
+\fIa\fP Vector a
+.br
+\fIb\fP Vector b
+.br
+\fItol\fP The tolerance
+.RE
+.PP
+\fBReturns\fP
+.RS 4
+Boolean
+.RE
+.PP
+
+.PP
+Definition at line \fB59\fP of file \fButils\&.cpp\fP\&.
+.SS "void m_assert (bool expr, std::string expr_str, std::string func, std::string file, int line, std::string msg)"
+
+.PP
+Test an expression, confirm that test is ok, or abort execution\&. This function takes in an expression and prints an OK message if it's true, or it prints a fail message and aborts execution if it fails\&.
+.PP
+\fBParameters\fP
+.RS 4
+\fIexpr\fP The expression to be evaluated
+.br
+\fIexpr_str\fP The stringified version of the expression
+.br
+\fIfunc\fP The function name of the caller
+.br
+\fIfile\fP The file of the caller
+.br
+\fIline\fP The line number where this function is called from
+.br
+\fImsg\fP The message to be displayed
+.RE
+.PP
+
+.PP
+Definition at line \fB40\fP of file \fButils\&.cpp\fP\&.
.SS "std::string scientific_format (const std::vector< double > & v, int width = \fC20\fP, int prec = \fC10\fP)"
.PP