-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.c
More file actions
61 lines (54 loc) · 1.63 KB
/
main.c
File metadata and controls
61 lines (54 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include "matrix.h"
#include <stdio.h>
#include <stdlib.h>
#include "tests/convolution.c"
#include "tests/swap.c"
#include "tests/sum.c"
#include "tests/get.c"
#include "tests/multiply_escalar.c"
#include "tests/multiply_matrix.c"
#include "tests/multiply_point.c"
#include "tests/slice.c"
#include "tests/transpose.c"
int main(void) {
int choice = 0;
printf("Welcome to the linked matrix tester!\n\n");
do {
printf("\nThose are the option for testing the data structure:\n\n");
printf("1 - Get value based on the coordinates\n2 - Sum matrices\n3 - Multiply by escalar\n");
printf("4 - Multiply matrices\n5 - Multiply point-by-point\n6 - Swap\n7 - Slice\n8 - Transpose\n");
printf("9 - Convolution (keep in mind it also tests binary saving and reading)\n0 - Exit\n\n");
printf("Please enter your choice: ");
scanf("%d", &choice);
switch(choice) {
case 1:
get();
break;
case 2:
sum();
break;
case 3:
multEscalar();
break;
case 4:
multMatrix();
break;
case 5:
multPoint();
break;
case 6:
swap();
break;
case 7:
slice();
break;
case 8:
transpose();
break;
case 9:
convolution();
break;
}
} while (choice != 0);
return 0;
}