summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-10-30 19:07:43 -0600
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-10-30 19:07:43 -0600
commit562ba9a9b6efd8cc27fc506f83b1125c2cfa4619 (patch)
treef801276f9332462084966ee731e2e90c0f180cb2 /inc
parent81979f09cf100db32deb0e1917dabb1fe435194c (diff)
downloadcmath-562ba9a9b6efd8cc27fc506f83b1125c2cfa4619.tar.gz
cmath-562ba9a9b6efd8cc27fc506f83b1125c2cfa4619.zip
hw 5
Diffstat (limited to 'inc')
-rw-r--r--inc/lizfcm.h8
-rw-r--r--inc/macros.h4
2 files changed, 9 insertions, 3 deletions
diff --git a/inc/lizfcm.h b/inc/lizfcm.h
index 12c1278..24b7fa9 100644
--- a/inc/lizfcm.h
+++ b/inc/lizfcm.h
@@ -25,6 +25,8 @@ extern double l2_distance(Array_double *v1, Array_double *v2);
extern double l1_distance(Array_double *v1, Array_double *v2);
extern double linf_distance(Array_double *v1, Array_double *v2);
extern Array_double *copy_vector(Array_double *v1);
+extern Array_double *add_element(Array_double *v, double x);
+extern Array_double *slice_element(Array_double *v, size_t x);
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);
@@ -33,11 +35,15 @@ extern Matrix_double *put_identity_diagonal(Matrix_double *m);
extern Matrix_double **lu_decomp(Matrix_double *m);
extern Array_double *bsubst(Matrix_double *u, Array_double *b);
extern Array_double *fsubst(Matrix_double *l, Array_double *b);
-extern Array_double *solve_matrix(Matrix_double *m, Array_double *b);
+extern Array_double *solve_matrix_lu_bsubst(Matrix_double *m, Array_double *b);
+extern Matrix_double *gaussian_elimination(Matrix_double *m);
+extern Array_double *solve_matrix_gaussian(Matrix_double *m, Array_double *b);
extern Array_double *m_dot_v(Matrix_double *m, Array_double *v);
extern Matrix_double *m_dot_m(Matrix_double *a, Matrix_double *b);
extern Array_double *col_v(Matrix_double *m, size_t x);
extern Matrix_double *copy_matrix(Matrix_double *m);
+extern Matrix_double *add_column(Matrix_double *m, Array_double *col);
+extern Matrix_double *slice_column(Matrix_double *m, size_t col);
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);
diff --git a/inc/macros.h b/inc/macros.h
index eab1b41..d081869 100644
--- a/inc/macros.h
+++ b/inc/macros.h
@@ -52,7 +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;
+#define true 1
+#define false 0
#endif // MACROS_H