// Josiah Boning // // project.c // Main techlab executable #include "project.h" #include #include #include #include #include #define min(a,b) ((a)<(b))?(a):(b) #define max(a,b) ((a)>(b))?(a):(b) #define N 10000 #define ITEMS_PER_TRANS 1024 double xmin,ymin,xmax,ymax; double *datas=NULL; fftw_complex **trans; int numitems=0; int numtrans=0; int transsize=0; int win_wave, win_spec, win_allspec; double tmin, tmax; void display(void) { int k, n; /* do waveform window */ glutSetWindow(win_wave); glClear(GL_COLOR_BUFFER_BIT); glColor3f(1,1,1); glBegin(GL_LINES); glVertex3f(-1,0,0); glVertex3f(1,0,0); glVertex3f(0,-0.5,0); glVertex3f(0,0.5,0); glEnd(); glColor3f(0.0,0.0,1.0); glBegin(GL_LINE_STRIP); for (k=0;k tmax) { tmax = mag; } else if (mag < tmin) { tmin = mag; } } } printf("number of sample points: %i\n\n", numitems); //net* network = create_network(5, 5, 1); //double array[5]; //for (i=0; i < 5; i++) { // array[i] = 10; //} //process_inputs(network, array); //printf("%i %i\n", sizeof(neuron), sizeof(edge)); //net* network = create_network(20, 20 * 2, 1); //process_inputs(network, datas); //double out = get_output(network, 0); //printf("out: %f\n", out); double frac_var = variation(datas, numitems); printf("Variation method: %f\n\n", frac_var); double frac_anam = anam(datas, numitems); printf("ANAM method: %f\n\n", frac_anam); //showGraph(); fftw_free(datas); //fftw_free(trans); exit(0); }