-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMatrixMutationApp.c
More file actions
63 lines (62 loc) · 1.73 KB
/
MatrixMutationApp.c
File metadata and controls
63 lines (62 loc) · 1.73 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
62
63
/*
* MatrixMutationApp.c
*
* Created on: Nov 15, 2015
* Author: Ying Zhou
*/
#include <stdio.h>
#include <stdlib.h>
#include "MatrixMutationApp.h"
/* This C file only deals with I/O.*/
void help()
{
fprintf(stderr,"TODO: Write help message");
/* Display help message*/
}
int main(int argc, char** argv)
{
int *bmatrix, *orientation, *index, *label;//, *ematrix, *index, ,*appended, *label;/* B matrix.*/
FILE* fp = NULL;
if (argc == 1) /* No nontrivial arguments*/
{
help();
return -1;/*Invalid input.*/
}
fp = fopen("/Users/tzefanYah_Yahuchanan/Public/Qovatzim/Academia/Research/Tochnit_1-Cluster_algebra_project/Mutation_Data/S5.txt","a");
orientation = (int*) malloc(6 * 6);
*orientation = 1;
*(orientation + 1) = 1;
*(orientation + 2) = 1;
*(orientation + 3) = 1;
*(orientation + 4) = -1;
//*(orientation + 5) = 1;
/* Do mutations there inside the file*/
bmatrix = VQToBMatrix(6, orientation, 15);
matrixPrint(fp, bmatrix, 6, 6);
//printMGS(fp, bmatrix, 6, 15, 100, 0);
index = (int*) malloc(4 * 4);
*index = 0;
*(index + 1) = 0;
*(index + 2) = 1;
*(index + 3) = 1;
label = cVectorLabel(index, 4, 2);
fclose(fp);
fprintf(stderr, "%d%d%d\n", *label, *(label + 1), *(label + 2));
printCVector(stderr, index, 3, 2);
//matrixPrint(stdout, bmatrix, 4, 4);
//fprintf(stdout,"Meow!\n\n");
//ematrix = produceFQEMatrix(bmatrix, 4);
/*mutate(bmatrix, 4, 4, 1);
fprintf(stdout,"Meow!\n\n");
matrixPrint(stdout, bmatrix, 4, 4);
mutate(bmatrix, 4, 4, 3);
fprintf(stdout,"Meow!\n\n");
matrixPrint(stdout, bmatrix, 4, 4);
mutate(bmatrix, 4, 4, 2);
fprintf(stdout,"Meow!\n\n");
matrixPrint(stdout, bmatrix, 4, 4);
mutate(bmatrix, 4, 4, 3);
fprintf(stdout,"Meow!\n\n");
matrixPrint(stdout, bmatrix, 4, 4);*/
return 0;
}