summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-10-18 12:49:39 -0600
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-10-18 12:49:39 -0600
commit9e7166a52e94d8e15bf2dbfe00026f21f76630a9 (patch)
treebb4d7114d5f91fa128375347ab4249a4c35408f2 /inc
parent1b4d91e623a083690ac6554d1aeaa38b75469908 (diff)
downloadcmath-9e7166a52e94d8e15bf2dbfe00026f21f76630a9.tar.gz
cmath-9e7166a52e94d8e15bf2dbfe00026f21f76630a9.zip
oct 16, 18 notes. add unit tests with utest, and bisection root finding methods
Diffstat (limited to 'inc')
-rw-r--r--inc/lizfcm.h10
-rw-r--r--inc/macros.h3
2 files changed, 13 insertions, 0 deletions
diff --git a/inc/lizfcm.h b/inc/lizfcm.h
index b254732..b59651e 100644
--- a/inc/lizfcm.h
+++ b/inc/lizfcm.h
@@ -27,6 +27,7 @@ extern double linf_distance(Array_double *v1, Array_double *v2);
extern Array_double *copy_vector(Array_double *v1);
extern void free_vector(Array_double *v);
extern void format_vector_into(Array_double *v, char *s);
+extern int vector_equal(Array_double *a, Array_double *b);
extern Matrix_double *put_identity_diagonal(Matrix_double *m);
extern Matrix_double **lu_decomp(Matrix_double *m);
@@ -37,7 +38,16 @@ extern Array_double *m_dot_v(Matrix_double *m, Array_double *v);
extern Matrix_double *copy_matrix(Matrix_double *m);
extern void free_matrix(Matrix_double *m);
extern void format_matrix_into(Matrix_double *m, char *s);
+extern int matrix_equal(Matrix_double *a, Matrix_double *b);
extern Line *least_squares_lin_reg(Array_double *x, Array_double *y);
+extern double *find_ivt_range(double (*f)(double), double start_x, double delta,
+ size_t max_steps);
+extern double bisect_find_root(double (*f)(double), double a, double b,
+ double tolerance, size_t max_iterations);
+extern double bisect_find_root_with_error_assumption(double (*f)(double),
+ double a, double b,
+ double tolerance);
+
#endif // LIZFCM_H
diff --git a/inc/macros.h b/inc/macros.h
index f6e531e..eab1b41 100644
--- a/inc/macros.h
+++ b/inc/macros.h
@@ -52,4 +52,7 @@
#define c_max(x, y) (((x) >= (y)) ? (x) : (y))
#define c_min(x, y) (((x) <= (y)) ? (x) : (y))
+#define true 1;
+#define false 0;
+
#endif // MACROS_H