/* holes.c */ /************************************************************ * * * Permission is hereby granted to any individual or * * institution for use, copying, or redistribution of * * the xgobi code and associated documentation, provided * * that such code and documentation are not sold for * * profit and the following copyright notice is retained * * in the code and documentation: * * Copyright (c) 1990, ..., 1996 Bellcore * * * * We welcome your questions and comments, and request * * that you share any modifications with us. * * * * Deborah F. Swayne Dianne Cook * * dfs@research.att.com dicook@iastate.edu * * (973) 360-8423 www.public.iastate.edu/~dicook/ * * * * Andreas Buja * * andreas@research.att.com * * www.research.att.com/~andreas/ * * * ************************************************************/ #include #include "xincludes.h" #include "xgobitypes.h" #include "xgobivars.h" #include "xgobiexterns.h" #define ONEMINUSEXPMINUS1 0.63212056 static float *h0, *h1; static float acoefs; void alloc_holes(int n) { h0 = (float *) XtMalloc( (unsigned int) n*sizeof(float *)); h1 = (float *) XtMalloc( (unsigned int) n*sizeof(float *)); } void free_holes() { XtFree((XtPointer) h0); XtFree((XtPointer) h1); } float holes_index(float **proj_data, int n, int *rows_in_plot) { int i, m; /*float tmpf1; lint */ float indx_val; /*double sqrt(), exp();*/ /* Calculate coefficients */ for (i=0; i