# 1 "DTW.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "DTW.c"
# 31 "DTW.c"
# 1 "DTW.h" 1
# 28 "DTW.h"
# 1 "../fon/Spectrogram.h" 1
# 27 "../fon/Spectrogram.h"
# 1 "../fon/Matrix.h" 1
# 28 "../fon/Matrix.h"
# 1 "../fon/Sampled.h" 1
# 29 "../fon/Sampled.h"
# 1 "../fon/Function.h" 1
# 29 "../fon/Function.h"
# 1 "../sys/Data.h" 1
# 29 "../sys/Data.h"
# 1 "../sys/Thing.h" 1
# 34 "../sys/Thing.h"
# 1 "../sys/NUM.h" 1
# 48 "../sys/NUM.h"
# 1 "/usr/include/math.h" 1 3 4
# 28 "/usr/include/math.h" 3 4
# 1 "/usr/include/features.h" 1 3 4
# 323 "/usr/include/features.h" 3 4
# 1 "/usr/include/sys/cdefs.h" 1 3 4
# 313 "/usr/include/sys/cdefs.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 314 "/usr/include/sys/cdefs.h" 2 3 4
# 324 "/usr/include/features.h" 2 3 4
# 346 "/usr/include/features.h" 3 4
# 1 "/usr/include/gnu/stubs.h" 1 3 4



# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 5 "/usr/include/gnu/stubs.h" 2 3 4


# 1 "/usr/include/gnu/stubs-32.h" 1 3 4
# 8 "/usr/include/gnu/stubs.h" 2 3 4
# 347 "/usr/include/features.h" 2 3 4
# 29 "/usr/include/math.h" 2 3 4





# 1 "/usr/include/bits/huge_val.h" 1 3 4
# 35 "/usr/include/math.h" 2 3 4
# 47 "/usr/include/math.h" 3 4
# 1 "/usr/include/bits/mathdef.h" 1 3 4
# 48 "/usr/include/math.h" 2 3 4
# 71 "/usr/include/math.h" 3 4
# 1 "/usr/include/bits/mathcalls.h" 1 3 4
# 53 "/usr/include/bits/mathcalls.h" 3 4


extern double acos (double __x) __attribute__ ((__nothrow__)); extern double __acos (double __x) __attribute__ ((__nothrow__));

extern double asin (double __x) __attribute__ ((__nothrow__)); extern double __asin (double __x) __attribute__ ((__nothrow__));

extern double atan (double __x) __attribute__ ((__nothrow__)); extern double __atan (double __x) __attribute__ ((__nothrow__));

extern double atan2 (double __y, double __x) __attribute__ ((__nothrow__)); extern double __atan2 (double __y, double __x) __attribute__ ((__nothrow__));


extern double cos (double __x) __attribute__ ((__nothrow__)); extern double __cos (double __x) __attribute__ ((__nothrow__));

extern double sin (double __x) __attribute__ ((__nothrow__)); extern double __sin (double __x) __attribute__ ((__nothrow__));

extern double tan (double __x) __attribute__ ((__nothrow__)); extern double __tan (double __x) __attribute__ ((__nothrow__));




extern double cosh (double __x) __attribute__ ((__nothrow__)); extern double __cosh (double __x) __attribute__ ((__nothrow__));

extern double sinh (double __x) __attribute__ ((__nothrow__)); extern double __sinh (double __x) __attribute__ ((__nothrow__));

extern double tanh (double __x) __attribute__ ((__nothrow__)); extern double __tanh (double __x) __attribute__ ((__nothrow__));

# 87 "/usr/include/bits/mathcalls.h" 3 4


extern double acosh (double __x) __attribute__ ((__nothrow__)); extern double __acosh (double __x) __attribute__ ((__nothrow__));

extern double asinh (double __x) __attribute__ ((__nothrow__)); extern double __asinh (double __x) __attribute__ ((__nothrow__));

extern double atanh (double __x) __attribute__ ((__nothrow__)); extern double __atanh (double __x) __attribute__ ((__nothrow__));







extern double exp (double __x) __attribute__ ((__nothrow__)); extern double __exp (double __x) __attribute__ ((__nothrow__));


extern double frexp (double __x, int *__exponent) __attribute__ ((__nothrow__)); extern double __frexp (double __x, int *__exponent) __attribute__ ((__nothrow__));


extern double ldexp (double __x, int __exponent) __attribute__ ((__nothrow__)); extern double __ldexp (double __x, int __exponent) __attribute__ ((__nothrow__));


extern double log (double __x) __attribute__ ((__nothrow__)); extern double __log (double __x) __attribute__ ((__nothrow__));


extern double log10 (double __x) __attribute__ ((__nothrow__)); extern double __log10 (double __x) __attribute__ ((__nothrow__));


extern double modf (double __x, double *__iptr) __attribute__ ((__nothrow__)); extern double __modf (double __x, double *__iptr) __attribute__ ((__nothrow__));

# 127 "/usr/include/bits/mathcalls.h" 3 4


extern double expm1 (double __x) __attribute__ ((__nothrow__)); extern double __expm1 (double __x) __attribute__ ((__nothrow__));


extern double log1p (double __x) __attribute__ ((__nothrow__)); extern double __log1p (double __x) __attribute__ ((__nothrow__));


extern double logb (double __x) __attribute__ ((__nothrow__)); extern double __logb (double __x) __attribute__ ((__nothrow__));

# 152 "/usr/include/bits/mathcalls.h" 3 4


extern double pow (double __x, double __y) __attribute__ ((__nothrow__)); extern double __pow (double __x, double __y) __attribute__ ((__nothrow__));


extern double sqrt (double __x) __attribute__ ((__nothrow__)); extern double __sqrt (double __x) __attribute__ ((__nothrow__));





extern double hypot (double __x, double __y) __attribute__ ((__nothrow__)); extern double __hypot (double __x, double __y) __attribute__ ((__nothrow__));






extern double cbrt (double __x) __attribute__ ((__nothrow__)); extern double __cbrt (double __x) __attribute__ ((__nothrow__));








extern double ceil (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __ceil (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern double fabs (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __fabs (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern double floor (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __floor (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern double fmod (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fmod (double __x, double __y) __attribute__ ((__nothrow__));




extern int __isinf (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern int __finite (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));





extern int isinf (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern int finite (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern double drem (double __x, double __y) __attribute__ ((__nothrow__)); extern double __drem (double __x, double __y) __attribute__ ((__nothrow__));



extern double significand (double __x) __attribute__ ((__nothrow__)); extern double __significand (double __x) __attribute__ ((__nothrow__));





extern double copysign (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __copysign (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));

# 231 "/usr/include/bits/mathcalls.h" 3 4
extern int __isnan (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));



extern int isnan (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern double j0 (double) __attribute__ ((__nothrow__)); extern double __j0 (double) __attribute__ ((__nothrow__));
extern double j1 (double) __attribute__ ((__nothrow__)); extern double __j1 (double) __attribute__ ((__nothrow__));
extern double jn (int, double) __attribute__ ((__nothrow__)); extern double __jn (int, double) __attribute__ ((__nothrow__));
extern double y0 (double) __attribute__ ((__nothrow__)); extern double __y0 (double) __attribute__ ((__nothrow__));
extern double y1 (double) __attribute__ ((__nothrow__)); extern double __y1 (double) __attribute__ ((__nothrow__));
extern double yn (int, double) __attribute__ ((__nothrow__)); extern double __yn (int, double) __attribute__ ((__nothrow__));






extern double erf (double) __attribute__ ((__nothrow__)); extern double __erf (double) __attribute__ ((__nothrow__));
extern double erfc (double) __attribute__ ((__nothrow__)); extern double __erfc (double) __attribute__ ((__nothrow__));
extern double lgamma (double) __attribute__ ((__nothrow__)); extern double __lgamma (double) __attribute__ ((__nothrow__));

# 265 "/usr/include/bits/mathcalls.h" 3 4
extern double gamma (double) __attribute__ ((__nothrow__)); extern double __gamma (double) __attribute__ ((__nothrow__));






extern double lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__)); extern double __lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__));







extern double rint (double __x) __attribute__ ((__nothrow__)); extern double __rint (double __x) __attribute__ ((__nothrow__));


extern double nextafter (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));





extern double remainder (double __x, double __y) __attribute__ ((__nothrow__)); extern double __remainder (double __x, double __y) __attribute__ ((__nothrow__));



extern double scalbn (double __x, int __n) __attribute__ ((__nothrow__)); extern double __scalbn (double __x, int __n) __attribute__ ((__nothrow__));



extern int ilogb (double __x) __attribute__ ((__nothrow__)); extern int __ilogb (double __x) __attribute__ ((__nothrow__));
# 359 "/usr/include/bits/mathcalls.h" 3 4





extern double scalb (double __x, double __n) __attribute__ ((__nothrow__)); extern double __scalb (double __x, double __n) __attribute__ ((__nothrow__));
# 72 "/usr/include/math.h" 2 3 4
# 94 "/usr/include/math.h" 3 4
# 1 "/usr/include/bits/mathcalls.h" 1 3 4
# 53 "/usr/include/bits/mathcalls.h" 3 4


extern float acosf (float __x) __attribute__ ((__nothrow__)); extern float __acosf (float __x) __attribute__ ((__nothrow__));

extern float asinf (float __x) __attribute__ ((__nothrow__)); extern float __asinf (float __x) __attribute__ ((__nothrow__));

extern float atanf (float __x) __attribute__ ((__nothrow__)); extern float __atanf (float __x) __attribute__ ((__nothrow__));

extern float atan2f (float __y, float __x) __attribute__ ((__nothrow__)); extern float __atan2f (float __y, float __x) __attribute__ ((__nothrow__));


extern float cosf (float __x) __attribute__ ((__nothrow__)); extern float __cosf (float __x) __attribute__ ((__nothrow__));

extern float sinf (float __x) __attribute__ ((__nothrow__)); extern float __sinf (float __x) __attribute__ ((__nothrow__));

extern float tanf (float __x) __attribute__ ((__nothrow__)); extern float __tanf (float __x) __attribute__ ((__nothrow__));




extern float coshf (float __x) __attribute__ ((__nothrow__)); extern float __coshf (float __x) __attribute__ ((__nothrow__));

extern float sinhf (float __x) __attribute__ ((__nothrow__)); extern float __sinhf (float __x) __attribute__ ((__nothrow__));

extern float tanhf (float __x) __attribute__ ((__nothrow__)); extern float __tanhf (float __x) __attribute__ ((__nothrow__));

# 87 "/usr/include/bits/mathcalls.h" 3 4


extern float acoshf (float __x) __attribute__ ((__nothrow__)); extern float __acoshf (float __x) __attribute__ ((__nothrow__));

extern float asinhf (float __x) __attribute__ ((__nothrow__)); extern float __asinhf (float __x) __attribute__ ((__nothrow__));

extern float atanhf (float __x) __attribute__ ((__nothrow__)); extern float __atanhf (float __x) __attribute__ ((__nothrow__));







extern float expf (float __x) __attribute__ ((__nothrow__)); extern float __expf (float __x) __attribute__ ((__nothrow__));


extern float frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__)); extern float __frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__));


extern float ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__)); extern float __ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__));


extern float logf (float __x) __attribute__ ((__nothrow__)); extern float __logf (float __x) __attribute__ ((__nothrow__));


extern float log10f (float __x) __attribute__ ((__nothrow__)); extern float __log10f (float __x) __attribute__ ((__nothrow__));


extern float modff (float __x, float *__iptr) __attribute__ ((__nothrow__)); extern float __modff (float __x, float *__iptr) __attribute__ ((__nothrow__));

# 127 "/usr/include/bits/mathcalls.h" 3 4


extern float expm1f (float __x) __attribute__ ((__nothrow__)); extern float __expm1f (float __x) __attribute__ ((__nothrow__));


extern float log1pf (float __x) __attribute__ ((__nothrow__)); extern float __log1pf (float __x) __attribute__ ((__nothrow__));


extern float logbf (float __x) __attribute__ ((__nothrow__)); extern float __logbf (float __x) __attribute__ ((__nothrow__));

# 152 "/usr/include/bits/mathcalls.h" 3 4


extern float powf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __powf (float __x, float __y) __attribute__ ((__nothrow__));


extern float sqrtf (float __x) __attribute__ ((__nothrow__)); extern float __sqrtf (float __x) __attribute__ ((__nothrow__));





extern float hypotf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __hypotf (float __x, float __y) __attribute__ ((__nothrow__));






extern float cbrtf (float __x) __attribute__ ((__nothrow__)); extern float __cbrtf (float __x) __attribute__ ((__nothrow__));








extern float ceilf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __ceilf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern float fabsf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __fabsf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern float floorf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __floorf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern float fmodf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fmodf (float __x, float __y) __attribute__ ((__nothrow__));




extern int __isinff (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern int __finitef (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));





extern int isinff (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern int finitef (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern float dremf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __dremf (float __x, float __y) __attribute__ ((__nothrow__));



extern float significandf (float __x) __attribute__ ((__nothrow__)); extern float __significandf (float __x) __attribute__ ((__nothrow__));





extern float copysignf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));

# 231 "/usr/include/bits/mathcalls.h" 3 4
extern int __isnanf (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));



extern int isnanf (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern float j0f (float) __attribute__ ((__nothrow__)); extern float __j0f (float) __attribute__ ((__nothrow__));
extern float j1f (float) __attribute__ ((__nothrow__)); extern float __j1f (float) __attribute__ ((__nothrow__));
extern float jnf (int, float) __attribute__ ((__nothrow__)); extern float __jnf (int, float) __attribute__ ((__nothrow__));
extern float y0f (float) __attribute__ ((__nothrow__)); extern float __y0f (float) __attribute__ ((__nothrow__));
extern float y1f (float) __attribute__ ((__nothrow__)); extern float __y1f (float) __attribute__ ((__nothrow__));
extern float ynf (int, float) __attribute__ ((__nothrow__)); extern float __ynf (int, float) __attribute__ ((__nothrow__));






extern float erff (float) __attribute__ ((__nothrow__)); extern float __erff (float) __attribute__ ((__nothrow__));
extern float erfcf (float) __attribute__ ((__nothrow__)); extern float __erfcf (float) __attribute__ ((__nothrow__));
extern float lgammaf (float) __attribute__ ((__nothrow__)); extern float __lgammaf (float) __attribute__ ((__nothrow__));

# 265 "/usr/include/bits/mathcalls.h" 3 4
extern float gammaf (float) __attribute__ ((__nothrow__)); extern float __gammaf (float) __attribute__ ((__nothrow__));






extern float lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__)); extern float __lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__));







extern float rintf (float __x) __attribute__ ((__nothrow__)); extern float __rintf (float __x) __attribute__ ((__nothrow__));


extern float nextafterf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));





extern float remainderf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __remainderf (float __x, float __y) __attribute__ ((__nothrow__));



extern float scalbnf (float __x, int __n) __attribute__ ((__nothrow__)); extern float __scalbnf (float __x, int __n) __attribute__ ((__nothrow__));



extern int ilogbf (float __x) __attribute__ ((__nothrow__)); extern int __ilogbf (float __x) __attribute__ ((__nothrow__));
# 359 "/usr/include/bits/mathcalls.h" 3 4





extern float scalbf (float __x, float __n) __attribute__ ((__nothrow__)); extern float __scalbf (float __x, float __n) __attribute__ ((__nothrow__));
# 95 "/usr/include/math.h" 2 3 4
# 141 "/usr/include/math.h" 3 4
# 1 "/usr/include/bits/mathcalls.h" 1 3 4
# 53 "/usr/include/bits/mathcalls.h" 3 4


extern long double acosl (long double __x) __attribute__ ((__nothrow__)); extern long double __acosl (long double __x) __attribute__ ((__nothrow__));

extern long double asinl (long double __x) __attribute__ ((__nothrow__)); extern long double __asinl (long double __x) __attribute__ ((__nothrow__));

extern long double atanl (long double __x) __attribute__ ((__nothrow__)); extern long double __atanl (long double __x) __attribute__ ((__nothrow__));

extern long double atan2l (long double __y, long double __x) __attribute__ ((__nothrow__)); extern long double __atan2l (long double __y, long double __x) __attribute__ ((__nothrow__));


extern long double cosl (long double __x) __attribute__ ((__nothrow__)); extern long double __cosl (long double __x) __attribute__ ((__nothrow__));

extern long double sinl (long double __x) __attribute__ ((__nothrow__)); extern long double __sinl (long double __x) __attribute__ ((__nothrow__));

extern long double tanl (long double __x) __attribute__ ((__nothrow__)); extern long double __tanl (long double __x) __attribute__ ((__nothrow__));




extern long double coshl (long double __x) __attribute__ ((__nothrow__)); extern long double __coshl (long double __x) __attribute__ ((__nothrow__));

extern long double sinhl (long double __x) __attribute__ ((__nothrow__)); extern long double __sinhl (long double __x) __attribute__ ((__nothrow__));

extern long double tanhl (long double __x) __attribute__ ((__nothrow__)); extern long double __tanhl (long double __x) __attribute__ ((__nothrow__));

# 87 "/usr/include/bits/mathcalls.h" 3 4


extern long double acoshl (long double __x) __attribute__ ((__nothrow__)); extern long double __acoshl (long double __x) __attribute__ ((__nothrow__));

extern long double asinhl (long double __x) __attribute__ ((__nothrow__)); extern long double __asinhl (long double __x) __attribute__ ((__nothrow__));

extern long double atanhl (long double __x) __attribute__ ((__nothrow__)); extern long double __atanhl (long double __x) __attribute__ ((__nothrow__));







extern long double expl (long double __x) __attribute__ ((__nothrow__)); extern long double __expl (long double __x) __attribute__ ((__nothrow__));


extern long double frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__)); extern long double __frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__));


extern long double ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__)); extern long double __ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__));


extern long double logl (long double __x) __attribute__ ((__nothrow__)); extern long double __logl (long double __x) __attribute__ ((__nothrow__));


extern long double log10l (long double __x) __attribute__ ((__nothrow__)); extern long double __log10l (long double __x) __attribute__ ((__nothrow__));


extern long double modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__)); extern long double __modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__));

# 127 "/usr/include/bits/mathcalls.h" 3 4


extern long double expm1l (long double __x) __attribute__ ((__nothrow__)); extern long double __expm1l (long double __x) __attribute__ ((__nothrow__));


extern long double log1pl (long double __x) __attribute__ ((__nothrow__)); extern long double __log1pl (long double __x) __attribute__ ((__nothrow__));


extern long double logbl (long double __x) __attribute__ ((__nothrow__)); extern long double __logbl (long double __x) __attribute__ ((__nothrow__));

# 152 "/usr/include/bits/mathcalls.h" 3 4


extern long double powl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __powl (long double __x, long double __y) __attribute__ ((__nothrow__));


extern long double sqrtl (long double __x) __attribute__ ((__nothrow__)); extern long double __sqrtl (long double __x) __attribute__ ((__nothrow__));





extern long double hypotl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __hypotl (long double __x, long double __y) __attribute__ ((__nothrow__));






extern long double cbrtl (long double __x) __attribute__ ((__nothrow__)); extern long double __cbrtl (long double __x) __attribute__ ((__nothrow__));








extern long double ceill (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __ceill (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern long double fabsl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __fabsl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern long double floorl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __floorl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern long double fmodl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __fmodl (long double __x, long double __y) __attribute__ ((__nothrow__));




extern int __isinfl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern int __finitel (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));





extern int isinfl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern int finitel (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern long double dreml (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __dreml (long double __x, long double __y) __attribute__ ((__nothrow__));



extern long double significandl (long double __x) __attribute__ ((__nothrow__)); extern long double __significandl (long double __x) __attribute__ ((__nothrow__));





extern long double copysignl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));

# 231 "/usr/include/bits/mathcalls.h" 3 4
extern int __isnanl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));



extern int isnanl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern long double j0l (long double) __attribute__ ((__nothrow__)); extern long double __j0l (long double) __attribute__ ((__nothrow__));
extern long double j1l (long double) __attribute__ ((__nothrow__)); extern long double __j1l (long double) __attribute__ ((__nothrow__));
extern long double jnl (int, long double) __attribute__ ((__nothrow__)); extern long double __jnl (int, long double) __attribute__ ((__nothrow__));
extern long double y0l (long double) __attribute__ ((__nothrow__)); extern long double __y0l (long double) __attribute__ ((__nothrow__));
extern long double y1l (long double) __attribute__ ((__nothrow__)); extern long double __y1l (long double) __attribute__ ((__nothrow__));
extern long double ynl (int, long double) __attribute__ ((__nothrow__)); extern long double __ynl (int, long double) __attribute__ ((__nothrow__));






extern long double erfl (long double) __attribute__ ((__nothrow__)); extern long double __erfl (long double) __attribute__ ((__nothrow__));
extern long double erfcl (long double) __attribute__ ((__nothrow__)); extern long double __erfcl (long double) __attribute__ ((__nothrow__));
extern long double lgammal (long double) __attribute__ ((__nothrow__)); extern long double __lgammal (long double) __attribute__ ((__nothrow__));

# 265 "/usr/include/bits/mathcalls.h" 3 4
extern long double gammal (long double) __attribute__ ((__nothrow__)); extern long double __gammal (long double) __attribute__ ((__nothrow__));






extern long double lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__)); extern long double __lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__));







extern long double rintl (long double __x) __attribute__ ((__nothrow__)); extern long double __rintl (long double __x) __attribute__ ((__nothrow__));


extern long double nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));





extern long double remainderl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __remainderl (long double __x, long double __y) __attribute__ ((__nothrow__));



extern long double scalbnl (long double __x, int __n) __attribute__ ((__nothrow__)); extern long double __scalbnl (long double __x, int __n) __attribute__ ((__nothrow__));



extern int ilogbl (long double __x) __attribute__ ((__nothrow__)); extern int __ilogbl (long double __x) __attribute__ ((__nothrow__));
# 359 "/usr/include/bits/mathcalls.h" 3 4





extern long double scalbl (long double __x, long double __n) __attribute__ ((__nothrow__)); extern long double __scalbl (long double __x, long double __n) __attribute__ ((__nothrow__));
# 142 "/usr/include/math.h" 2 3 4
# 157 "/usr/include/math.h" 3 4
extern int signgam;
# 284 "/usr/include/math.h" 3 4
typedef enum
{
  _IEEE_ = -1,
  _SVID_,
  _XOPEN_,
  _POSIX_,
  _ISOC_
} _LIB_VERSION_TYPE;




extern _LIB_VERSION_TYPE _LIB_VERSION;
# 309 "/usr/include/math.h" 3 4
struct exception

  {
    int type;
    char *name;
    double arg1;
    double arg2;
    double retval;
  };




extern int matherr (struct exception *__exc);
# 465 "/usr/include/math.h" 3 4

# 49 "../sys/NUM.h" 2
# 57 "../sys/NUM.h"
# 1 "/usr/include/stdio.h" 1 3 4
# 30 "/usr/include/stdio.h" 3 4




# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 214 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 3 4
typedef unsigned int size_t;
# 35 "/usr/include/stdio.h" 2 3 4

# 1 "/usr/include/bits/types.h" 1 3 4
# 28 "/usr/include/bits/types.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 29 "/usr/include/bits/types.h" 2 3 4


# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 32 "/usr/include/bits/types.h" 2 3 4


typedef unsigned char __u_char;
typedef unsigned short int __u_short;
typedef unsigned int __u_int;
typedef unsigned long int __u_long;


typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;




__extension__ typedef signed long long int __int64_t;
__extension__ typedef unsigned long long int __uint64_t;







__extension__ typedef long long int __quad_t;
__extension__ typedef unsigned long long int __u_quad_t;
# 134 "/usr/include/bits/types.h" 3 4
# 1 "/usr/include/bits/typesizes.h" 1 3 4
# 135 "/usr/include/bits/types.h" 2 3 4


__extension__ typedef __u_quad_t __dev_t;
__extension__ typedef unsigned int __uid_t;
__extension__ typedef unsigned int __gid_t;
__extension__ typedef unsigned long int __ino_t;
__extension__ typedef __u_quad_t __ino64_t;
__extension__ typedef unsigned int __mode_t;
__extension__ typedef unsigned int __nlink_t;
__extension__ typedef long int __off_t;
__extension__ typedef __quad_t __off64_t;
__extension__ typedef int __pid_t;
__extension__ typedef struct { int __val[2]; } __fsid_t;
__extension__ typedef long int __clock_t;
__extension__ typedef unsigned long int __rlim_t;
__extension__ typedef __u_quad_t __rlim64_t;
__extension__ typedef unsigned int __id_t;
__extension__ typedef long int __time_t;
__extension__ typedef unsigned int __useconds_t;
__extension__ typedef long int __suseconds_t;

__extension__ typedef int __daddr_t;
__extension__ typedef long int __swblk_t;
__extension__ typedef int __key_t;


__extension__ typedef int __clockid_t;


__extension__ typedef void * __timer_t;


__extension__ typedef long int __blksize_t;




__extension__ typedef long int __blkcnt_t;
__extension__ typedef __quad_t __blkcnt64_t;


__extension__ typedef unsigned long int __fsblkcnt_t;
__extension__ typedef __u_quad_t __fsblkcnt64_t;


__extension__ typedef unsigned long int __fsfilcnt_t;
__extension__ typedef __u_quad_t __fsfilcnt64_t;

__extension__ typedef int __ssize_t;



typedef __off64_t __loff_t;
typedef __quad_t *__qaddr_t;
typedef char *__caddr_t;


__extension__ typedef int __intptr_t;


__extension__ typedef unsigned int __socklen_t;
# 37 "/usr/include/stdio.h" 2 3 4









typedef struct _IO_FILE FILE;





# 62 "/usr/include/stdio.h" 3 4
typedef struct _IO_FILE __FILE;
# 72 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/libio.h" 1 3 4
# 32 "/usr/include/libio.h" 3 4
# 1 "/usr/include/_G_config.h" 1 3 4
# 14 "/usr/include/_G_config.h" 3 4
# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 326 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 3 4
typedef int wchar_t;
# 355 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 3 4
typedef unsigned int wint_t;
# 15 "/usr/include/_G_config.h" 2 3 4
# 24 "/usr/include/_G_config.h" 3 4
# 1 "/usr/include/wchar.h" 1 3 4
# 48 "/usr/include/wchar.h" 3 4
# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 49 "/usr/include/wchar.h" 2 3 4

# 1 "/usr/include/bits/wchar.h" 1 3 4
# 51 "/usr/include/wchar.h" 2 3 4
# 76 "/usr/include/wchar.h" 3 4
typedef struct
{
  int __count;
  union
  {
    wint_t __wch;
    char __wchb[4];
  } __value;
} __mbstate_t;
# 25 "/usr/include/_G_config.h" 2 3 4

typedef struct
{
  __off_t __pos;
  __mbstate_t __state;
} _G_fpos_t;
typedef struct
{
  __off64_t __pos;
  __mbstate_t __state;
} _G_fpos64_t;
# 44 "/usr/include/_G_config.h" 3 4
# 1 "/usr/include/gconv.h" 1 3 4
# 28 "/usr/include/gconv.h" 3 4
# 1 "/usr/include/wchar.h" 1 3 4
# 48 "/usr/include/wchar.h" 3 4
# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 49 "/usr/include/wchar.h" 2 3 4
# 29 "/usr/include/gconv.h" 2 3 4


# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 32 "/usr/include/gconv.h" 2 3 4





enum
{
  __GCONV_OK = 0,
  __GCONV_NOCONV,
  __GCONV_NODB,
  __GCONV_NOMEM,

  __GCONV_EMPTY_INPUT,
  __GCONV_FULL_OUTPUT,
  __GCONV_ILLEGAL_INPUT,
  __GCONV_INCOMPLETE_INPUT,

  __GCONV_ILLEGAL_DESCRIPTOR,
  __GCONV_INTERNAL_ERROR
};



enum
{
  __GCONV_IS_LAST = 0x0001,
  __GCONV_IGNORE_ERRORS = 0x0002
};



struct __gconv_step;
struct __gconv_step_data;
struct __gconv_loaded_object;
struct __gconv_trans_data;



typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *,
       __const unsigned char **, __const unsigned char *,
       unsigned char **, size_t *, int, int);


typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char);


typedef int (*__gconv_init_fct) (struct __gconv_step *);
typedef void (*__gconv_end_fct) (struct __gconv_step *);



typedef int (*__gconv_trans_fct) (struct __gconv_step *,
      struct __gconv_step_data *, void *,
      __const unsigned char *,
      __const unsigned char **,
      __const unsigned char *, unsigned char **,
      size_t *);


typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *,
       __const unsigned char *,
       unsigned char *, unsigned char *);


typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***,
     size_t *);


typedef int (*__gconv_trans_init_fct) (void **, const char *);
typedef void (*__gconv_trans_end_fct) (void *);

struct __gconv_trans_data
{

  __gconv_trans_fct __trans_fct;
  __gconv_trans_context_fct __trans_context_fct;
  __gconv_trans_end_fct __trans_end_fct;
  void *__data;
  struct __gconv_trans_data *__next;
};



struct __gconv_step
{
  struct __gconv_loaded_object *__shlib_handle;
  __const char *__modname;

  int __counter;

  char *__from_name;
  char *__to_name;

  __gconv_fct __fct;
  __gconv_btowc_fct __btowc_fct;
  __gconv_init_fct __init_fct;
  __gconv_end_fct __end_fct;



  int __min_needed_from;
  int __max_needed_from;
  int __min_needed_to;
  int __max_needed_to;


  int __stateful;

  void *__data;
};



struct __gconv_step_data
{
  unsigned char *__outbuf;
  unsigned char *__outbufend;



  int __flags;



  int __invocation_counter;



  int __internal_use;

  __mbstate_t *__statep;
  __mbstate_t __state;



  struct __gconv_trans_data *__trans;
};



typedef struct __gconv_info
{
  size_t __nsteps;
  struct __gconv_step *__steps;
  __extension__ struct __gconv_step_data __data [];
} *__gconv_t;
# 45 "/usr/include/_G_config.h" 2 3 4
typedef union
{
  struct __gconv_info __cd;
  struct
  {
    struct __gconv_info __cd;
    struct __gconv_step_data __data;
  } __combined;
} _G_iconv_t;

typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
# 33 "/usr/include/libio.h" 2 3 4
# 53 "/usr/include/libio.h" 3 4
# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stdarg.h" 1 3 4
# 43 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stdarg.h" 3 4
typedef __builtin_va_list __gnuc_va_list;
# 54 "/usr/include/libio.h" 2 3 4
# 166 "/usr/include/libio.h" 3 4
struct _IO_jump_t; struct _IO_FILE;
# 176 "/usr/include/libio.h" 3 4
typedef void _IO_lock_t;





struct _IO_marker {
  struct _IO_marker *_next;
  struct _IO_FILE *_sbuf;



  int _pos;
# 199 "/usr/include/libio.h" 3 4
};


enum __codecvt_result
{
  __codecvt_ok,
  __codecvt_partial,
  __codecvt_error,
  __codecvt_noconv
};
# 267 "/usr/include/libio.h" 3 4
struct _IO_FILE {
  int _flags;




  char* _IO_read_ptr;
  char* _IO_read_end;
  char* _IO_read_base;
  char* _IO_write_base;
  char* _IO_write_ptr;
  char* _IO_write_end;
  char* _IO_buf_base;
  char* _IO_buf_end;

  char *_IO_save_base;
  char *_IO_backup_base;
  char *_IO_save_end;

  struct _IO_marker *_markers;

  struct _IO_FILE *_chain;

  int _fileno;



  int _flags2;

  __off_t _old_offset;



  unsigned short _cur_column;
  signed char _vtable_offset;
  char _shortbuf[1];



  _IO_lock_t *_lock;
# 315 "/usr/include/libio.h" 3 4
  __off64_t _offset;
# 324 "/usr/include/libio.h" 3 4
  void *__pad1;
  void *__pad2;
  void *__pad3;
  void *__pad4;
  size_t __pad5;

  int _mode;

  char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];

};


typedef struct _IO_FILE _IO_FILE;


struct _IO_FILE_plus;

extern struct _IO_FILE_plus _IO_2_1_stdin_;
extern struct _IO_FILE_plus _IO_2_1_stdout_;
extern struct _IO_FILE_plus _IO_2_1_stderr_;
# 360 "/usr/include/libio.h" 3 4
typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);







typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
     size_t __n);







typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);


typedef int __io_close_fn (void *__cookie);
# 412 "/usr/include/libio.h" 3 4
extern int __underflow (_IO_FILE *) __attribute__ ((__nothrow__));
extern int __uflow (_IO_FILE *) __attribute__ ((__nothrow__));
extern int __overflow (_IO_FILE *, int) __attribute__ ((__nothrow__));
extern wint_t __wunderflow (_IO_FILE *) __attribute__ ((__nothrow__));
extern wint_t __wuflow (_IO_FILE *) __attribute__ ((__nothrow__));
extern wint_t __woverflow (_IO_FILE *, wint_t) __attribute__ ((__nothrow__));
# 450 "/usr/include/libio.h" 3 4
extern int _IO_getc (_IO_FILE *__fp) __attribute__ ((__nothrow__));
extern int _IO_putc (int __c, _IO_FILE *__fp) __attribute__ ((__nothrow__));
extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__));
extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__));

extern int _IO_peekc_locked (_IO_FILE *__fp) __attribute__ ((__nothrow__));





extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__));
extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__));
extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__));
# 480 "/usr/include/libio.h" 3 4
extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
   __gnuc_va_list, int *__restrict);
extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
    __gnuc_va_list);
extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t) __attribute__ ((__nothrow__));
extern size_t _IO_sgetn (_IO_FILE *, void *, size_t) __attribute__ ((__nothrow__));

extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int) __attribute__ ((__nothrow__));
extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int) __attribute__ ((__nothrow__));

extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__));
# 73 "/usr/include/stdio.h" 2 3 4
# 86 "/usr/include/stdio.h" 3 4


typedef _G_fpos_t fpos_t;




# 138 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/bits/stdio_lim.h" 1 3 4
# 139 "/usr/include/stdio.h" 2 3 4



extern struct _IO_FILE *stdin;
extern struct _IO_FILE *stdout;
extern struct _IO_FILE *stderr;







extern int remove (__const char *__filename) __attribute__ ((__nothrow__));

extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__));














extern FILE *tmpfile (void);
# 183 "/usr/include/stdio.h" 3 4
extern char *tmpnam (char *__s) __attribute__ ((__nothrow__));





extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__));
# 201 "/usr/include/stdio.h" 3 4
extern char *tempnam (__const char *__dir, __const char *__pfx)
     __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));








extern int fclose (FILE *__stream);




extern int fflush (FILE *__stream);

# 226 "/usr/include/stdio.h" 3 4
extern int fflush_unlocked (FILE *__stream);
# 240 "/usr/include/stdio.h" 3 4






extern FILE *fopen (__const char *__restrict __filename,
      __const char *__restrict __modes);




extern FILE *freopen (__const char *__restrict __filename,
        __const char *__restrict __modes,
        FILE *__restrict __stream);
# 267 "/usr/include/stdio.h" 3 4

# 278 "/usr/include/stdio.h" 3 4
extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__));
# 298 "/usr/include/stdio.h" 3 4



extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__));



extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
      int __modes, size_t __n) __attribute__ ((__nothrow__));





extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
         size_t __size) __attribute__ ((__nothrow__));


extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__));








extern int fprintf (FILE *__restrict __stream,
      __const char *__restrict __format, ...);




extern int printf (__const char *__restrict __format, ...);

extern int sprintf (char *__restrict __s,
      __const char *__restrict __format, ...) __attribute__ ((__nothrow__));





extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
       __gnuc_va_list __arg);




extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);

extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
       __gnuc_va_list __arg) __attribute__ ((__nothrow__));





extern int snprintf (char *__restrict __s, size_t __maxlen,
       __const char *__restrict __format, ...)
     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));

extern int vsnprintf (char *__restrict __s, size_t __maxlen,
        __const char *__restrict __format, __gnuc_va_list __arg)
     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));

# 392 "/usr/include/stdio.h" 3 4





extern int fscanf (FILE *__restrict __stream,
     __const char *__restrict __format, ...) ;




extern int scanf (__const char *__restrict __format, ...) ;

extern int sscanf (__const char *__restrict __s,
     __const char *__restrict __format, ...) __attribute__ ((__nothrow__));

# 434 "/usr/include/stdio.h" 3 4





extern int fgetc (FILE *__stream);
extern int getc (FILE *__stream);





extern int getchar (void);

# 458 "/usr/include/stdio.h" 3 4
extern int getc_unlocked (FILE *__stream);
extern int getchar_unlocked (void);
# 469 "/usr/include/stdio.h" 3 4
extern int fgetc_unlocked (FILE *__stream);











extern int fputc (int __c, FILE *__stream);
extern int putc (int __c, FILE *__stream);





extern int putchar (int __c);

# 502 "/usr/include/stdio.h" 3 4
extern int fputc_unlocked (int __c, FILE *__stream);







extern int putc_unlocked (int __c, FILE *__stream);
extern int putchar_unlocked (int __c);






extern int getw (FILE *__stream);


extern int putw (int __w, FILE *__stream);








extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
     ;






extern char *gets (char *__s) ;

# 583 "/usr/include/stdio.h" 3 4





extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);





extern int puts (__const char *__s);






extern int ungetc (int __c, FILE *__stream);






extern size_t fread (void *__restrict __ptr, size_t __size,
       size_t __n, FILE *__restrict __stream) ;




extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
        size_t __n, FILE *__restrict __s) ;

# 636 "/usr/include/stdio.h" 3 4
extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
         size_t __n, FILE *__restrict __stream) ;
extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
          size_t __n, FILE *__restrict __stream) ;








extern int fseek (FILE *__stream, long int __off, int __whence);




extern long int ftell (FILE *__stream) ;




extern void rewind (FILE *__stream);

# 672 "/usr/include/stdio.h" 3 4
extern int fseeko (FILE *__stream, __off_t __off, int __whence);




extern __off_t ftello (FILE *__stream) ;
# 691 "/usr/include/stdio.h" 3 4






extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);




extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
# 714 "/usr/include/stdio.h" 3 4

# 723 "/usr/include/stdio.h" 3 4


extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__));

extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) ;

extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) ;




extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;








extern void perror (__const char *__s);






# 1 "/usr/include/bits/sys_errlist.h" 1 3 4
# 27 "/usr/include/bits/sys_errlist.h" 3 4
extern int sys_nerr;
extern __const char *__const sys_errlist[];
# 753 "/usr/include/stdio.h" 2 3 4




extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)) ;




extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
# 772 "/usr/include/stdio.h" 3 4
extern FILE *popen (__const char *__command, __const char *__modes) ;





extern int pclose (FILE *__stream);





extern char *ctermid (char *__s) __attribute__ ((__nothrow__));
# 812 "/usr/include/stdio.h" 3 4
extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__));



extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__)) ;


extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__));
# 842 "/usr/include/stdio.h" 3 4

# 58 "../sys/NUM.h" 2

# 1 "../sys/abcio.h" 1
# 29 "../sys/abcio.h"
# 1 "../sys/complex.h" 1
# 39 "../sys/complex.h"
typedef struct fcomplex { float re, im; } fcomplex;
typedef struct dcomplex { double re, im; } dcomplex;







fcomplex fcomplex_add (fcomplex a, fcomplex b);
dcomplex dcomplex_add (dcomplex a, dcomplex b);

fcomplex fcomplex_sub (fcomplex a, fcomplex b);
dcomplex dcomplex_sub (dcomplex a, dcomplex b);

fcomplex fcomplex_mul (fcomplex a, fcomplex b);
dcomplex dcomplex_mul (dcomplex a, dcomplex b);

fcomplex fcomplex_create (float re, float im);
dcomplex dcomplex_create (double re, double im);

fcomplex fcomplex_conjugate (fcomplex z);
dcomplex dcomplex_conjugate (dcomplex z);

fcomplex fcomplex_div (fcomplex a, fcomplex b);
dcomplex dcomplex_div (dcomplex a, dcomplex b);

float fcomplex_abs (fcomplex z);
double dcomplex_abs (dcomplex z);

fcomplex fcomplex_sqrt (fcomplex z);
dcomplex dcomplex_sqrt (dcomplex z);

fcomplex fcomplex_rmul (float x, fcomplex a);
dcomplex dcomplex_rmul (double x, dcomplex a);

fcomplex fcomplex_exp (fcomplex z);
dcomplex dcomplex_exp (dcomplex z);
# 30 "../sys/abcio.h" 2




int ascgeti1 (FILE *f);
int ascgeti2 (FILE *f);
long ascgeti4 (FILE *f);
unsigned int ascgetu1 (FILE *f);
unsigned int ascgetu2 (FILE *f);
unsigned long ascgetu4 (FILE *f);
double ascgetr4 (FILE *f);
double ascgetr8 (FILE *f);
double ascgetr10 (FILE *f);
fcomplex ascgetc8 (FILE *f);
dcomplex ascgetc16 (FILE *f);
char ascgetc1 (FILE *f);
short ascgete1 (FILE *f, void *enumerated);
short ascgete2 (FILE *f, void *enumerated);
short ascgeteb (FILE *f);
short ascgeteq (FILE *f);
short ascgetex (FILE *f);
char *ascgets1 (FILE *f);
char *ascgets2 (FILE *f);
char *ascgets4 (FILE *f);

void ascindent (void);
void ascexdent (void);
void ascresetindent (void);
void ascputintro (FILE *f, const char *format, ...);

void ascputi1 (int i, FILE *f, const char *format, ...);
void ascputi2 (int i, FILE *f, const char *format, ...);
void ascputi4 (long i, FILE *f, const char *format, ...);
void ascputu1 (unsigned int u, FILE *f, const char *format, ...);
void ascputu2 (unsigned int u, FILE *f, const char *format, ...);
void ascputu4 (unsigned long u, FILE *f, const char *format, ...);
void ascputr4 (double x, FILE *f, const char *format, ...);
void ascputr8 (double x, FILE *f, const char *format, ...);
void ascputr10 (double x, FILE *f, const char *format, ...);
void ascputc8 (fcomplex z, FILE *f, const char *format, ...);
void ascputc16 (dcomplex z, FILE *f, const char *format, ...);
void ascputc1 (int i, FILE *f, const char *format, ...);
void ascpute1 (int i, FILE *f, void *enumerated, const char *format, ...);
void ascpute2 (int i, FILE *f, void *enumerated, const char *format, ...);
void ascputeb (int i, FILE *f, const char *format, ...);
void ascputeq (int i, FILE *f, const char *format, ...);
void ascputex (int i, FILE *f, const char *format, ...);
void ascputs1 (const char *s, FILE *f, const char *format, ...);
void ascputs2 (const char *s, FILE *f, const char *format, ...);
void ascputs4 (const char *s, FILE *f, const char *format, ...);

void ascio_verbose (int verbose);
# 90 "../sys/abcio.h"
unsigned int bingetu1 (FILE *f); void binputu1 (unsigned int i, FILE *f);
unsigned int bingetu2 (FILE *f); void binputu2 (unsigned int i, FILE *f);
unsigned long bingetu4 (FILE *f); void binputu4 (unsigned long i, FILE *f);

int bingeti1 (FILE *f); void binputi1 (int i, FILE *f);
int bingeti2 (FILE *f); void binputi2 (int i, FILE *f);
long bingeti3 (FILE *f); void binputi3 (long i, FILE *f);
long bingeti4 (FILE *f); void binputi4 (long i, FILE *f);






int bingeti2LE (FILE *f); void binputi2LE (int i, FILE *f);
long bingeti3LE (FILE *f); void binputi3LE (long i, FILE *f);
long bingeti4LE (FILE *f); void binputi4LE (long i, FILE *f);
unsigned int bingetu2LE (FILE *f); void binputu2LE (unsigned int i, FILE *f);
unsigned long bingetu4LE (FILE *f); void binputu4LE (unsigned long i, FILE *f);






unsigned int bingetb1 (FILE *f); void binputb1 (unsigned int value, FILE *f);
unsigned int bingetb2 (FILE *f); void binputb2 (unsigned int value, FILE *f);
unsigned int bingetb3 (FILE *f); void binputb3 (unsigned int value, FILE *f);
unsigned int bingetb4 (FILE *f); void binputb4 (unsigned int value, FILE *f);
unsigned int bingetb5 (FILE *f); void binputb5 (unsigned int value, FILE *f);
unsigned int bingetb6 (FILE *f); void binputb6 (unsigned int value, FILE *f);
unsigned int bingetb7 (FILE *f); void binputb7 (unsigned int value, FILE *f);
void bingetb (FILE *f); void binputb (FILE *f);
# 139 "../sys/abcio.h"
int bingete1 (FILE *f, void *enumerated);
int bingete2 (FILE *f, void *enumerated);




void binpute1 (int value, FILE *f, void *enumerated);
void binpute2 (int value, FILE *f, void *enumerated);




double bingetr4 (FILE *f); void binputr4 (double x, FILE *f);
# 160 "../sys/abcio.h"
double bingetr4LE (FILE *f); void binputr4LE (double x, FILE *f);

double bingetr8 (FILE *f); void binputr8 (double x, FILE *f);
# 172 "../sys/abcio.h"
double bingetr10 (FILE *f); void binputr10 (double x, FILE *f);
# 184 "../sys/abcio.h"
fcomplex bingetc8 (FILE *f);
dcomplex bingetc16 (FILE *f);
void binputc8 (fcomplex z, FILE *f);
void binputc16 (dcomplex z, FILE *f);



char * bingets1 (FILE *f); void binputs1 (const char *s, FILE *f);
char * bingets2 (FILE *f); void binputs2 (const char *s, FILE *f);
char * bingets4 (FILE *f); void binputs4 (const char *s, FILE *f);
# 204 "../sys/abcio.h"
typedef struct { unsigned char *ptr, *base, *max; } CACHE;

CACHE * memopen (size_t nbytes);



int memclose (CACHE *f);
size_t memread (void *ptr, size_t size, size_t nmemb, CACHE *m);
size_t memwrite (const void *ptr, size_t size, size_t nmemb, CACHE *m);
int memseek (CACHE *f, long offset, int whence);
long memtell (CACHE *f);
void memrewind (CACHE *me);

void memprint1 (CACHE *me, const char *s1);
void memprint2 (CACHE *me, const char *s1, const char *s2);
void memprint3 (CACHE *me, const char *s1, const char *s2, const char *s3);
void memprint4 (CACHE *me, const char *s1, const char *s2, const char *s3, const char *s4);
void memprint5 (CACHE *me, const char *s1, const char *s2, const char *s3, const char *s4, const char *s5);
# 230 "../sys/abcio.h"
unsigned int cacgetb1 (CACHE *f); void cacputb1 (unsigned int value, CACHE *f);
unsigned int cacgetb2 (CACHE *f); void cacputb2 (unsigned int value, CACHE *f);
unsigned int cacgetb3 (CACHE *f); void cacputb3 (unsigned int value, CACHE *f);
unsigned int cacgetb4 (CACHE *f); void cacputb4 (unsigned int value, CACHE *f);
unsigned int cacgetb5 (CACHE *f); void cacputb5 (unsigned int value, CACHE *f);
unsigned int cacgetb6 (CACHE *f); void cacputb6 (unsigned int value, CACHE *f);
unsigned int cacgetb7 (CACHE *f); void cacputb7 (unsigned int value, CACHE *f);
void cacgetb (CACHE *f); void cacputb (CACHE *f);
unsigned int cacgetu1 (CACHE *f); void cacputu1 (unsigned int u, CACHE *f);
unsigned int cacgetu2 (CACHE *f); void cacputu2 (unsigned int i, CACHE *f);
unsigned long cacgetu4 (CACHE *f); void cacputu4 (unsigned long i, CACHE *f);
int cacgete1 (CACHE *f, void *enumerated); void cacpute1 (int value, CACHE *f, void *enumerated);
int cacgete2 (CACHE *f, void *enumerated); void cacpute2 (int value, CACHE *f, void *enumerated);






int cacgeti1 (CACHE *f); void cacputi1 (int i, CACHE *f);
int cacgeti2 (CACHE *f); void cacputi2 (int i, CACHE *f);
long cacgeti4 (CACHE *f); void cacputi4 (long i, CACHE *f);
int cacgeti2LE (CACHE *f); void cacputi2LE (int i, CACHE *f);
double cacgetr4 (CACHE *f); void cacputr4 (double x, CACHE *f);
double cacgetr8 (CACHE *f); void cacputr8 (double x, CACHE *f);
double cacgetr10 (CACHE *f); void cacputr10 (double x, CACHE *f);
fcomplex cacgetc8 (CACHE *f);
dcomplex cacgetc16 (CACHE *f);
void cacputc8 (fcomplex z, CACHE *f);
void cacputc16 (dcomplex z, CACHE *f);


long cacgeti4LE (CACHE *f); void cacputi4LE (long i, CACHE *f);
unsigned int cacgetu2LE (CACHE *f); void cacputu2LE (unsigned int i, CACHE *f);
unsigned long cacgetu4LE (CACHE *f); void cacputu4LE (unsigned long i, CACHE *f);
char * cacgets1 (CACHE *f); void cacputs1 (const char *s, CACHE *f);
char * cacgets2 (CACHE *f); void cacputs2 (const char *s, CACHE *f);
char * cacgets4 (CACHE *f); void cacputs4 (const char *s, CACHE *f);
# 60 "../sys/NUM.h" 2


double NUMpow (double base, double exponent);
# 85 "../sys/NUM.h"
void * NUMvector (long elementSize, long lo, long hi);
# 94 "../sys/NUM.h"
void NUMvector_free (long elementSize, void *v, long lo);







void * NUMvector_copy (long elementSize, void *v, long lo, long hi);
# 111 "../sys/NUM.h"
void NUMvector_copyElements (long elementSize, void *v, void *to, long lo, long hi);





int NUMvector_equal (long elementSize, void *v1, void *v2, long lo, long hi);
# 126 "../sys/NUM.h"
void * NUMmatrix (long elementSize, long row1, long row2, long col1, long col2);
# 136 "../sys/NUM.h"
void NUMmatrix_free (long elementSize, void *m, long row1, long col1);
# 145 "../sys/NUM.h"
void * NUMmatrix_copy (long elementSize, void * m, long row1, long row2, long col1, long col2);
# 154 "../sys/NUM.h"
void NUMmatrix_copyElements (long elementSize, void *m, void *to, long row1, long row2, long col1, long col2);





int NUMmatrix_equal (long elementSize, void *m1, void *m2, long row1, long row2, long col1, long col2);
# 179 "../sys/NUM.h"
signed char * NUMbvector (long lo, long hi); void NUMbvector_free (signed char *v, long lo); signed char * NUMbvector_copy (const signed char *v, long lo, long hi); void NUMbvector_copyElements (const signed char *v, signed char *to, long lo, long hi); int NUMbvector_equal (const signed char *v1, const signed char *v2, long lo, long hi); signed char ** NUMbmatrix (long row1, long row2, long col1, long col2); void NUMbmatrix_free (signed char **m, long row1, long col1); signed char ** NUMbmatrix_copy (signed char **m, long row1, long row2, long col1, long col2); void NUMbmatrix_copyElements (signed char **m, signed char **to, long row1, long row2, long col1, long col2); int NUMbmatrix_equal (signed char **m1, signed char **m2, long row1, long row2, long col1, long col2);
short * NUMsvector (long lo, long hi); void NUMsvector_free (short *v, long lo); short * NUMsvector_copy (const short *v, long lo, long hi); void NUMsvector_copyElements (const short *v, short *to, long lo, long hi); int NUMsvector_equal (const short *v1, const short *v2, long lo, long hi); short ** NUMsmatrix (long row1, long row2, long col1, long col2); void NUMsmatrix_free (short **m, long row1, long col1); short ** NUMsmatrix_copy (short **m, long row1, long row2, long col1, long col2); void NUMsmatrix_copyElements (short **m, short **to, long row1, long row2, long col1, long col2); int NUMsmatrix_equal (short **m1, short **m2, long row1, long row2, long col1, long col2);
int * NUMivector (long lo, long hi); void NUMivector_free (int *v, long lo); int * NUMivector_copy (const int *v, long lo, long hi); void NUMivector_copyElements (const int *v, int *to, long lo, long hi); int NUMivector_equal (const int *v1, const int *v2, long lo, long hi); int ** NUMimatrix (long row1, long row2, long col1, long col2); void NUMimatrix_free (int **m, long row1, long col1); int ** NUMimatrix_copy (int **m, long row1, long row2, long col1, long col2); void NUMimatrix_copyElements (int **m, int **to, long row1, long row2, long col1, long col2); int NUMimatrix_equal (int **m1, int **m2, long row1, long row2, long col1, long col2);
long * NUMlvector (long lo, long hi); void NUMlvector_free (long *v, long lo); long * NUMlvector_copy (const long *v, long lo, long hi); void NUMlvector_copyElements (const long *v, long *to, long lo, long hi); int NUMlvector_equal (const long *v1, const long *v2, long lo, long hi); long ** NUMlmatrix (long row1, long row2, long col1, long col2); void NUMlmatrix_free (long **m, long row1, long col1); long ** NUMlmatrix_copy (long **m, long row1, long row2, long col1, long col2); void NUMlmatrix_copyElements (long **m, long **to, long row1, long row2, long col1, long col2); int NUMlmatrix_equal (long **m1, long **m2, long row1, long row2, long col1, long col2);
unsigned char * NUMubvector (long lo, long hi); void NUMubvector_free (unsigned char *v, long lo); unsigned char * NUMubvector_copy (const unsigned char *v, long lo, long hi); void NUMubvector_copyElements (const unsigned char *v, unsigned char *to, long lo, long hi); int NUMubvector_equal (const unsigned char *v1, const unsigned char *v2, long lo, long hi); unsigned char ** NUMubmatrix (long row1, long row2, long col1, long col2); void NUMubmatrix_free (unsigned char **m, long row1, long col1); unsigned char ** NUMubmatrix_copy (unsigned char **m, long row1, long row2, long col1, long col2); void NUMubmatrix_copyElements (unsigned char **m, unsigned char **to, long row1, long row2, long col1, long col2); int NUMubmatrix_equal (unsigned char **m1, unsigned char **m2, long row1, long row2, long col1, long col2);
unsigned short * NUMusvector (long lo, long hi); void NUMusvector_free (unsigned short *v, long lo); unsigned short * NUMusvector_copy (const unsigned short *v, long lo, long hi); void NUMusvector_copyElements (const unsigned short *v, unsigned short *to, long lo, long hi); int NUMusvector_equal (const unsigned short *v1, const unsigned short *v2, long lo, long hi); unsigned short ** NUMusmatrix (long row1, long row2, long col1, long col2); void NUMusmatrix_free (unsigned short **m, long row1, long col1); unsigned short ** NUMusmatrix_copy (unsigned short **m, long row1, long row2, long col1, long col2); void NUMusmatrix_copyElements (unsigned short **m, unsigned short **to, long row1, long row2, long col1, long col2); int NUMusmatrix_equal (unsigned short **m1, unsigned short **m2, long row1, long row2, long col1, long col2);
unsigned int * NUMuivector (long lo, long hi); void NUMuivector_free (unsigned int *v, long lo); unsigned int * NUMuivector_copy (const unsigned int *v, long lo, long hi); void NUMuivector_copyElements (const unsigned int *v, unsigned int *to, long lo, long hi); int NUMuivector_equal (const unsigned int *v1, const unsigned int *v2, long lo, long hi); unsigned int ** NUMuimatrix (long row1, long row2, long col1, long col2); void NUMuimatrix_free (unsigned int **m, long row1, long col1); unsigned int ** NUMuimatrix_copy (unsigned int **m, long row1, long row2, long col1, long col2); void NUMuimatrix_copyElements (unsigned int **m, unsigned int **to, long row1, long row2, long col1, long col2); int NUMuimatrix_equal (unsigned int **m1, unsigned int **m2, long row1, long row2, long col1, long col2);
unsigned long * NUMulvector (long lo, long hi); void NUMulvector_free (unsigned long *v, long lo); unsigned long * NUMulvector_copy (const unsigned long *v, long lo, long hi); void NUMulvector_copyElements (const unsigned long *v, unsigned long *to, long lo, long hi); int NUMulvector_equal (const unsigned long *v1, const unsigned long *v2, long lo, long hi); unsigned long ** NUMulmatrix (long row1, long row2, long col1, long col2); void NUMulmatrix_free (unsigned long **m, long row1, long col1); unsigned long ** NUMulmatrix_copy (unsigned long **m, long row1, long row2, long col1, long col2); void NUMulmatrix_copyElements (unsigned long **m, unsigned long **to, long row1, long row2, long col1, long col2); int NUMulmatrix_equal (unsigned long **m1, unsigned long **m2, long row1, long row2, long col1, long col2);
float * NUMfvector (long lo, long hi); void NUMfvector_free (float *v, long lo); float * NUMfvector_copy (const float *v, long lo, long hi); void NUMfvector_copyElements (const float *v, float *to, long lo, long hi); int NUMfvector_equal (const float *v1, const float *v2, long lo, long hi); float ** NUMfmatrix (long row1, long row2, long col1, long col2); void NUMfmatrix_free (float **m, long row1, long col1); float ** NUMfmatrix_copy (float **m, long row1, long row2, long col1, long col2); void NUMfmatrix_copyElements (float **m, float **to, long row1, long row2, long col1, long col2); int NUMfmatrix_equal (float **m1, float **m2, long row1, long row2, long col1, long col2);
double * NUMdvector (long lo, long hi); void NUMdvector_free (double *v, long lo); double * NUMdvector_copy (const double *v, long lo, long hi); void NUMdvector_copyElements (const double *v, double *to, long lo, long hi); int NUMdvector_equal (const double *v1, const double *v2, long lo, long hi); double ** NUMdmatrix (long row1, long row2, long col1, long col2); void NUMdmatrix_free (double **m, long row1, long col1); double ** NUMdmatrix_copy (double **m, long row1, long row2, long col1, long col2); void NUMdmatrix_copyElements (double **m, double **to, long row1, long row2, long col1, long col2); int NUMdmatrix_equal (double **m1, double **m2, long row1, long row2, long col1, long col2);
fcomplex * NUMfcvector (long lo, long hi); void NUMfcvector_free (fcomplex *v, long lo); fcomplex * NUMfcvector_copy (const fcomplex *v, long lo, long hi); void NUMfcvector_copyElements (const fcomplex *v, fcomplex *to, long lo, long hi); int NUMfcvector_equal (const fcomplex *v1, const fcomplex *v2, long lo, long hi); fcomplex ** NUMfcmatrix (long row1, long row2, long col1, long col2); void NUMfcmatrix_free (fcomplex **m, long row1, long col1); fcomplex ** NUMfcmatrix_copy (fcomplex **m, long row1, long row2, long col1, long col2); void NUMfcmatrix_copyElements (fcomplex **m, fcomplex **to, long row1, long row2, long col1, long col2); int NUMfcmatrix_equal (fcomplex **m1, fcomplex **m2, long row1, long row2, long col1, long col2);
dcomplex * NUMdcvector (long lo, long hi); void NUMdcvector_free (dcomplex *v, long lo); dcomplex * NUMdcvector_copy (const dcomplex *v, long lo, long hi); void NUMdcvector_copyElements (const dcomplex *v, dcomplex *to, long lo, long hi); int NUMdcvector_equal (const dcomplex *v1, const dcomplex *v2, long lo, long hi); dcomplex ** NUMdcmatrix (long row1, long row2, long col1, long col2); void NUMdcmatrix_free (dcomplex **m, long row1, long col1); dcomplex ** NUMdcmatrix_copy (dcomplex **m, long row1, long row2, long col1, long col2); void NUMdcmatrix_copyElements (dcomplex **m, dcomplex **to, long row1, long row2, long col1, long col2); int NUMdcmatrix_equal (dcomplex **m1, dcomplex **m2, long row1, long row2, long col1, long col2);
char * NUMcvector (long lo, long hi); void NUMcvector_free (char *v, long lo); char * NUMcvector_copy (const char *v, long lo, long hi); void NUMcvector_copyElements (const char *v, char *to, long lo, long hi); int NUMcvector_equal (const char *v1, const char *v2, long lo, long hi); char ** NUMcmatrix (long row1, long row2, long col1, long col2); void NUMcmatrix_free (char **m, long row1, long col1); char ** NUMcmatrix_copy (char **m, long row1, long row2, long col1, long col2); void NUMcmatrix_copyElements (char **m, char **to, long row1, long row2, long col1, long col2); int NUMcmatrix_equal (char **m1, char **m2, long row1, long row2, long col1, long col2);
# 238 "../sys/NUM.h"
long NUM_getTotalNumberOfArrays (void);



double NUMlnGamma (double x);
double NUMbeta (double z, double w);
double NUMbesselI (long n, double x);
double NUMbessel_i0_f (double x);
double NUMbessel_i1_f (double x);
double NUMbesselK (long n, double x);
double NUMbessel_k0_f (double x);
double NUMbessel_k1_f (double x);
double NUMbesselK_f (long n, double x);
double NUMsigmoid (double x);
double NUMinvSigmoid (double x);
double NUMerfcc (double x);
double NUMgaussP (double z);
double NUMgaussQ (double z);
double NUMincompleteGammaP (double a, double x);
double NUMincompleteGammaQ (double a, double x);
double NUMchiSquareP (double chiSquare, long degreesOfFreedom);
double NUMchiSquareQ (double chiSquare, long degreesOfFreedom);
double NUMcombinations (long n, long k);
double NUMincompleteBeta (double a, double b, double x);
double NUMbinomialP (double p, double k, double n);
double NUMbinomialQ (double p, double k, double n);
double NUMinvBinomialP (double p, double k, double n);
double NUMinvBinomialQ (double p, double k, double n);



double NUMhertzToBark (double hertz);
double NUMbarkToHertz (double bark);
double NUMphonToDifferenceLimens (double phon);
double NUMdifferenceLimensToPhon (double ndli);
double NUMsoundPressureToPhon (double soundPressure, double bark);
double NUMhertzToMel (double hertz);
double NUMmelToHertz (double mel);
double NUMhertzToSemitones (double hertz);
double NUMsemitonesToHertz (double semitones);
double NUMerb (double f);
double NUMhertzToErb (double hertz);
double NUMerbToHertz (double erb);




void NUMsort_f (long n, float ra []);
void NUMsort_d (long n, double ra []);
void NUMsort_i (long n, int ra []);
void NUMsort_l (long n, long ra []);
void NUMsort_str (long n, char *a []);
void NUMsort_p (long n, void *a [], int (*compare) (const void *, const void *));

double NUMquantile_f (long n, float a [], double factor);
double NUMquantile_d (long n, double a [], double factor);
# 312 "../sys/NUM.h"
double NUM_interpolate_sinc_f (float y [], long nx, double x, long interpolationDepth);
double NUM_interpolate_sinc_d (double y [], long nx, double x, long interpolationDepth);
# 322 "../sys/NUM.h"
double NUMimproveExtremum_f (float *y, long nx, long ixmid, int interpolation, double *ixmid_real, int isMaximum);
double NUMimproveMaximum_f (float *y, long nx, long ixmid, int interpolation, double *ixmid_real);
double NUMimproveMinimum_f (float *y, long nx, long ixmid, int interpolation, double *ixmid_real);
double NUMimproveExtremum_d (double *y, long nx, long ixmid, int interpolation, double *ixmid_real, int isMaximum);
double NUMimproveMaximum_d (double *y, long nx, long ixmid, int interpolation, double *ixmid_real);
double NUMimproveMinimum_d (double *y, long nx, long ixmid, int interpolation, double *ixmid_real);



int NUM_viterbi (
 long numberOfFrames, long maxnCandidates,
 long (*getNumberOfCandidates) (long iframe, void *closure),
 double (*getLocalCost) (long iframe, long icand, void *closure),
 double (*getTransitionCost) (long iframe, long icand1, long icand2, void *closure),
 void (*putResult) (long iframe, long place, void *closure),
 void *closure);

int NUM_viterbi_multi (
 long nframe, long ncand, int ntrack,
 double (*getLocalCost) (long iframe, long icand, int itrack, void *closure),
 double (*getTransitionCost) (long iframe, long icand1, long icand2, int itrack, void *closure),
 void (*putResult) (long iframe, long place, int itrack, void *closure),
 void *closure);



int NUMrotationsPointInPolygon
 (double x0, double y0, long n, float x [], float y []);
# 361 "../sys/NUM.h"
void NUMrandomRestart (unsigned long seed);





double NUMrandomFraction (void);

double NUMrandomUniform (double lowest, double highest);

long NUMrandomInteger (long lowest, long highest);

double NUMrandomGauss (double mean, double standardDeviation);

double NUMrandomPoisson (double mean);

void NUMfbtoa (double formant, double bandwidth, double dt, double *a1, double *a2);
void NUMfilterSecondOrderSection_a (float x [], long n, double a1, double a2);
void NUMfilterSecondOrderSection_fb (float x [], long n, double dt, double formant, double bandwidth);
double NUMftopreemphasis (double f, double dt);
void NUMpreemphasize_a (float x [], long n, double preemphasis);
void NUMdeemphasize_a (float x [], long n, double preemphasis);
void NUMpreemphasize_f (float x [], long n, double dt, double frequency);
void NUMdeemphasize_f (float x [], long n, double dt, double frequency);
void NUMautoscale (float x [], long n, double scale);
# 401 "../sys/NUM.h"
int NUMbvector_writeAscii (const signed char *v, long lo, long hi, FILE *f, const char *name); int NUMbvector_writeBinary (const signed char *v, long lo, long hi, FILE *f); int NUMbvector_writeCache (const signed char *v, long lo, long hi, CACHE *f); signed char * NUMbvector_readAscii (long lo, long hi, FILE *f, const char *name); signed char * NUMbvector_readBinary (long lo, long hi, FILE *f); signed char * NUMbvector_readCache (long lo, long hi, CACHE *f); int NUMbmatrix_writeAscii (signed char **v, long r1, long r2, long c1, long c2, FILE *f, const char *name); int NUMbmatrix_writeBinary (signed char **v, long r1, long r2, long c1, long c2, FILE *f); int NUMbmatrix_writeCache (signed char **v, long r1, long r2, long c1, long c2, CACHE *f); signed char ** NUMbmatrix_readAscii (long r1, long r2, long c1, long c2, FILE *f, const char *name); signed char ** NUMbmatrix_readBinary (long r1, long r2, long c1, long c2, FILE *f); signed char ** NUMbmatrix_readCache (long r1, long r2, long c1, long c2, CACHE *f);
int NUMsvector_writeAscii (const short *v, long lo, long hi, FILE *f, const char *name); int NUMsvector_writeBinary (const short *v, long lo, long hi, FILE *f); int NUMsvector_writeCache (const short *v, long lo, long hi, CACHE *f); short * NUMsvector_readAscii (long lo, long hi, FILE *f, const char *name); short * NUMsvector_readBinary (long lo, long hi, FILE *f); short * NUMsvector_readCache (long lo, long hi, CACHE *f); int NUMsmatrix_writeAscii (short **v, long r1, long r2, long c1, long c2, FILE *f, const char *name); int NUMsmatrix_writeBinary (short **v, long r1, long r2, long c1, long c2, FILE *f); int NUMsmatrix_writeCache (short **v, long r1, long r2, long c1, long c2, CACHE *f); short ** NUMsmatrix_readAscii (long r1, long r2, long c1, long c2, FILE *f, const char *name); short ** NUMsmatrix_readBinary (long r1, long r2, long c1, long c2, FILE *f); short ** NUMsmatrix_readCache (long r1, long r2, long c1, long c2, CACHE *f);
int NUMivector_writeAscii (const int *v, long lo, long hi, FILE *f, const char *name); int NUMivector_writeBinary (const int *v, long lo, long hi, FILE *f); int NUMivector_writeCache (const int *v, long lo, long hi, CACHE *f); int * NUMivector_readAscii (long lo, long hi, FILE *f, const char *name); int * NUMivector_readBinary (long lo, long hi, FILE *f); int * NUMivector_readCache (long lo, long hi, CACHE *f); int NUMimatrix_writeAscii (int **v, long r1, long r2, long c1, long c2, FILE *f, const char *name); int NUMimatrix_writeBinary (int **v, long r1, long r2, long c1, long c2, FILE *f); int NUMimatrix_writeCache (int **v, long r1, long r2, long c1, long c2, CACHE *f); int ** NUMimatrix_readAscii (long r1, long r2, long c1, long c2, FILE *f, const char *name); int ** NUMimatrix_readBinary (long r1, long r2, long c1, long c2, FILE *f); int ** NUMimatrix_readCache (long r1, long r2, long c1, long c2, CACHE *f);
int NUMlvector_writeAscii (const long *v, long lo, long hi, FILE *f, const char *name); int NUMlvector_writeBinary (const long *v, long lo, long hi, FILE *f); int NUMlvector_writeCache (const long *v, long lo, long hi, CACHE *f); long * NUMlvector_readAscii (long lo, long hi, FILE *f, const char *name); long * NUMlvector_readBinary (long lo, long hi, FILE *f); long * NUMlvector_readCache (long lo, long hi, CACHE *f); int NUMlmatrix_writeAscii (long **v, long r1, long r2, long c1, long c2, FILE *f, const char *name); int NUMlmatrix_writeBinary (long **v, long r1, long r2, long c1, long c2, FILE *f); int NUMlmatrix_writeCache (long **v, long r1, long r2, long c1, long c2, CACHE *f); long ** NUMlmatrix_readAscii (long r1, long r2, long c1, long c2, FILE *f, const char *name); long ** NUMlmatrix_readBinary (long r1, long r2, long c1, long c2, FILE *f); long ** NUMlmatrix_readCache (long r1, long r2, long c1, long c2, CACHE *f);
int NUMubvector_writeAscii (const unsigned char *v, long lo, long hi, FILE *f, const char *name); int NUMubvector_writeBinary (const unsigned char *v, long lo, long hi, FILE *f); int NUMubvector_writeCache (const unsigned char *v, long lo, long hi, CACHE *f); unsigned char * NUMubvector_readAscii (long lo, long hi, FILE *f, const char *name); unsigned char * NUMubvector_readBinary (long lo, long hi, FILE *f); unsigned char * NUMubvector_readCache (long lo, long hi, CACHE *f); int NUMubmatrix_writeAscii (unsigned char **v, long r1, long r2, long c1, long c2, FILE *f, const char *name); int NUMubmatrix_writeBinary (unsigned char **v, long r1, long r2, long c1, long c2, FILE *f); int NUMubmatrix_writeCache (unsigned char **v, long r1, long r2, long c1, long c2, CACHE *f); unsigned char ** NUMubmatrix_readAscii (long r1, long r2, long c1, long c2, FILE *f, const char *name); unsigned char ** NUMubmatrix_readBinary (long r1, long r2, long c1, long c2, FILE *f); unsigned char ** NUMubmatrix_readCache (long r1, long r2, long c1, long c2, CACHE *f);
int NUMusvector_writeAscii (const unsigned short *v, long lo, long hi, FILE *f, const char *name); int NUMusvector_writeBinary (const unsigned short *v, long lo, long hi, FILE *f); int NUMusvector_writeCache (const unsigned short *v, long lo, long hi, CACHE *f); unsigned short * NUMusvector_readAscii (long lo, long hi, FILE *f, const char *name); unsigned short * NUMusvector_readBinary (long lo, long hi, FILE *f); unsigned short * NUMusvector_readCache (long lo, long hi, CACHE *f); int NUMusmatrix_writeAscii (unsigned short **v, long r1, long r2, long c1, long c2, FILE *f, const char *name); int NUMusmatrix_writeBinary (unsigned short **v, long r1, long r2, long c1, long c2, FILE *f); int NUMusmatrix_writeCache (unsigned short **v, long r1, long r2, long c1, long c2, CACHE *f); unsigned short ** NUMusmatrix_readAscii (long r1, long r2, long c1, long c2, FILE *f, const char *name); unsigned short ** NUMusmatrix_readBinary (long r1, long r2, long c1, long c2, FILE *f); unsigned short ** NUMusmatrix_readCache (long r1, long r2, long c1, long c2, CACHE *f);
int NUMuivector_writeAscii (const unsigned int *v, long lo, long hi, FILE *f, const char *name); int NUMuivector_writeBinary (const unsigned int *v, long lo, long hi, FILE *f); int NUMuivector_writeCache (const unsigned int *v, long lo, long hi, CACHE *f); unsigned int * NUMuivector_readAscii (long lo, long hi, FILE *f, const char *name); unsigned int * NUMuivector_readBinary (long lo, long hi, FILE *f); unsigned int * NUMuivector_readCache (long lo, long hi, CACHE *f); int NUMuimatrix_writeAscii (unsigned int **v, long r1, long r2, long c1, long c2, FILE *f, const char *name); int NUMuimatrix_writeBinary (unsigned int **v, long r1, long r2, long c1, long c2, FILE *f); int NUMuimatrix_writeCache (unsigned int **v, long r1, long r2, long c1, long c2, CACHE *f); unsigned int ** NUMuimatrix_readAscii (long r1, long r2, long c1, long c2, FILE *f, const char *name); unsigned int ** NUMuimatrix_readBinary (long r1, long r2, long c1, long c2, FILE *f); unsigned int ** NUMuimatrix_readCache (long r1, long r2, long c1, long c2, CACHE *f);
int NUMulvector_writeAscii (const unsigned long *v, long lo, long hi, FILE *f, const char *name); int NUMulvector_writeBinary (const unsigned long *v, long lo, long hi, FILE *f); int NUMulvector_writeCache (const unsigned long *v, long lo, long hi, CACHE *f); unsigned long * NUMulvector_readAscii (long lo, long hi, FILE *f, const char *name); unsigned long * NUMulvector_readBinary (long lo, long hi, FILE *f); unsigned long * NUMulvector_readCache (long lo, long hi, CACHE *f); int NUMulmatrix_writeAscii (unsigned long **v, long r1, long r2, long c1, long c2, FILE *f, const char *name); int NUMulmatrix_writeBinary (unsigned long **v, long r1, long r2, long c1, long c2, FILE *f); int NUMulmatrix_writeCache (unsigned long **v, long r1, long r2, long c1, long c2, CACHE *f); unsigned long ** NUMulmatrix_readAscii (long r1, long r2, long c1, long c2, FILE *f, const char *name); unsigned long ** NUMulmatrix_readBinary (long r1, long r2, long c1, long c2, FILE *f); unsigned long ** NUMulmatrix_readCache (long r1, long r2, long c1, long c2, CACHE *f);
int NUMfvector_writeAscii (const float *v, long lo, long hi, FILE *f, const char *name); int NUMfvector_writeBinary (const float *v, long lo, long hi, FILE *f); int NUMfvector_writeCache (const float *v, long lo, long hi, CACHE *f); float * NUMfvector_readAscii (long lo, long hi, FILE *f, const char *name); float * NUMfvector_readBinary (long lo, long hi, FILE *f); float * NUMfvector_readCache (long lo, long hi, CACHE *f); int NUMfmatrix_writeAscii (float **v, long r1, long r2, long c1, long c2, FILE *f, const char *name); int NUMfmatrix_writeBinary (float **v, long r1, long r2, long c1, long c2, FILE *f); int NUMfmatrix_writeCache (float **v, long r1, long r2, long c1, long c2, CACHE *f); float ** NUMfmatrix_readAscii (long r1, long r2, long c1, long c2, FILE *f, const char *name); float ** NUMfmatrix_readBinary (long r1, long r2, long c1, long c2, FILE *f); float ** NUMfmatrix_readCache (long r1, long r2, long c1, long c2, CACHE *f);
int NUMdvector_writeAscii (const double *v, long lo, long hi, FILE *f, const char *name); int NUMdvector_writeBinary (const double *v, long lo, long hi, FILE *f); int NUMdvector_writeCache (const double *v, long lo, long hi, CACHE *f); double * NUMdvector_readAscii (long lo, long hi, FILE *f, const char *name); double * NUMdvector_readBinary (long lo, long hi, FILE *f); double * NUMdvector_readCache (long lo, long hi, CACHE *f); int NUMdmatrix_writeAscii (double **v, long r1, long r2, long c1, long c2, FILE *f, const char *name); int NUMdmatrix_writeBinary (double **v, long r1, long r2, long c1, long c2, FILE *f); int NUMdmatrix_writeCache (double **v, long r1, long r2, long c1, long c2, CACHE *f); double ** NUMdmatrix_readAscii (long r1, long r2, long c1, long c2, FILE *f, const char *name); double ** NUMdmatrix_readBinary (long r1, long r2, long c1, long c2, FILE *f); double ** NUMdmatrix_readCache (long r1, long r2, long c1, long c2, CACHE *f);
int NUMfcvector_writeAscii (const fcomplex *v, long lo, long hi, FILE *f, const char *name); int NUMfcvector_writeBinary (const fcomplex *v, long lo, long hi, FILE *f); int NUMfcvector_writeCache (const fcomplex *v, long lo, long hi, CACHE *f); fcomplex * NUMfcvector_readAscii (long lo, long hi, FILE *f, const char *name); fcomplex * NUMfcvector_readBinary (long lo, long hi, FILE *f); fcomplex * NUMfcvector_readCache (long lo, long hi, CACHE *f); int NUMfcmatrix_writeAscii (fcomplex **v, long r1, long r2, long c1, long c2, FILE *f, const char *name); int NUMfcmatrix_writeBinary (fcomplex **v, long r1, long r2, long c1, long c2, FILE *f); int NUMfcmatrix_writeCache (fcomplex **v, long r1, long r2, long c1, long c2, CACHE *f); fcomplex ** NUMfcmatrix_readAscii (long r1, long r2, long c1, long c2, FILE *f, const char *name); fcomplex ** NUMfcmatrix_readBinary (long r1, long r2, long c1, long c2, FILE *f); fcomplex ** NUMfcmatrix_readCache (long r1, long r2, long c1, long c2, CACHE *f);
int NUMdcvector_writeAscii (const dcomplex *v, long lo, long hi, FILE *f, const char *name); int NUMdcvector_writeBinary (const dcomplex *v, long lo, long hi, FILE *f); int NUMdcvector_writeCache (const dcomplex *v, long lo, long hi, CACHE *f); dcomplex * NUMdcvector_readAscii (long lo, long hi, FILE *f, const char *name); dcomplex * NUMdcvector_readBinary (long lo, long hi, FILE *f); dcomplex * NUMdcvector_readCache (long lo, long hi, CACHE *f); int NUMdcmatrix_writeAscii (dcomplex **v, long r1, long r2, long c1, long c2, FILE *f, const char *name); int NUMdcmatrix_writeBinary (dcomplex **v, long r1, long r2, long c1, long c2, FILE *f); int NUMdcmatrix_writeCache (dcomplex **v, long r1, long r2, long c1, long c2, CACHE *f); dcomplex ** NUMdcmatrix_readAscii (long r1, long r2, long c1, long c2, FILE *f, const char *name); dcomplex ** NUMdcmatrix_readBinary (long r1, long r2, long c1, long c2, FILE *f); dcomplex ** NUMdcmatrix_readCache (long r1, long r2, long c1, long c2, CACHE *f);
int NUMcvector_writeAscii (const char *v, long lo, long hi, FILE *f, const char *name); int NUMcvector_writeBinary (const char *v, long lo, long hi, FILE *f); int NUMcvector_writeCache (const char *v, long lo, long hi, CACHE *f); char * NUMcvector_readAscii (long lo, long hi, FILE *f, const char *name); char * NUMcvector_readBinary (long lo, long hi, FILE *f); char * NUMcvector_readCache (long lo, long hi, CACHE *f); int NUMcmatrix_writeAscii (char **v, long r1, long r2, long c1, long c2, FILE *f, const char *name); int NUMcmatrix_writeBinary (char **v, long r1, long r2, long c1, long c2, FILE *f); int NUMcmatrix_writeCache (char **v, long r1, long r2, long c1, long c2, CACHE *f); char ** NUMcmatrix_readAscii (long r1, long r2, long c1, long c2, FILE *f, const char *name); char ** NUMcmatrix_readBinary (long r1, long r2, long c1, long c2, FILE *f); char ** NUMcmatrix_readCache (long r1, long r2, long c1, long c2, CACHE *f);
# 35 "../sys/Thing.h" 2

# 1 "../sys/melder.h" 1
# 27 "../sys/melder.h"
# 1 "/usr/include/stdlib.h" 1 3 4
# 33 "/usr/include/stdlib.h" 3 4
# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 34 "/usr/include/stdlib.h" 2 3 4


# 96 "/usr/include/stdlib.h" 3 4


typedef struct
  {
    int quot;
    int rem;
  } div_t;



typedef struct
  {
    long int quot;
    long int rem;
  } ldiv_t;



# 140 "/usr/include/stdlib.h" 3 4
extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__)) ;




extern double atof (__const char *__nptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;

extern int atoi (__const char *__nptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;

extern long int atol (__const char *__nptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;





__extension__ extern long long int atoll (__const char *__nptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;





extern double strtod (__const char *__restrict __nptr,
        char **__restrict __endptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

# 182 "/usr/include/stdlib.h" 3 4


extern long int strtol (__const char *__restrict __nptr,
   char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

extern unsigned long int strtoul (__const char *__restrict __nptr,
      char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;




__extension__
extern long long int strtoq (__const char *__restrict __nptr,
        char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

__extension__
extern unsigned long long int strtouq (__const char *__restrict __nptr,
           char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;





__extension__
extern long long int strtoll (__const char *__restrict __nptr,
         char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

__extension__
extern unsigned long long int strtoull (__const char *__restrict __nptr,
     char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

# 279 "/usr/include/stdlib.h" 3 4
extern double __strtod_internal (__const char *__restrict __nptr,
     char **__restrict __endptr, int __group)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
extern float __strtof_internal (__const char *__restrict __nptr,
    char **__restrict __endptr, int __group)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
extern long double __strtold_internal (__const char *__restrict __nptr,
           char **__restrict __endptr,
           int __group)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

extern long int __strtol_internal (__const char *__restrict __nptr,
       char **__restrict __endptr,
       int __base, int __group)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;



extern unsigned long int __strtoul_internal (__const char *__restrict __nptr,
          char **__restrict __endptr,
          int __base, int __group)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;




__extension__
extern long long int __strtoll_internal (__const char *__restrict __nptr,
      char **__restrict __endptr,
      int __base, int __group)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;



__extension__
extern unsigned long long int __strtoull_internal (__const char *
         __restrict __nptr,
         char **__restrict __endptr,
         int __base, int __group)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
# 429 "/usr/include/stdlib.h" 3 4
extern char *l64a (long int __n) __attribute__ ((__nothrow__)) ;


extern long int a64l (__const char *__s)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;




# 1 "/usr/include/sys/types.h" 1 3 4
# 29 "/usr/include/sys/types.h" 3 4






typedef __u_char u_char;
typedef __u_short u_short;
typedef __u_int u_int;
typedef __u_long u_long;
typedef __quad_t quad_t;
typedef __u_quad_t u_quad_t;
typedef __fsid_t fsid_t;




typedef __loff_t loff_t;



typedef __ino_t ino_t;
# 62 "/usr/include/sys/types.h" 3 4
typedef __dev_t dev_t;




typedef __gid_t gid_t;




typedef __mode_t mode_t;




typedef __nlink_t nlink_t;




typedef __uid_t uid_t;





typedef __off_t off_t;
# 100 "/usr/include/sys/types.h" 3 4
typedef __pid_t pid_t;




typedef __id_t id_t;




typedef __ssize_t ssize_t;





typedef __daddr_t daddr_t;
typedef __caddr_t caddr_t;





typedef __key_t key_t;
# 133 "/usr/include/sys/types.h" 3 4
# 1 "/usr/include/time.h" 1 3 4
# 75 "/usr/include/time.h" 3 4


typedef __time_t time_t;



# 93 "/usr/include/time.h" 3 4
typedef __clockid_t clockid_t;
# 105 "/usr/include/time.h" 3 4
typedef __timer_t timer_t;
# 134 "/usr/include/sys/types.h" 2 3 4
# 147 "/usr/include/sys/types.h" 3 4
# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 148 "/usr/include/sys/types.h" 2 3 4



typedef unsigned long int ulong;
typedef unsigned short int ushort;
typedef unsigned int uint;
# 195 "/usr/include/sys/types.h" 3 4
typedef int int8_t __attribute__ ((__mode__ (__QI__)));
typedef int int16_t __attribute__ ((__mode__ (__HI__)));
typedef int int32_t __attribute__ ((__mode__ (__SI__)));
typedef int int64_t __attribute__ ((__mode__ (__DI__)));


typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));

typedef int register_t __attribute__ ((__mode__ (__word__)));
# 217 "/usr/include/sys/types.h" 3 4
# 1 "/usr/include/endian.h" 1 3 4
# 37 "/usr/include/endian.h" 3 4
# 1 "/usr/include/bits/endian.h" 1 3 4
# 38 "/usr/include/endian.h" 2 3 4
# 218 "/usr/include/sys/types.h" 2 3 4


# 1 "/usr/include/sys/select.h" 1 3 4
# 31 "/usr/include/sys/select.h" 3 4
# 1 "/usr/include/bits/select.h" 1 3 4
# 32 "/usr/include/sys/select.h" 2 3 4


# 1 "/usr/include/bits/sigset.h" 1 3 4
# 23 "/usr/include/bits/sigset.h" 3 4
typedef int __sig_atomic_t;




typedef struct
  {
    unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
  } __sigset_t;
# 35 "/usr/include/sys/select.h" 2 3 4



typedef __sigset_t sigset_t;





# 1 "/usr/include/time.h" 1 3 4
# 121 "/usr/include/time.h" 3 4
struct timespec
  {
    __time_t tv_sec;
    long int tv_nsec;
  };
# 45 "/usr/include/sys/select.h" 2 3 4

# 1 "/usr/include/bits/time.h" 1 3 4
# 69 "/usr/include/bits/time.h" 3 4
struct timeval
  {
    __time_t tv_sec;
    __suseconds_t tv_usec;
  };
# 47 "/usr/include/sys/select.h" 2 3 4


typedef __suseconds_t suseconds_t;





typedef long int __fd_mask;
# 67 "/usr/include/sys/select.h" 3 4
typedef struct
  {






    __fd_mask __fds_bits[1024 / (8 * sizeof (__fd_mask))];


  } fd_set;






typedef __fd_mask fd_mask;
# 99 "/usr/include/sys/select.h" 3 4

# 109 "/usr/include/sys/select.h" 3 4
extern int select (int __nfds, fd_set *__restrict __readfds,
     fd_set *__restrict __writefds,
     fd_set *__restrict __exceptfds,
     struct timeval *__restrict __timeout);
# 121 "/usr/include/sys/select.h" 3 4
extern int pselect (int __nfds, fd_set *__restrict __readfds,
      fd_set *__restrict __writefds,
      fd_set *__restrict __exceptfds,
      const struct timespec *__restrict __timeout,
      const __sigset_t *__restrict __sigmask);



# 221 "/usr/include/sys/types.h" 2 3 4


# 1 "/usr/include/sys/sysmacros.h" 1 3 4
# 29 "/usr/include/sys/sysmacros.h" 3 4
__extension__
extern __inline unsigned int gnu_dev_major (unsigned long long int __dev)
     __attribute__ ((__nothrow__));
__extension__
extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev)
     __attribute__ ((__nothrow__));
__extension__
extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major,
       unsigned int __minor)
     __attribute__ ((__nothrow__));


__extension__ extern __inline unsigned int
__attribute__ ((__nothrow__)) gnu_dev_major (unsigned long long int __dev)
{
  return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
}

__extension__ extern __inline unsigned int
__attribute__ ((__nothrow__)) gnu_dev_minor (unsigned long long int __dev)
{
  return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
}

__extension__ extern __inline unsigned long long int
__attribute__ ((__nothrow__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor)
{
  return ((__minor & 0xff) | ((__major & 0xfff) << 8)
   | (((unsigned long long int) (__minor & ~0xff)) << 12)
   | (((unsigned long long int) (__major & ~0xfff)) << 32));
}
# 224 "/usr/include/sys/types.h" 2 3 4
# 235 "/usr/include/sys/types.h" 3 4
typedef __blkcnt_t blkcnt_t;



typedef __fsblkcnt_t fsblkcnt_t;



typedef __fsfilcnt_t fsfilcnt_t;
# 270 "/usr/include/sys/types.h" 3 4
# 1 "/usr/include/bits/pthreadtypes.h" 1 3 4
# 36 "/usr/include/bits/pthreadtypes.h" 3 4
typedef unsigned long int pthread_t;


typedef union
{
  char __size[36];
  long int __align;
} pthread_attr_t;


typedef struct __pthread_internal_slist
{
  struct __pthread_internal_slist *__next;
} __pthread_slist_t;




typedef union
{
  struct __pthread_mutex_s
  {
    int __lock;
    unsigned int __count;
    int __owner;


    int __kind;
    unsigned int __nusers;
    __extension__ union
    {
      int __spins;
      __pthread_slist_t __list;
    };
  } __data;
  char __size[24];
  long int __align;
} pthread_mutex_t;

typedef union
{
  char __size[4];
  long int __align;
} pthread_mutexattr_t;




typedef union
{
  struct
  {
    int __lock;
    unsigned int __futex;
    __extension__ unsigned long long int __total_seq;
    __extension__ unsigned long long int __wakeup_seq;
    __extension__ unsigned long long int __woken_seq;
    void *__mutex;
    unsigned int __nwaiters;
    unsigned int __broadcast_seq;
  } __data;
  char __size[48];
  __extension__ long long int __align;
} pthread_cond_t;

typedef union
{
  char __size[4];
  long int __align;
} pthread_condattr_t;



typedef unsigned int pthread_key_t;



typedef int pthread_once_t;





typedef union
{
  struct
  {
    int __lock;
    unsigned int __nr_readers;
    unsigned int __readers_wakeup;
    unsigned int __writer_wakeup;
    unsigned int __nr_readers_queued;
    unsigned int __nr_writers_queued;


    unsigned int __flags;
    int __writer;
  } __data;
  char __size[32];
  long int __align;
} pthread_rwlock_t;

typedef union
{
  char __size[8];
  long int __align;
} pthread_rwlockattr_t;





typedef volatile int pthread_spinlock_t;




typedef union
{
  char __size[20];
  long int __align;
} pthread_barrier_t;

typedef union
{
  char __size[4];
  int __align;
} pthread_barrierattr_t;
# 271 "/usr/include/sys/types.h" 2 3 4



# 439 "/usr/include/stdlib.h" 2 3 4






extern long int random (void) __attribute__ ((__nothrow__));


extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__));





extern char *initstate (unsigned int __seed, char *__statebuf,
   size_t __statelen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));



extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));







struct random_data
  {
    int32_t *fptr;
    int32_t *rptr;
    int32_t *state;
    int rand_type;
    int rand_deg;
    int rand_sep;
    int32_t *end_ptr;
  };

extern int random_r (struct random_data *__restrict __buf,
       int32_t *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));

extern int srandom_r (unsigned int __seed, struct random_data *__buf)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));

extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
   size_t __statelen,
   struct random_data *__restrict __buf)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4)));

extern int setstate_r (char *__restrict __statebuf,
         struct random_data *__restrict __buf)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));






extern int rand (void) __attribute__ ((__nothrow__));

extern void srand (unsigned int __seed) __attribute__ ((__nothrow__));




extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__));







extern double drand48 (void) __attribute__ ((__nothrow__));
extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern long int lrand48 (void) __attribute__ ((__nothrow__));
extern long int nrand48 (unsigned short int __xsubi[3])
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern long int mrand48 (void) __attribute__ ((__nothrow__));
extern long int jrand48 (unsigned short int __xsubi[3])
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern void srand48 (long int __seedval) __attribute__ ((__nothrow__));
extern unsigned short int *seed48 (unsigned short int __seed16v[3])
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));





struct drand48_data
  {
    unsigned short int __x[3];
    unsigned short int __old_x[3];
    unsigned short int __c;
    unsigned short int __init;
    unsigned long long int __a;
  };


extern int drand48_r (struct drand48_data *__restrict __buffer,
        double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
extern int erand48_r (unsigned short int __xsubi[3],
        struct drand48_data *__restrict __buffer,
        double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern int lrand48_r (struct drand48_data *__restrict __buffer,
        long int *__restrict __result)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
extern int nrand48_r (unsigned short int __xsubi[3],
        struct drand48_data *__restrict __buffer,
        long int *__restrict __result)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern int mrand48_r (struct drand48_data *__restrict __buffer,
        long int *__restrict __result)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
extern int jrand48_r (unsigned short int __xsubi[3],
        struct drand48_data *__restrict __buffer,
        long int *__restrict __result)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));

extern int seed48_r (unsigned short int __seed16v[3],
       struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));

extern int lcong48_r (unsigned short int __param[7],
        struct drand48_data *__buffer)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));









extern void *malloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;

extern void *calloc (size_t __nmemb, size_t __size)
     __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;







extern void *realloc (void *__ptr, size_t __size)
     __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));

extern void free (void *__ptr) __attribute__ ((__nothrow__));




extern void cfree (void *__ptr) __attribute__ ((__nothrow__));



# 1 "/usr/include/alloca.h" 1 3 4
# 25 "/usr/include/alloca.h" 3 4
# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 26 "/usr/include/alloca.h" 2 3 4







extern void *alloca (size_t __size) __attribute__ ((__nothrow__));






# 613 "/usr/include/stdlib.h" 2 3 4




extern void *valloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;




extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;




extern void abort (void) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));



extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));





extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));






extern void exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));

# 658 "/usr/include/stdlib.h" 3 4


extern char *getenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;




extern char *__secure_getenv (__const char *__name)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;





extern int putenv (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));





extern int setenv (__const char *__name, __const char *__value, int __replace)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));


extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__));






extern int clearenv (void) __attribute__ ((__nothrow__));
# 698 "/usr/include/stdlib.h" 3 4
extern char *mktemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
# 709 "/usr/include/stdlib.h" 3 4
extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ;
# 729 "/usr/include/stdlib.h" 3 4
extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;








extern int system (__const char *__command) ;

# 757 "/usr/include/stdlib.h" 3 4
extern char *realpath (__const char *__restrict __name,
         char *__restrict __resolved) __attribute__ ((__nothrow__)) ;






typedef int (*__compar_fn_t) (__const void *, __const void *);









extern void *bsearch (__const void *__key, __const void *__base,
        size_t __nmemb, size_t __size, __compar_fn_t __compar)
     __attribute__ ((__nonnull__ (1, 2, 5))) ;



extern void qsort (void *__base, size_t __nmemb, size_t __size,
     __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));



extern int abs (int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
extern long int labs (long int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;












extern div_t div (int __numer, int __denom)
     __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
extern ldiv_t ldiv (long int __numer, long int __denom)
     __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;

# 822 "/usr/include/stdlib.h" 3 4
extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
     int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;




extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
     int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;




extern char *gcvt (double __value, int __ndigit, char *__buf)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) ;




extern char *qecvt (long double __value, int __ndigit,
      int *__restrict __decpt, int *__restrict __sign)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;
extern char *qfcvt (long double __value, int __ndigit,
      int *__restrict __decpt, int *__restrict __sign)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;
extern char *qgcvt (long double __value, int __ndigit, char *__buf)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) ;




extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
     int *__restrict __sign, char *__restrict __buf,
     size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));
extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
     int *__restrict __sign, char *__restrict __buf,
     size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));

extern int qecvt_r (long double __value, int __ndigit,
      int *__restrict __decpt, int *__restrict __sign,
      char *__restrict __buf, size_t __len)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));
extern int qfcvt_r (long double __value, int __ndigit,
      int *__restrict __decpt, int *__restrict __sign,
      char *__restrict __buf, size_t __len)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));







extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__)) ;


extern int mbtowc (wchar_t *__restrict __pwc,
     __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)) ;


extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__)) ;



extern size_t mbstowcs (wchar_t *__restrict __pwcs,
   __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__));

extern size_t wcstombs (char *__restrict __s,
   __const wchar_t *__restrict __pwcs, size_t __n)
     __attribute__ ((__nothrow__));








extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
# 927 "/usr/include/stdlib.h" 3 4
extern int posix_openpt (int __oflag) ;
# 962 "/usr/include/stdlib.h" 3 4
extern int getloadavg (double __loadavg[], int __nelem)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
# 978 "/usr/include/stdlib.h" 3 4

# 28 "../sys/melder.h" 2
# 1 "/usr/include/string.h" 1 3 4
# 28 "/usr/include/string.h" 3 4





# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 34 "/usr/include/string.h" 2 3 4




extern void *memcpy (void *__restrict __dest,
       __const void *__restrict __src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern void *memmove (void *__dest, __const void *__src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));






extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
        int __c, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));





extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));


extern void *memchr (__const void *__s, int __c, size_t __n)
      __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));

# 82 "/usr/include/string.h" 3 4


extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));

extern char *strncpy (char *__restrict __dest,
        __const char *__restrict __src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));

extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
        size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern int strcmp (__const char *__s1, __const char *__s2)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));

extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));


extern int strcoll (__const char *__s1, __const char *__s2)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));

extern size_t strxfrm (char *__restrict __dest,
         __const char *__restrict __src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));

# 130 "/usr/include/string.h" 3 4
extern char *strdup (__const char *__s)
     __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
# 165 "/usr/include/string.h" 3 4


extern char *strchr (__const char *__s, int __c)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));

extern char *strrchr (__const char *__s, int __c)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));

# 181 "/usr/include/string.h" 3 4



extern size_t strcspn (__const char *__s, __const char *__reject)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));


extern size_t strspn (__const char *__s, __const char *__accept)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));

extern char *strpbrk (__const char *__s, __const char *__accept)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));

extern char *strstr (__const char *__haystack, __const char *__needle)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));



extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));




extern char *__strtok_r (char *__restrict __s,
    __const char *__restrict __delim,
    char **__restrict __save_ptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));

extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
         char **__restrict __save_ptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
# 240 "/usr/include/string.h" 3 4


extern size_t strlen (__const char *__s)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));

# 254 "/usr/include/string.h" 3 4


extern char *strerror (int __errnum) __attribute__ ((__nothrow__));

# 270 "/usr/include/string.h" 3 4
extern int strerror_r (int __errnum, char *__buf, size_t __buflen) __asm__ ("" "__xpg_strerror_r") __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
# 288 "/usr/include/string.h" 3 4
extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));



extern void bcopy (__const void *__src, void *__dest, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));


extern char *index (__const char *__s, int __c)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));


extern char *rindex (__const char *__s, int __c)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));



extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
# 325 "/usr/include/string.h" 3 4
extern int strcasecmp (__const char *__s1, __const char *__s2)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));


extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
# 348 "/usr/include/string.h" 3 4
extern char *strsep (char **__restrict __stringp,
       __const char *__restrict __delim)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
# 426 "/usr/include/string.h" 3 4

# 29 "../sys/melder.h" 2




# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stdarg.h" 1 3 4
# 105 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stdarg.h" 3 4
typedef __gnuc_va_list va_list;
# 34 "../sys/melder.h" 2
# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 152 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 3 4
typedef int ptrdiff_t;
# 35 "../sys/melder.h" 2
# 1 "/usr/include/wchar.h" 1 3 4
# 48 "/usr/include/wchar.h" 3 4
# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 49 "/usr/include/wchar.h" 2 3 4
# 93 "/usr/include/wchar.h" 3 4


typedef __mbstate_t mbstate_t;

# 118 "/usr/include/wchar.h" 3 4





struct tm;









extern wchar_t *wcscpy (wchar_t *__restrict __dest,
   __const wchar_t *__restrict __src) __attribute__ ((__nothrow__));

extern wchar_t *wcsncpy (wchar_t *__restrict __dest,
    __const wchar_t *__restrict __src, size_t __n)
     __attribute__ ((__nothrow__));


extern wchar_t *wcscat (wchar_t *__restrict __dest,
   __const wchar_t *__restrict __src) __attribute__ ((__nothrow__));

extern wchar_t *wcsncat (wchar_t *__restrict __dest,
    __const wchar_t *__restrict __src, size_t __n)
     __attribute__ ((__nothrow__));


extern int wcscmp (__const wchar_t *__s1, __const wchar_t *__s2)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__));

extern int wcsncmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__));

# 175 "/usr/include/wchar.h" 3 4



extern int wcscoll (__const wchar_t *__s1, __const wchar_t *__s2) __attribute__ ((__nothrow__));



extern size_t wcsxfrm (wchar_t *__restrict __s1,
         __const wchar_t *__restrict __s2, size_t __n) __attribute__ ((__nothrow__));

# 205 "/usr/include/wchar.h" 3 4


extern wchar_t *wcschr (__const wchar_t *__wcs, wchar_t __wc)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__));

extern wchar_t *wcsrchr (__const wchar_t *__wcs, wchar_t __wc)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__));

# 221 "/usr/include/wchar.h" 3 4



extern size_t wcscspn (__const wchar_t *__wcs, __const wchar_t *__reject)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__));


extern size_t wcsspn (__const wchar_t *__wcs, __const wchar_t *__accept)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__));

extern wchar_t *wcspbrk (__const wchar_t *__wcs, __const wchar_t *__accept)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__));

extern wchar_t *wcsstr (__const wchar_t *__haystack, __const wchar_t *__needle)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__));


extern wchar_t *wcstok (wchar_t *__restrict __s,
   __const wchar_t *__restrict __delim,
   wchar_t **__restrict __ptr) __attribute__ ((__nothrow__));


extern size_t wcslen (__const wchar_t *__s) __attribute__ ((__nothrow__)) __attribute__ ((__pure__));

# 259 "/usr/include/wchar.h" 3 4


extern wchar_t *wmemchr (__const wchar_t *__s, wchar_t __c, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__));


extern int wmemcmp (__const wchar_t *__restrict __s1,
      __const wchar_t *__restrict __s2, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__));


extern wchar_t *wmemcpy (wchar_t *__restrict __s1,
    __const wchar_t *__restrict __s2, size_t __n) __attribute__ ((__nothrow__));



extern wchar_t *wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n)
     __attribute__ ((__nothrow__));


extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __attribute__ ((__nothrow__));

# 291 "/usr/include/wchar.h" 3 4



extern wint_t btowc (int __c) __attribute__ ((__nothrow__));



extern int wctob (wint_t __c) __attribute__ ((__nothrow__));



extern int mbsinit (__const mbstate_t *__ps) __attribute__ ((__nothrow__)) __attribute__ ((__pure__));



extern size_t mbrtowc (wchar_t *__restrict __pwc,
         __const char *__restrict __s, size_t __n,
         mbstate_t *__p) __attribute__ ((__nothrow__));


extern size_t wcrtomb (char *__restrict __s, wchar_t __wc,
         mbstate_t *__restrict __ps) __attribute__ ((__nothrow__));


extern size_t __mbrlen (__const char *__restrict __s, size_t __n,
   mbstate_t *__restrict __ps) __attribute__ ((__nothrow__));
extern size_t mbrlen (__const char *__restrict __s, size_t __n,
        mbstate_t *__restrict __ps) __attribute__ ((__nothrow__));

# 348 "/usr/include/wchar.h" 3 4



extern size_t mbsrtowcs (wchar_t *__restrict __dst,
    __const char **__restrict __src, size_t __len,
    mbstate_t *__restrict __ps) __attribute__ ((__nothrow__));



extern size_t wcsrtombs (char *__restrict __dst,
    __const wchar_t **__restrict __src, size_t __len,
    mbstate_t *__restrict __ps) __attribute__ ((__nothrow__));

# 390 "/usr/include/wchar.h" 3 4



extern double wcstod (__const wchar_t *__restrict __nptr,
        wchar_t **__restrict __endptr) __attribute__ ((__nothrow__));
# 407 "/usr/include/wchar.h" 3 4
extern long int wcstol (__const wchar_t *__restrict __nptr,
   wchar_t **__restrict __endptr, int __base) __attribute__ ((__nothrow__));



extern unsigned long int wcstoul (__const wchar_t *__restrict __nptr,
      wchar_t **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__));
# 431 "/usr/include/wchar.h" 3 4

# 502 "/usr/include/wchar.h" 3 4
extern double __wcstod_internal (__const wchar_t *__restrict __nptr,
     wchar_t **__restrict __endptr, int __group)
     __attribute__ ((__nothrow__));
extern float __wcstof_internal (__const wchar_t *__restrict __nptr,
    wchar_t **__restrict __endptr, int __group)
     __attribute__ ((__nothrow__));
extern long double __wcstold_internal (__const wchar_t *__restrict __nptr,
           wchar_t **__restrict __endptr,
           int __group) __attribute__ ((__nothrow__));
# 707 "/usr/include/wchar.h" 3 4





extern wint_t fgetwc (__FILE *__stream);
extern wint_t getwc (__FILE *__stream);





extern wint_t getwchar (void);






extern wint_t fputwc (wchar_t __wc, __FILE *__stream);
extern wint_t putwc (wchar_t __wc, __FILE *__stream);





extern wint_t putwchar (wchar_t __wc);







extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n,
   __FILE *__restrict __stream);





extern int fputws (__const wchar_t *__restrict __ws,
     __FILE *__restrict __stream);






extern wint_t ungetwc (wint_t __wc, __FILE *__stream);

# 818 "/usr/include/wchar.h" 3 4




extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize,
   __const wchar_t *__restrict __format,
   __const struct tm *__restrict __tp) __attribute__ ((__nothrow__));

# 858 "/usr/include/wchar.h" 3 4

# 36 "../sys/melder.h" 2
# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stdbool.h" 1 3 4
# 37 "../sys/melder.h" 2
# 54 "../sys/melder.h"
const char * Melder_integerA (long value);
const wchar_t * Melder_integerW (long value);

const char * Melder_bigIntegerA (double value);
const wchar_t * Melder_bigIntegerW (double value);

const char * Melder_booleanA (_Bool value);
const wchar_t * Melder_booleanW (_Bool value);

const char * Melder_doubleA (double value);
const wchar_t * Melder_doubleW (double value);

const char * Melder_singleA (double value);
const wchar_t * Melder_singleW (double value);

const char * Melder_halfA (double value);
const wchar_t * Melder_halfW (double value);

const char * Melder_fixedA (double value, int precision);
const wchar_t * Melder_fixedW (double value, int precision);

const char * Melder_fixedExponentA (double value, int exponent, int precision);
const wchar_t * Melder_fixedExponentW (double value, int exponent, int precision);


const char * Melder_percentA (double value, int precision);
const wchar_t * Melder_percentW (double value, int precision);





int Melder_isStringNumeric (const char *string);
double Melder_atof (const char *string);
# 96 "../sys/melder.h"
int Melder_error (const char *format, ...);
_Bool Melder_errorA9 (const char *s1, const char *s2, const char *s3, const char *s4, const char *s5,
 const char *s6, const char *s7, const char *s8, const char *s9);
_Bool Melder_errorW9 (const wchar_t *s1, const wchar_t *s2, const wchar_t *s3, const wchar_t *s4, const wchar_t *s5,
 const wchar_t *s6, const wchar_t *s7, const wchar_t *s8, const wchar_t *s9);


void * Melder_errorp (const char *format, ...);
void * Melder_errorpW (const wchar_t *format, ...);


void Melder_flushError (const char *format, ...);
void Melder_flushErrorW (const wchar_t *format, ...);



int Melder_hasError (void);




void Melder_clearError (void);


char * Melder_getError (void);
wchar_t * Melder_getErrorW (void);


int Melder_fatal (const char *format, ...);
# 136 "../sys/melder.h"
int _Melder_assert (const char *condition, const char *fileName, int lineNumber);
# 146 "../sys/melder.h"
void * Melder_malloc (unsigned long size);
void * Melder_realloc (void *pointer, long size);
void * Melder_calloc (long numberOfElements, long elementSize);
char * Melder_strdup (const char *string);
int Melder_strcmp (const char *string1, const char *string2);
int Melder_strncmp (const char *string1, const char *string2, unsigned long n);
wchar_t * Melder_wcsdup (const wchar_t *string);
wchar_t * Melder_wcsdecompose (const wchar_t *string);
wchar_t * Melder_wcsprecompose (const wchar_t *string);
wchar_t * Melder_wcsExpandBackslashSequences (const wchar_t *string);
wchar_t * Melder_wcsReduceBackslashSequences (const wchar_t *string);
void Melder_wcsReduceBackslashSequences_inline (const wchar_t *string);
int Melder_isValidUtf8 (const char *string);
wchar_t * Melder_asciiToWcs (const char *string);
wchar_t * Melder_utf8ToWcs (const char *string);
wchar_t * Melder_isolatin1ToWcs (const char *string);
wchar_t * Melder_macromanToWcs (const char *string);
char * Melder_wcsToAscii (const wchar_t *string);
char * Melder_wcsToUtf8 (const wchar_t *string);
char * Melder_wcsToIsolatin1 (const wchar_t *string);
char * Melder_wcsToMacroman (const wchar_t *string);


void _Melder_free (void **pointer);







double Melder_allocationCount (void);






double Melder_deallocationCount (void);





double Melder_allocationSize (void);
# 201 "../sys/melder.h"
typedef struct {
 unsigned long length;
 unsigned long bufferSize;
 char *string;
} MelderStringA;
typedef struct {
 unsigned long length;
 unsigned long bufferSize;
 wchar_t *string;
} MelderStringW;

void MelderStringA_free (MelderStringA *me);
void MelderStringW_free (MelderStringW *me);
void MelderStringA_empty (MelderStringA *me);
void MelderStringW_empty (MelderStringW *me);
_Bool MelderStringA_copyA (MelderStringA *me, const char *source);
_Bool MelderStringA_copyW (MelderStringA *me, const wchar_t *source);
_Bool MelderStringW_copyA (MelderStringW *me, const char *source);
_Bool MelderStringW_copyW (MelderStringW *me, const wchar_t *source);
_Bool MelderStringA_ncopyA (MelderStringA *me, const char *source, unsigned long n);
_Bool MelderStringW_ncopyW (MelderStringW *me, const wchar_t *source, unsigned long n);
_Bool MelderStringA_appendA (MelderStringA *me, const char *source);
_Bool MelderStringW_appendW (MelderStringW *me, const wchar_t *source);
_Bool MelderStringW_appendA (MelderStringW *me, const char *source);
_Bool MelderStringA_appendCharacter (MelderStringA *me, char character);
_Bool MelderStringW_appendCharacter (MelderStringW *me, wchar_t character);
_Bool MelderStringA_getA (MelderStringA *me, char *destination);
_Bool MelderStringW_getA (MelderStringW *me, char *destination);
_Bool MelderStringW_getW (MelderStringW *me, wchar_t *destination);
double MelderString_allocationCount (void);
double MelderString_deallocationCount (void);
double MelderString_allocationSize (void);
# 242 "../sys/melder.h"
typedef struct {
 char path [260];
 wchar_t wpath [260];
 FILE *filePointer;
 int openForWriting;
} structMelderFile, *MelderFile;
typedef struct {
 char path [260];
 wchar_t wpath [260];
} structMelderDir, *MelderDir;
# 263 "../sys/melder.h"
const char * Melder_NUMBER_text_adjective (int which_Melder_NUMBER);
int Melder_numberMatchesCriterion (double value, int which_Melder_NUMBER, double criterion);
# 277 "../sys/melder.h"
const char * Melder_STRING_text_finiteVerb (int which_Melder_STRING);
int Melder_stringMatchesCriterion (const char *value, int which_Melder_STRING, const char *criterion);
# 292 "../sys/melder.h"
long Melder_countTokens (const char *string);
char *Melder_firstToken (const char *string);
char *Melder_nextToken (void);
# 307 "../sys/melder.h"
void Melder_casual (const char *format, ...);
# 317 "../sys/melder.h"
void MelderInfo_open (void);
void MelderInfo_write1 (const char *s1);
void MelderInfo_write2 (const char *s1, const char *s2);
void MelderInfo_write3 (const char *s1, const char *s2, const char *s3);
void MelderInfo_write4 (const char *s1, const char *s2, const char *s3, const char *s4);
void MelderInfo_write5 (const char *s1, const char *s2, const char *s3, const char *s4, const char *s5);
void MelderInfo_write6 (const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6);
void MelderInfo_write7 (const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7);
void MelderInfo_write8 (const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7, const char *s8);
void MelderInfo_write9 (const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7, const char *s8, const char *s9);
void MelderInfo_writeLine1 (const char *s1);
void MelderInfo_writeLine2 (const char *s1, const char *s2);
void MelderInfo_writeLine3 (const char *s1, const char *s2, const char *s3);
void MelderInfo_writeLine4 (const char *s1, const char *s2, const char *s3, const char *s4);
void MelderInfo_writeLine5 (const char *s1, const char *s2, const char *s3, const char *s4, const char *s5);
void MelderInfo_writeLine6 (const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6);
void MelderInfo_writeLine7 (const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7);
void MelderInfo_writeLine8 (const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7, const char *s8);
void MelderInfo_writeLine9 (const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7, const char *s8, const char *s9);
void MelderInfo_close (void);

void Melder_information1 (const char *s1);
void Melder_information2 (const char *s1, const char *s2);
void Melder_information3 (const char *s1, const char *s2, const char *s3);
void Melder_information4 (const char *s1, const char *s2, const char *s3, const char *s4);
void Melder_information5 (const char *s1, const char *s2, const char *s3, const char *s4, const char *s5);
void Melder_information6 (const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6);
void Melder_information7 (const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7);
void Melder_information8 (const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7, const char *s8);
void Melder_information9 (const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7, const char *s8, const char *s9);

void Melder_informationReal (double value, const char *units);

void Melder_divertInfo (MelderStringA *buffer);

void Melder_print (const char *s);


void Melder_clearInfo (void);
char * Melder_getInfo (void);
void Melder_help (const char *query);

void Melder_search (void);

void Melder_warning (const char *format, ...);

void Melder_warningOff (void);
void Melder_warningOn (void);

void Melder_beep (void);

extern int Melder_debug;



int Melder_progress (double progress, const char *format, ...);
void Melder_progressOff (void);
void Melder_progressOn (void);
# 402 "../sys/melder.h"
void * Melder_monitor (double progress, const char *format, ...);
# 437 "../sys/melder.h"
int Melder_pause (const char *format, ...);
# 462 "../sys/melder.h"
int Melder_publish (void *anything);

int Melder_record (double duration);
int Melder_recordFromFile (MelderFile fs);
void Melder_play (void);
void Melder_playReverse (void);
int Melder_publishPlayed (void);



extern unsigned long Melder_systemVersion;






extern char Melder_buffer1 [30001], Melder_buffer2 [30001];
# 498 "../sys/melder.h"
void MelderMotif_create ( void *appContext, void *parent);






extern int Melder_batch;
extern int Melder_backgrounding;

 extern void *Melder_appContext;
 extern void *Melder_topShell;
# 518 "../sys/melder.h"
void Melder_setCasualProc (void (*casualProc) (char *message));
void Melder_setProgressProc (int (*progressProc) (double progress, char *message));
void Melder_setMonitorProc (void * (*monitorProc) (double progress, char *message));
void Melder_setPauseProc (int (*pauseProc) (char *message));
void Melder_setInformationProc (void (*informationProc) (char *message));
void Melder_setHelpProc (void (*help) (const char *query));
void Melder_setSearchProc (void (*search) (void));
void Melder_setWarningProc (void (*warningProc) (char *message));
void Melder_setErrorProc (void (*errorProc) (wchar_t *message));
void Melder_setFatalProc (void (*fatalProc) (char *message));
void Melder_setPublishProc (int (*publish) (void *));
void Melder_setRecordProc (int (*record) (double));
void Melder_setRecordFromFileProc (int (*recordFromFile) (MelderFile));
void Melder_setPlayProc (void (*play) (void));
void Melder_setPlayReverseProc (void (*playReverse) (void));
void Melder_setPublishPlayedProc (int (*publishPlayed) (void));
# 542 "../sys/melder.h"
char * MelderFile_name (MelderFile file);
char * MelderDir_name (MelderDir dir);
int Melder_pathToDir (const char *path, MelderDir dir);
int Melder_pathToFile (const char *path, MelderFile file);
int Melder_relativePathToFile (const char *path, MelderFile file);
char * Melder_dirToPath (MelderDir dir);


char * Melder_fileToPath (MelderFile file);
void MelderFile_copy (MelderFile file, MelderFile copy);
void MelderDir_copy (MelderDir dir, MelderDir copy);
int MelderFile_equal (MelderFile file1, MelderFile file2);
int MelderDir_equal (MelderDir dir1, MelderDir dir2);
void MelderFile_setToNull (MelderFile file);
int MelderFile_isNull (MelderFile file);
void MelderDir_setToNull (MelderDir dir);
int MelderDir_isNull (MelderDir dir);
void MelderDir_getFile (MelderDir parent, const char *fileName, MelderFile file);
void MelderDir_relativePathToFile (MelderDir dir, const char *path, MelderFile file);
void MelderFile_getParentDir (MelderFile file, MelderDir parent);
void MelderDir_getParentDir (MelderDir file, MelderDir parent);
int MelderDir_isDesktop (MelderDir dir);
int MelderDir_getSubdir (MelderDir parent, const char *subdirName, MelderDir subdir);
void Melder_rememberShellDirectory (void);
char * Melder_getShellDirectory (void);
void Melder_getHomeDir (MelderDir homeDir);
void Melder_getPrefDir (MelderDir prefDir);
void Melder_getTempDir (MelderDir tempDir);

int MelderFile_exists (MelderFile file);
int MelderFile_readable (MelderFile file);
long MelderFile_length (MelderFile file);
int MelderFile_delete (MelderFile file);


FILE * Melder_fopen (MelderFile file, const char *type);






int Melder_fclose (MelderFile file, FILE *stream);
void Melder_files_cleanUp (void);


void MelderFile_open (MelderFile file);
void MelderFile_append (MelderFile file);
void MelderFile_create (MelderFile file, const char *macType, const char *macCreator, const char *winExtension);
void * MelderFile_read (MelderFile file, long nbytes);
char * MelderFile_readLine (MelderFile file);
void MelderFile_write (MelderFile file, char *buffer, long nbytes);
void MelderFile_writeLine (MelderFile file, char *buffer);
void MelderFile_rewind (MelderFile file);
void MelderFile_seek (MelderFile file, long position, int direction);
long MelderFile_tell (MelderFile file);
void MelderFile_close (MelderFile file);
# 608 "../sys/melder.h"
void MelderFile_setLineSeparator (int systemType);


char * MelderFile_readText (MelderFile file);
int MelderFile_writeText (MelderFile file, const char *text);
int MelderFile_appendText (MelderFile file, const char *text);

int Melder_createDirectory (MelderDir parent, const char *subdirName, int mode);

void Melder_getDefaultDir (MelderDir dir);
void Melder_setDefaultDir (MelderDir dir);
void MelderFile_setDefaultDir (MelderFile file);
void MelderFile_nativizePath (char *path);





char * Melder_asciiMessage (const char *message);


char * MelderFile_messageName (MelderFile file);

double Melder_stopwatch (void);

long Melder_killReturns_inline (char *text);







void Melder_setUseInternalSpeaker (int useInternalSpeaker);
int Melder_getUseInternalSpeaker (void);
void Melder_setOutputGain (double gain);
double Melder_getOutputGain (void);
void Melder_audio_prefs (void);
long Melder_getBestSampleRate (long fsamp);
extern int Melder_isPlaying;
int Melder_play16 (const short *buffer, long sampleRate, long numberOfSamples, int numberOfChannels,
 int (*playCallback) (void *playClosure, long numberOfSamplesPlayed), void *playClosure);
int Melder_stopPlaying (int explicit);


long Melder_getSamplesPlayed (void);
int Melder_stopWasExplicit (void);

void Melder_setMaximumAsynchronicity (int maximumAsynchronicity);




int Melder_getMaximumAsynchronicity (void);

void Melder_setZeroPadding (double zeroPadding);
double Melder_getZeroPadding (void);
# 676 "../sys/melder.h"
char * Melder_audioFileTypeString (int audioFileType);
char * Melder_macAudioFileType (int audioFileType);
char * Melder_winAudioFileExtension (int audioFileType);
# 694 "../sys/melder.h"
int Melder_defaultAudioFileEncoding16 (int audioFileType);
int Melder_writeAudioFileHeader16 (FILE *f, int audioFileType, long sampleRate, long numberOfSamples, int numberOfChannels);
int MelderFile_writeAudioFile16 (MelderFile file, int audioFileType, const short *buffer, long sampleRate, long numberOfSamples, int numberOfChannels);

int MelderFile_checkSoundFile (MelderFile file, int *numberOfChannels, int *encoding,
 double *sampleRate, long *startOfData, long *numberOfSamples);




int Melder_bytesPerSamplePoint (int encoding);
int Melder_readAudioToFloat (FILE *f, int numberOfChannels, int encoding,
 float *leftBuffer, float *rightBuffer, long numberOfSamples);




int Melder_readAudioToShort (FILE *f, int numberOfChannels, int encoding, short *buffer, long numberOfSamples);



int Melder_writeFloatToAudio (FILE *f, int encoding, const float *left, long nleft, const float *right, long nright, int warnIfClipped);
int Melder_writeShortToAudio (FILE *f, int numberOfChannels, int encoding, const short *buffer, long numberOfSamples);

void Melder_audioTrigger (void);



char * Melder_getenv (const char *variableName);
int Melder_system (const char *command);
# 37 "../sys/Thing.h" 2

# 1 "../sys/enum.h" 1
# 85 "../sys/enum.h"
typedef struct enum_ANY { int _length; const char *_type, *zero, *_end; int _trailer; } enum_ANY;

typedef signed char enum1;
typedef signed short enum2;
# 99 "../sys/enum.h"
int enum_search (void *enumerated, const char *string);
# 39 "../sys/Thing.h" 2

# 1 "../sys/oo.h" 1
# 41 "../sys/Thing.h" 2


# 1 "../sys/lispio.h" 1
# 33 "../sys/lispio.h"
typedef struct Lispio { long length; const char *string; } Lispio;



typedef struct LispioSeq { long length; const char *string; } LispioSeq;




int Lispio_openList (const Lispio *me, LispioSeq *thee);
# 52 "../sys/lispio.h"
int Lispio_openListFromFile (LispioSeq *me, FILE *f, char *buffer, long maxLength);
# 89 "../sys/lispio.h"
char * Lispio_string (const Lispio *me);







int Lispio_equal (const Lispio *me, const Lispio *thee);




int Lispio_strequ (const Lispio *me, const char *string);




int Lispio_read (LispioSeq *me, Lispio *first);
# 117 "../sys/lispio.h"
long Lispio_count (const LispioSeq *me);

int Lispio_isInteger (const Lispio *me);

int Lispio_integer (const Lispio *me, long *value);
# 44 "../sys/Thing.h" 2



typedef void *Any;
# 78 "../sys/Thing.h"
char * Thing_className (Any void_me);


int Thing_member (Any void_me, void *klas);






int Thing_subclass (void *klas, void *ancestor);






void Thing_info (Any void_me);
# 107 "../sys/Thing.h"
Any Thing_new (void *klas);
# 117 "../sys/Thing.h"
void Thing_recognizeClassesByName (void *readableClass, ...);
# 135 "../sys/Thing.h"
void Thing_recognizeClassByOtherName (void *readableClass, const char *otherName);

Any Thing_newFromClassName (const char *className);
# 149 "../sys/Thing.h"
void *Thing_classFromClassName (const char *className);
# 163 "../sys/Thing.h"
char * Thing_getName (Any void_me);


void Thing_setName (Any void_me, const char *name);







void Thing_overrideClass (Any void_me, void *klas);
# 194 "../sys/Thing.h"
void Thing_swap (Any void_me, Any void_thee);
# 266 "../sys/Thing.h"
typedef struct structThing *Thing; typedef struct structThing_Table *Thing_Table; struct structThing_Table { void (* _initialize) (void *table); char *_className; Thing_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); }; struct structThing { Thing_Table methods; char *name; }; extern struct structThing_Table theStructThing; extern Thing_Table classThing;
# 304 "../sys/Thing.h"
void _Thing_forget (Thing *me);

void * _Thing_check (Any void_me, void *table, const char *fileName, int line);




long Thing_getTotalNumberOfThings (void);


extern long Thing_version;
# 30 "../sys/Data.h" 2


Any Data_copy (Any void_me);







int Data_equal (Any data1, Any data2);
# 49 "../sys/Data.h"
int Data_canWriteAscii (Any void_me);






int Data_writeAscii (Any void_me, FILE *f);
# 69 "../sys/Data.h"
int Data_writeToConsole (Any void_me);
# 80 "../sys/Data.h"
int Data_writeToTextFile (Any void_me, MelderFile fs);
# 91 "../sys/Data.h"
int Data_writeToShortTextFile (Any void_me, MelderFile fs);
# 102 "../sys/Data.h"
int Data_canWriteBinary (Any void_me);






int Data_writeBinary (Any void_me, FILE *f);
# 124 "../sys/Data.h"
int Data_writeToBinaryFile (Any void_me, MelderFile fs);
# 134 "../sys/Data.h"
int Data_canWriteLisp (Any void_me);






int Data_writeLisp (Any void_me, FILE *f);
# 154 "../sys/Data.h"
int Data_writeLispToConsole (Any void_me);
# 165 "../sys/Data.h"
int Data_writeToLispFile (Any void_me, MelderFile fs);
# 181 "../sys/Data.h"
int Data_canReadAscii (Any void_me);







int Data_readAscii (Any void_me, FILE *f);
# 204 "../sys/Data.h"
Any Data_readFromTextFile (MelderFile fs);
# 220 "../sys/Data.h"
int Data_canReadBinary (Any void_me);







int Data_readBinary (Any void_me, FILE *f);
# 243 "../sys/Data.h"
Any Data_readFromBinaryFile (MelderFile fs);
# 259 "../sys/Data.h"
int Data_canReadLisp (Any void_me);







int Data_readLisp (Any void_me, FILE *f);
# 282 "../sys/Data.h"
Any Data_readFromLispFile (MelderFile fs);
# 298 "../sys/Data.h"
typedef struct structData_Description {
 const char *name;
 int type;
 int offset;
 int size;
 const char *tagName;
 void *tagType;
 int rank;
 const char *min1, *max1;
 const char *min2, *max2;
} *Data_Description;
# 348 "../sys/Data.h"
typedef struct structData *Data; typedef struct structData_Table *Data_Table; struct structData_Table { void (* _initialize) (void *table); char *_className; Thing_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); }; struct structData { Data_Table methods; char *name; }; extern struct structData_Table theStructData; extern Data_Table classData;
# 570 "../sys/Data.h"
int Data_Description_countMembers (Data_Description structDescription);


Data_Description Data_Description_findMatch (Data_Description structDescription, const char *member);



Data_Description Data_Description_findNumberUse (Data_Description structDescription, const char *string);




long Data_Description_integer (void *structAddress, Data_Description description);


int Data_Description_evaluateInteger (void *structAddress, Data_Description structDescription,
 const char *formula, long *result);







void Data_recognizeFileType (Any (*recognizer) (int nread, const char *header, MelderFile fs));
# 640 "../sys/Data.h"
Any Data_readFromFile (MelderFile fs);
# 656 "../sys/Data.h"
extern structMelderFile Data_fileBeingRead;
# 30 "../fon/Function.h" 2
# 41 "../fon/Function.h"
typedef struct structFunction *Function; typedef struct structFunction_Table *Function_Table; struct structFunction_Table { void (* _initialize) (void *table); char *_className; Data_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); int (*getMinimumUnit) (void *klas, long ilevel); int (*getMaximumUnit) (void *klas, long ilevel); const char * (*getUnitText) (void *klas, long ilevel, int unit, unsigned long flags); int (*isUnitLogarithmic) (void *klas, long ilevel, int unit); double (*convertStandardToSpecialUnit) (void *klas, double value, long ilevel, int unit); double (*convertSpecialToStandardUnit) (void *klas, double value, long ilevel, int unit); }; struct structFunction { Function_Table methods; char *name; double xmin, xmax; }; extern struct structFunction_Table theStructFunction; extern Function_Table classFunction;
# 50 "../fon/Function.h"
int Function_init (Any void_me, double xmin, double xmax);
# 67 "../fon/Function.h"
int ClassFunction_getMinimumUnit (void *klas, long ilevel);
int ClassFunction_getMaximumUnit (void *klas, long ilevel);




const char * ClassFunction_getUnitText (void *klas, long ilevel, int unit, unsigned long flags);

int ClassFunction_isUnitLogarithmic (void *klas, long ilevel, int unit);

double ClassFunction_convertStandardToSpecialUnit (void *klas, double value, long ilevel, int unit);
double ClassFunction_convertSpecialToStandardUnit (void *klas, double value, long ilevel, int unit);
double ClassFunction_convertToNonlogarithmic (void *klas, double value, long ilevel, int unit);
# 94 "../fon/Function.h"
double Function_window (double tim, int windowType);
# 142 "../fon/Function.h"
void Function_unidirectionalAutowindow (Any void_me, double *xmin, double *xmax);
void Function_bidirectionalAutowindow (Any void_me, double *x1, double *x2);
int Function_intersectRangeWithDomain (Any void_me, double *x1, double *x2);
# 30 "../fon/Sampled.h" 2


# 1 "../sys/Graphics.h" 1
# 29 "../sys/Graphics.h"
typedef struct structGraphics *Graphics;
Graphics Graphics_create (int resolution);
Graphics Graphics_create_postscriptjob (MelderFile file, int resolution, int spots,
 int paperSize, int rotation, double magnification);
Graphics Graphics_create_epsfile (MelderFile file, int resolution, int spots,
 double xmin, double xmax, double ymin, double ymax, int includeFonts, int useSilipaPS);
Graphics Graphics_create_postscriptprinter (void);
Graphics Graphics_create_screenPrinter (void *display, unsigned long window);
# 48 "../sys/Graphics.h"
Graphics Graphics_create_screen (void *display, unsigned long window, int resolution);



Graphics Graphics_create_xmdrawingarea ( void *drawingArea);

void Graphics_setWsViewport (Any void_me, short x1DC, short x2DC, short y1DC, short y2DC);
void Graphics_setWsWindow (Any void_me, double x1NDC, double x2NDC, double y1NDC, double y2NDC);
void Graphics_inqWsViewport (Any void_me, short *x1DC, short *x2DC, short *y1DC, short *y2DC);
void Graphics_inqWsWindow (Any void_me, double *x1NDC, double *x2NDC, double *y1NDC, double *y2NDC);
void Graphics_clearWs (Any void_me);
void Graphics_flushWs (Any void_me);
void Graphics_updateWs (Any void_me);
void Graphics_DCtoWC (Any void_me, short xDC, short yDC, double *xWC, double *yWC);
void Graphics_WCtoDC (Any void_me, double xWC, double yWC, short *xDC, short *yDC);

typedef struct { double x1NDC, x2NDC, y1NDC, y2NDC; } Graphics_Viewport;
void Graphics_setViewport (Any void_me, double x1NDC, double x2NDC, double y1NDC, double y2NDC);
Graphics_Viewport Graphics_insetViewport (Any void_me, double x1rel, double x2rel, double y1rel, double y2rel);
void Graphics_resetViewport (Any void_me, Graphics_Viewport viewport);
void Graphics_setWindow (Any void_me, double x1, double x2, double y1, double y2);

void Graphics_polyline (Any void_me, long numberOfPoints, float *x, float *y);
void Graphics_text (Any void_me, double x, double y, const char * text);
void Graphics_textRect (Any void_me, double x1, double x2, double y1, double y2, const char *txt);
double Graphics_textWidth (Any void_me, const char *txt);
double Graphics_textWidth_ps (Any void_me, const char *txt, int useSilipaPS);
double Graphics_textWidth_ps_mm (Any void_me, const char *txt, int useSilipaPS);
void Graphics_fillArea (Any void_me, long numberOfPoints, float *x, float *y);
void Graphics_cellArray (Any void_me, float **z, long ix1, long ix2, double x1, double x2,
 long iy1, long iy2, double y1, double y2, double minimum, double maximum);
void Graphics_cellArray8 (Any void_me, unsigned char **z, long ix1, long ix2, double x1, double x2,
 long iy1, long iy2, double y1, double y2, unsigned char minimum, unsigned char maximum);
void Graphics_image (Any void_me, float **z, long ix1, long ix2, double x1, double x2,
 long iy1, long iy2, double y1, double y2, double minimum, double maximum);
void Graphics_image8 (Any void_me, unsigned char **z, long ix1, long ix2, double x1, double x2,
 long iy1, long iy2, double y1, double y2, unsigned char minimum, unsigned char maximum);
void Graphics_line (Any void_me, double x1, double y1, double x2, double y2);
void Graphics_rectangle (Any void_me, double x1, double x2, double y1, double y2);
void Graphics_fillRectangle (Any void_me, double x1, double x2, double y1, double y2);
void Graphics_roundedRectangle (Any void_me, double x1, double x2, double y1, double y2, double r_mm);
void Graphics_fillRoundedRectangle (Any void_me, double x1, double x2, double y1, double y2, double r_mm);
void Graphics_function (Any void_me, float y [], long ix1, long ix2, double x1, double x2);
void Graphics_function16 (Any void_me, short y [], int stagger, long ix1, long ix2, double x1, double x2);

void Graphics_circle (Any void_me, double x, double y, double r);
void Graphics_fillCircle (Any void_me, double x, double y, double r);
void Graphics_circle_mm (Any void_me, double x, double y, double d);
void Graphics_fillCircle_mm (Any void_me, double x, double y, double d);
void Graphics_rectangle_mm (Any void_me, double x, double y, double horizontalSide_mm, double verticalSide_mm);
void Graphics_fillRectangle_mm (Any void_me, double x, double y, double horizontalSide_mm, double verticalSide_mm);
void Graphics_arc (Any void_me, double x, double y, double r, double fromAngle, double toAngle);
void Graphics_fillArc (Any void_me, double x, double y, double r, double fromAngle, double toAngle);
void Graphics_ellipse (Any void_me, double x1, double x2, double y1, double y2);
void Graphics_fillEllipse (Any void_me, double x1, double x2, double y1, double y2);
void Graphics_arrow (Any void_me, double x1, double y1, double x2, double y2);
void Graphics_arcArrow (Any void_me, double x, double y, double r, double fromAngle, double toAngle, int arrowAtStart, int arrowAtEnd);
void Graphics_mark (Any void_me, double x, double y, double size_mm, const char *markString);
void Graphics_button (Any void_me, double x1, double x2, double y1, double y2);
void Graphics_innerRectangle (Any void_me, double x1, double x2, double y1, double y2);

void Graphics_xorOn (Any void_me, int colour);
void Graphics_xorOff (Any void_me);
void Graphics_highlight (Any void_me, double x1, double x2, double y1, double y2);
void Graphics_unhighlight (Any void_me, double x1, double x2, double y1, double y2);
void Graphics_highlight2 (Any void_me, double x1, double x2, double y1, double y2,
 double innerX1, double innerX2, double innerY1, double innerY2);
void Graphics_unhighlight2 (Any void_me, double x1, double x2, double y1, double y2,
 double innerX1, double innerX2, double innerY1, double innerY2);
# 128 "../sys/Graphics.h"
void Graphics_setTextAlignment (Any void_me, int horizontal, int vertical);
void Graphics_setFont (Any void_me, int font);





void Graphics_setFontSize (Any void_me, int height);
void Graphics_setFontStyle (Any void_me, int style);
void Graphics_setItalic (Any void_me, int onoff);
void Graphics_setBold (Any void_me, int onoff);
void Graphics_setCode (Any void_me, int onoff);





void Graphics_setTextRotation (Any void_me, double angle);
void Graphics_setTextRotation_vector (Any void_me, double dx, double dy);
void Graphics_setWrapWidth (Any void_me, double wrapWidth);
void Graphics_setSecondIndent (Any void_me, double indent);
float Graphics_inqTextX (Any void_me);
float Graphics_inqTextY (Any void_me);
typedef struct { float x1, x2, y1, y2; char *name; } Graphics_Link;
int Graphics_getLinks (Graphics_Link **plinks);
void Graphics_setNumberSignIsBold (Any void_me, int isBold);
void Graphics_setPercentSignIsItalic (Any void_me, int isItalic);
void Graphics_setCircumflexIsSuperscript (Any void_me, int isSuperscript);
void Graphics_setUnderscoreIsSubscript (Any void_me, int isSubscript);
void Graphics_setDollarSignIsCode (Any void_me, int isCode);
void Graphics_setAtSignIsLink (Any void_me, int isLink);

void Graphics_setLineType (Any void_me, int lineType);



void Graphics_setLineWidth (Any void_me, double lineWidth);

void Graphics_setColour (Any void_me, int colour);
# 184 "../sys/Graphics.h"
void Graphics_setGrey (Any void_me, double grey);


void Graphics_inqViewport (Any void_me, double *x1NDC, double *x2NDC, double *y1NDC, double *y2NDC);
void Graphics_inqWindow (Any void_me, double *x1WC, double *x2WC, double *y1WC, double *y2WC);
int Graphics_inqFont (Any void_me);
int Graphics_inqFontSize (Any void_me);
int Graphics_inqFontStyle (Any void_me);
int Graphics_inqLineType (Any void_me);
float Graphics_inqLineWidth (Any void_me);
int Graphics_inqColour (Any void_me);

void Graphics_printf (Any void_me, double xWC, double yWC, const char *format, ...);
void Graphics_contour (Any void_me, float **z,
 long ix1, long ix2, double x1WC, double x2WC, long iy1, long iy2, double y1WC, double y2WC, double height);
void Graphics_altitude (Any void_me, float **z,
 long ix1, long ix2, double x1, double x2, long iy1, long iy2, double y1, double y2, int numberOfBorders, float borders []);
void Graphics_grey (Any void_me, float **z,
 long ix1, long ix2, double x1, double x2, long iy1, long iy2, double y1, double y2, int numberOfBorders, float borders []);

void Graphics_surface (Any void_me, float **z, long ix1, long ix2, double x1, double x2,
 long iy1, long iy2, double y1, double y2, double minimum, double maximum, double elevation, double azimuth);

void Graphics_setInner (Any void_me);
void Graphics_unsetInner (Any void_me);
void Graphics_drawInnerBox (Any void_me);
void Graphics_textLeft (Any void_me, int far, const char *text);
void Graphics_textRight (Any void_me, int far, const char *text);
void Graphics_textBottom (Any void_me, int far, const char *text);
void Graphics_textTop (Any void_me, int far, const char *text);
void Graphics_marksLeft (Any void_me, int numberOfMarks, int haveNumbers, int haveTicks, int haveDottedLines);
void Graphics_marksRight (Any void_me, int numberOfMarks, int haveNumbers, int haveTicks, int haveDottedLines);
void Graphics_marksBottom (Any void_me, int numberOfMarks, int haveNumbers, int haveTicks, int haveDottedLines);
void Graphics_marksTop (Any void_me, int numberOfMarks, int haveNumbers, int haveTicks, int haveDottedLines);
void Graphics_marksLeftLogarithmic (Any void_me, int numberOfMarksPerDecade, int haveNumbers, int haveTicks, int haveDottedLines);
void Graphics_marksRightLogarithmic (Any void_me, int numberOfMarksPerDecade, int haveNumbers, int haveTicks, int haveDottedLines);
void Graphics_marksBottomLogarithmic (Any void_me, int numberOfMarksPerDecade, int haveNumbers, int haveTicks, int haveDottedLines);
void Graphics_marksTopLogarithmic (Any void_me, int numberOfMarksPerDecade, int haveNumbers, int haveTicks, int haveDottedLines);
void Graphics_markLeft (Any void_me, double yWC, int hasNumber, int hasTick, int hasDottedLine, const char *text);
void Graphics_markRight (Any void_me, double yWC, int hasNumber, int hasTick, int hasDottedLine, const char *text);
void Graphics_markBottom (Any void_me, double xWC, int hasNumber, int hasTick, int hasDottedLine, const char *text);
void Graphics_markTop (Any void_me, double xWC, int hasNumber, int hasTick, int hasDottedLine, const char *text);
void Graphics_markLeftLogarithmic (Any void_me, double y , int hasNumber, int hasTick, int hasDottedLine, const char *text);
void Graphics_markRightLogarithmic (Any void_me, double y, int hasNumber, int hasTick, int hasDottedLine, const char *text);
void Graphics_markBottomLogarithmic (Any void_me, double x, int hasNumber, int hasTick, int hasDottedLine, const char *text);
void Graphics_markTopLogarithmic (Any void_me, double x, int hasNumber, int hasTick, int hasDottedLine, const char *text);
void Graphics_marksLeftEvery (Any void_me, double units, double distance, int haveNumbers, int haveTicks, int haveDottedLines);
void Graphics_marksRightEvery (Any void_me, double units, double distance, int haveNumbers, int haveTicks, int haveDottedLines);
void Graphics_marksBottomEvery (Any void_me, double units, double distance, int haveNumbers, int haveTicks, int haveDottedLines);
void Graphics_marksTopEvery (Any void_me, double units, double distance, int haveNumbers, int haveTicks, int haveDottedLines);

void *Graphics_x_getGC (Any void_me);

int Graphics_startRecording (Any void_me);
int Graphics_stopRecording (Any void_me);
void Graphics_play (Graphics from, Graphics to);
int Graphics_writeRecordings (Any void_me, FILE *f);
int Graphics_readRecordings (Any void_me, FILE *f);



void Graphics_markGroup (Any void_me);
void Graphics_undoGroup (Any void_me);

double Graphics_dxMMtoWC (Any void_me, double dx_mm);
double Graphics_dyMMtoWC (Any void_me, double dy_mm);
double Graphics_distanceWCtoMM (Any void_me, double x1WC, double y1WC, double x2WC, double y2WC);
double Graphics_dxWCtoMM (Any void_me, double dxWC);
double Graphics_dyWCtoMM (Any void_me, double dyWC);

int Graphics_mouseStillDown (Any void_me);
void Graphics_waitMouseUp (Any void_me);
void Graphics_getMouseLocation (Any void_me, double *xWC, double *yWC);

void Graphics_nextSheetOfPaper (Any void_me);
# 33 "../fon/Sampled.h" 2







typedef struct structSampled *Sampled; typedef struct structSampled_Table *Sampled_Table; struct structSampled_Table { void (* _initialize) (void *table); char *_className; Function_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); int (*getMinimumUnit) (void *klas, long ilevel); int (*getMaximumUnit) (void *klas, long ilevel); const char * (*getUnitText) (void *klas, long ilevel, int unit, unsigned long flags); int (*isUnitLogarithmic) (void *klas, long ilevel, int unit); double (*convertStandardToSpecialUnit) (void *klas, double value, long ilevel, int unit); double (*convertSpecialToStandardUnit) (void *klas, double value, long ilevel, int unit); double (*getValueAtSample) (Any void_me, long isamp, long ilevel, int unit); }; struct structSampled { Sampled_Table methods; char *name; double xmin, xmax; long nx; double dx, x1; }; extern struct structSampled_Table theStructSampled; extern Sampled_Table classSampled;






double Sampled_indexToX (Any void_me, long i);

double Sampled_xToIndex (Any void_me, double x);

long Sampled_xToLowIndex (Any void_me, double x);

long Sampled_xToHighIndex (Any void_me, double x);

long Sampled_xToNearestIndex (Any void_me, double x);

long Sampled_getWindowSamples (Any void_me, double xmin, double xmax, long *ixmin, long *ixmax);

int Sampled_init (Any void_me, double xmin, double xmax, long nx, double dx, double x1);

int Sampled_shortTermAnalysis (Any void_me, double windowDuration, double timeStep,
  long *numberOfFrames, double *firstTime);
# 95 "../fon/Sampled.h"
double Sampled_getValueAtSample (Any void_me, long isamp, long ilevel, int unit);
double Sampled_getValueAtX (Any void_me, double x, long ilevel, int unit, int interpolate);
long Sampled_countDefinedSamples (Any void_me, long ilevel, int unit);
double * Sampled_getSortedValues (Any void_me, long ilevel, int unit, long *numberOfValues);

double Sampled_getQuantile
 (Any void_me, double xmin, double xmax, double quantile, long ilevel, int unit);
double Sampled_getMean
 (Any void_me, double xmin, double xmax, long ilevel, int unit, int interpolate);
double Sampled_getMean_standardUnit
 (Any void_me, double xmin, double xmax, long ilevel, int averagingUnit, int interpolate);
double Sampled_getIntegral
 (Any void_me, double xmin, double xmax, long ilevel, int unit, int interpolate);
double Sampled_getIntegral_standardUnit
 (Any void_me, double xmin, double xmax, long ilevel, int averagingUnit, int interpolate);
double Sampled_getStandardDeviation
 (Any void_me, double xmin, double xmax, long ilevel, int unit, int interpolate);
double Sampled_getStandardDeviation_standardUnit
 (Any void_me, double xmin, double xmax, long ilevel, int averagingUnit, int interpolate);

void Sampled_getMinimumAndX (Any void_me, double xmin, double xmax, long ilevel, int unit, int interpolate,
 double *return_minimum, double *return_xOfMinimum);
double Sampled_getMinimum (Any void_me, double xmin, double xmax, long ilevel, int unit, int interpolate);
double Sampled_getXOfMinimum (Any void_me, double xmin, double xmax, long ilevel, int unit, int interpolate);
void Sampled_getMaximumAndX (Any void_me, double xmin, double xmax, long ilevel, int unit, int interpolate,
 double *return_maximum, double *return_xOfMaximum);
double Sampled_getMaximum (Any void_me, double xmin, double xmax, long ilevel, int unit, int interpolate);
double Sampled_getXOfMaximum (Any void_me, double xmin, double xmax, long ilevel, int unit, int interpolate);

void Sampled_drawInside
 (Any void_me, Graphics g, double xmin, double xmax, double ymin, double ymax, double speckle_mm, long ilevel, int unit);
# 29 "../fon/Matrix.h" 2
# 40 "../fon/Matrix.h"
typedef struct structMatrix *Matrix; typedef struct structMatrix_Table *Matrix_Table; struct structMatrix_Table { void (* _initialize) (void *table); char *_className; Sampled_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); int (*getMinimumUnit) (void *klas, long ilevel); int (*getMaximumUnit) (void *klas, long ilevel); const char * (*getUnitText) (void *klas, long ilevel, int unit, unsigned long flags); int (*isUnitLogarithmic) (void *klas, long ilevel, int unit); double (*convertStandardToSpecialUnit) (void *klas, double value, long ilevel, int unit); double (*convertSpecialToStandardUnit) (void *klas, double value, long ilevel, int unit); double (*getValueAtSample) (Any void_me, long isamp, long ilevel, int unit); }; struct structMatrix { Matrix_Table methods; char *name; double xmin, xmax; long nx; double dx, x1; double ymin, ymax; long ny; double dy, y1; float **z; }; extern struct structMatrix_Table theStructMatrix; extern Matrix_Table classMatrix;

int Matrix_init
 (Any void_me, double xmin, double xmax, long nx, double dx, double x1,
  double ymin, double ymax, long ny, double dy, double y1);

Matrix Matrix_create
 (double xmin, double xmax, long nx, double dx, double x1,
  double ymin, double ymax, long ny, double dy, double y1);
# 70 "../fon/Matrix.h"
Matrix Matrix_createSimple (long numberOfRows, long numberOfColumns);
# 132 "../fon/Matrix.h"
long Matrix_getWindowSamplesX (Any void_me, double xmin, double xmax, long *ixmin, long *ixmax);
# 145 "../fon/Matrix.h"
double Matrix_getValueAtXY (Any void_me, double x, double y);






double Matrix_getSum (Any void_me);

double Matrix_columnToX (Any void_me, double column);

double Matrix_rowToY (Any void_me, double row);

double Matrix_xToColumn (Any void_me, double x);

long Matrix_xToLowColumn (Any void_me, double x);

long Matrix_xToHighColumn (Any void_me, double x);

long Matrix_xToNearestColumn (Any void_me, double x);

double Matrix_yToRow (Any void_me, double y);

long Matrix_yToLowRow (Any void_me, double y);

long Matrix_yToHighRow (Any void_me, double x);

long Matrix_yToNearestRow (Any void_me, double y);

long Matrix_getWindowSamplesY (Any void_me, double ymin, double ymax, long *iymin, long *iymax);

long Matrix_getWindowExtrema (Any void_me, long ixmin, long ixmax, long iymin, long iymax,
 double *minimum, double *maximum);
# 189 "../fon/Matrix.h"
int Matrix_formula (Matrix me, const char *expression, Matrix target);
# 217 "../fon/Matrix.h"
void Matrix_drawRows (Any void_me, Graphics g, double xmin, double xmax, double ymin, double ymax,
 double minimum, double maximum);






void Matrix_drawOneContour (Any void_me, Graphics g, double xmin, double xmax, double ymin, double ymax,
 double height);

void Matrix_drawContours (Any void_me, Graphics g, double xmin, double xmax, double ymin, double ymax,
 double minimum, double maximum);


void Matrix_paintContours (Any void_me, Graphics g, double xmin, double xmax, double ymin, double ymax,
 double minimum, double maximum);


void Matrix_paintImage (Any void_me, Graphics g, double xmin, double xmax, double ymin, double ymax,
 double minimum, double maximum);





void Matrix_paintCells (Any void_me, Graphics g, double xmin, double xmax, double ymin, double ymax,
 double minimum, double maximum);





void Matrix_paintSurface (Any void_me, Graphics g, double xmin, double xmax, double ymin, double ymax,
 double minimum, double maximum, double elevation, double azimuth);





void Matrix_movie (Any void_me, Graphics g);

Matrix Matrix_readFromRawTextFile (MelderFile fs);
Matrix Matrix_readAP (MelderFile fs);
Matrix Matrix_appendRows (Any void_me, Any void_thee);

int Matrix_eigen (Any void_me, Matrix *eigenvectors, Matrix *eigenvalues);
Matrix Matrix_power (Any void_me, long power);

int Matrix_writeToMatrixTextFile (Matrix me, MelderFile file);
int Matrix_writeToHeaderlessSpreadsheetFile (Matrix me, MelderFile file);

void Matrix_scaleAbsoluteExtremum (Any void_me, double scale);
# 28 "../fon/Spectrogram.h" 2







typedef struct structSpectrogram *Spectrogram; typedef struct structSpectrogram_Table *Spectrogram_Table; struct structSpectrogram_Table { void (* _initialize) (void *table); char *_className; Matrix_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); int (*getMinimumUnit) (void *klas, long ilevel); int (*getMaximumUnit) (void *klas, long ilevel); const char * (*getUnitText) (void *klas, long ilevel, int unit, unsigned long flags); int (*isUnitLogarithmic) (void *klas, long ilevel, int unit); double (*convertStandardToSpecialUnit) (void *klas, double value, long ilevel, int unit); double (*convertSpecialToStandardUnit) (void *klas, double value, long ilevel, int unit); double (*getValueAtSample) (Any void_me, long isamp, long ilevel, int unit); }; struct structSpectrogram { Spectrogram_Table methods; char *name; double xmin, xmax; long nx; double dx, x1; double ymin, ymax; long ny; double dy, y1; float **z; }; extern struct structSpectrogram_Table theStructSpectrogram; extern Spectrogram_Table classSpectrogram;
# 50 "../fon/Spectrogram.h"
Any Spectrogram_create (double tmin, double tmax, long nt, double dt, double t1,
     double fmin, double fmax, long nf, double df, double f1);
# 69 "../fon/Spectrogram.h"
void Spectrogram_paintInside (Any void_me, Graphics g,
 double tmin, double tmax, double fmin, double fmax, double maximum, int autoscaling,
 double dynamicRange, double preemphasis, double dynamicCompression);
void Spectrogram_paint (Any void_me, Graphics g,
 double tmin, double tmax, double fmin, double fmax, double maximum, int autoscaling,
 double dynamicRange, double preemphasis, double dynamicCompression,
 int garnish);
# 91 "../fon/Spectrogram.h"
Spectrogram Matrix_to_Spectrogram (Any void_me);






Matrix Spectrogram_to_Matrix (Any void_me);
# 29 "DTW.h" 2





# 1 "../fon/Polygon.h" 1
# 38 "../fon/Polygon.h"
typedef struct structPolygon *Polygon; typedef struct structPolygon_Table *Polygon_Table; struct structPolygon_Table { void (* _initialize) (void *table); char *_className; Data_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); }; struct structPolygon { Polygon_Table methods; char *name; long numberOfPoints; float *x, *y; }; extern struct structPolygon_Table theStructPolygon; extern Polygon_Table classPolygon;

Polygon Polygon_create (long numberOfPoints);
# 56 "../fon/Polygon.h"
void Polygon_randomize (Any void_me);

double Polygon_perimeter (Any void_me);

void Polygon_salesperson (Any void_me, long numberOfIterations);
# 74 "../fon/Polygon.h"
void Polygon_draw (Any void_me, Graphics g, double xmin, double xmax, double ymin, double ymax);

void Polygon_paint (Any void_me, Graphics g, double grey, double xmin, double xmax, double ymin, double ymax);

void Polygon_drawCircles (Any void_me, Graphics g,
 double xmin, double xmax, double ymin, double ymax, double diameter_mm);

void Polygon_paintCircles (Any void_me, Graphics g,
 double xmin, double xmax, double ymin, double ymax, double diameter_mm);

void Polygons_drawConnection (Any void_me, Any void_thee, Graphics g,
 double xmin, double xmax, double ymin, double ymax, int hasArrow, double relativeLength);
# 35 "DTW.h" 2


# 1 "../fon/Pitch.h" 1
# 33 "../fon/Pitch.h"
# 1 "../fon/Pitch_def.h" 1
# 50 "../fon/Pitch_def.h"
typedef struct structPitch_Candidate {

 double frequency;
 double strength;

} *Pitch_Candidate; void Pitch_Candidate_destroy (Pitch_Candidate me); int Pitch_Candidate_copy (Pitch_Candidate me, Pitch_Candidate thee); int Pitch_Candidate_equal (Pitch_Candidate me, Pitch_Candidate thee);




typedef struct structPitch_Frame {
# 71 "../fon/Pitch_def.h"
  float intensity;
  long nCandidates;

 Pitch_Candidate candidate;

} *Pitch_Frame; void Pitch_Frame_destroy (Pitch_Frame me); int Pitch_Frame_copy (Pitch_Frame me, Pitch_Frame thee); int Pitch_Frame_equal (Pitch_Frame me, Pitch_Frame thee);




typedef struct structPitch_Table *Pitch_Table; typedef struct structPitch { Pitch_Table methods; char *name; double xmin, xmax; long nx; double dx, x1;

 double ceiling;
 int maxnCandidates;
 Pitch_Frame frame;

} *Pitch;
# 34 "../fon/Pitch.h" 2

struct structPitch_Table { void (* _initialize) (void *table); char *_className; Sampled_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); int (*getMinimumUnit) (void *klas, long ilevel); int (*getMaximumUnit) (void *klas, long ilevel); const char * (*getUnitText) (void *klas, long ilevel, int unit, unsigned long flags); int (*isUnitLogarithmic) (void *klas, long ilevel, int unit); double (*convertStandardToSpecialUnit) (void *klas, double value, long ilevel, int unit); double (*convertSpecialToStandardUnit) (void *klas, double value, long ilevel, int unit); double (*getValueAtSample) (Any void_me, long isamp, long ilevel, int unit); }; extern struct structPitch_Table theStructPitch; extern Pitch_Table classPitch;

Pitch Pitch_create (double tmin, double tmax, long nt, double dt, double t1,
 double ceiling, int maxnCandidates);
# 61 "../fon/Pitch.h"
int Pitch_Frame_init (Pitch_Frame me, int nCandidates);
# 74 "../fon/Pitch.h"
int Pitch_isVoiced_i (Pitch me, long index);
# 83 "../fon/Pitch.h"
int Pitch_isVoiced_t (Pitch me, double t);
# 113 "../fon/Pitch.h"
double Pitch_getValueAtTime (Pitch me, double time, int unit, int interpolate);
double Pitch_getStrengthAtTime (Pitch me, double time, int unit, int interpolate);

long Pitch_countVoicedFrames (Pitch me);

double Pitch_getMean (Pitch me, double tmin, double tmax, int unit);
double Pitch_getMeanStrength (Pitch me, double tmin, double tmax, int unit);
double Pitch_getQuantile (Pitch me, double tmin, double tmax, double quantile, int unit);
double Pitch_getStandardDeviation (Pitch me, double tmin, double tmax, int unit);
void Pitch_getMaximumAndTime (Pitch me, double tmin, double tmax, int unit, int interpolate,
 double *return_maximum, double *return_timeOfMaximum);
double Pitch_getMaximum (Pitch me, double tmin, double tmax, int unit, int interpolate);
double Pitch_getTimeOfMaximum (Pitch me, double tmin, double tmax, int unit, int interpolate);
void Pitch_getMinimumAndTime (Pitch me, double tmin, double tmax, int unit, int interpolate,
 double *return_minimum, double *return_timeOfMinimum);
double Pitch_getMinimum (Pitch me, double tmin, double tmax, int unit, int interpolate);
double Pitch_getTimeOfMinimum (Pitch me, double tmin, double tmax, int unit, int interpolate);

int Pitch_getMaxnCandidates (Pitch me);




void Pitch_setCeiling (Pitch me, double ceiling);





void Pitch_pathFinder (Pitch me, double silenceThreshold, double voicingThreshold,
 double octaveCost, double octaveJumpCost, double voicedUnvoicedCost,
 double ceiling, int pullFormants);




void Pitch_drawInside (Pitch me, Graphics g, double tmin, double tmax, double fmin, double fmax,
 int speckle, int yscale);
void Pitch_draw (Pitch me, Graphics g, double tmin, double tmax, double fmin, double fmax, int garnish,
 int speckle, int yscale);





void Pitch_difference (Pitch me, Pitch thee);


long Pitch_getMeanAbsSlope_hertz (Pitch me, double *slope);
long Pitch_getMeanAbsSlope_mel (Pitch me, double *slope);
long Pitch_getMeanAbsSlope_semitones (Pitch me, double *slope);
long Pitch_getMeanAbsSlope_erb (Pitch me, double *slope);
long Pitch_getMeanAbsSlope_noOctave (Pitch me, double *slope);
# 175 "../fon/Pitch.h"
Pitch Pitch_killOctaveJumps (Pitch me);







Pitch Pitch_interpolate (Pitch me);



Pitch Pitch_subtractLinearFit (Pitch me, int unit);

Pitch Pitch_smooth (Pitch me, double bandWidth);
# 207 "../fon/Pitch.h"
void Pitch_step (Pitch me, double step, double precision, double tmin, double tmax);
# 218 "../fon/Pitch.h"
int Pitch_formula (Pitch me, const char *formula);
# 38 "DTW.h" 2


# 1 "../fon/DurationTier.h" 1
# 28 "../fon/DurationTier.h"
# 1 "../fon/RealTier.h" 1
# 27 "../fon/RealTier.h"
# 1 "../fon/AnyTier.h" 1
# 28 "../fon/AnyTier.h"
# 1 "../sys/Collection.h" 1
# 54 "../sys/Collection.h"
# 1 "../sys/Simple.h" 1
# 31 "../sys/Simple.h"
# 1 "../sys/Simple_def.h" 1
# 26 "../sys/Simple_def.h"
typedef struct structSimpleInt_Table *SimpleInt_Table; typedef struct structSimpleInt { SimpleInt_Table methods; char *name;
 int number;
} *SimpleInt;



typedef struct structSimpleShort_Table *SimpleShort_Table; typedef struct structSimpleShort { SimpleShort_Table methods; char *name;
 short number;
} *SimpleShort;



typedef struct structSimpleLong_Table *SimpleLong_Table; typedef struct structSimpleLong { SimpleLong_Table methods; char *name;
 long number;
} *SimpleLong;



typedef struct structSimpleFloat_Table *SimpleFloat_Table; typedef struct structSimpleFloat { SimpleFloat_Table methods; char *name;
 float number;
} *SimpleFloat;



typedef struct structSimpleDouble_Table *SimpleDouble_Table; typedef struct structSimpleDouble { SimpleDouble_Table methods; char *name;
 double number;
} *SimpleDouble;



typedef struct structSimpleString_Table *SimpleString_Table; typedef struct structSimpleString { SimpleString_Table methods; char *name;
 char *string;
} *SimpleString;
# 32 "../sys/Simple.h" 2


struct structSimpleInt_Table { void (* _initialize) (void *table); char *_className; Data_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); }; extern struct structSimpleInt_Table theStructSimpleInt; extern SimpleInt_Table classSimpleInt;


struct structSimpleShort_Table { void (* _initialize) (void *table); char *_className; Data_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); }; extern struct structSimpleShort_Table theStructSimpleShort; extern SimpleShort_Table classSimpleShort;


struct structSimpleLong_Table { void (* _initialize) (void *table); char *_className; Data_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); }; extern struct structSimpleLong_Table theStructSimpleLong; extern SimpleLong_Table classSimpleLong;


struct structSimpleFloat_Table { void (* _initialize) (void *table); char *_className; Data_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); }; extern struct structSimpleFloat_Table theStructSimpleFloat; extern SimpleFloat_Table classSimpleFloat;


struct structSimpleDouble_Table { void (* _initialize) (void *table); char *_className; Data_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); }; extern struct structSimpleDouble_Table theStructSimpleDouble; extern SimpleDouble_Table classSimpleDouble;


struct structSimpleString_Table { void (* _initialize) (void *table); char *_className; Data_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); }; extern struct structSimpleString_Table theStructSimpleString; extern SimpleString_Table classSimpleString;

SimpleInt SimpleInt_create (int number);
SimpleShort SimpleShort_create (short number);
SimpleLong SimpleLong_create (long number);
SimpleFloat SimpleFloat_create (float number);
SimpleDouble SimpleDouble_create (double number);
SimpleString SimpleString_create (const char *string);
# 55 "../sys/Collection.h" 2
# 63 "../sys/Collection.h"
typedef struct structCollection *Collection; typedef struct structCollection_Table *Collection_Table; struct structCollection_Table { void (* _initialize) (void *table); char *_className; Data_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); long (*position) (Any void_me, Any data); }; struct structCollection { Collection_Table methods; char *name; void *itemClass; long _capacity, size; Any *item; }; extern struct structCollection_Table theStructCollection; extern Collection_Table classCollection;
# 77 "../sys/Collection.h"
int Collection_init (Any void_me, void *itemClass, long initialCapacity);
Any Collection_create (void *itemClass, long initialCapacity);
# 95 "../sys/Collection.h"
int Collection_addItem (Any void_me, Any item);
# 109 "../sys/Collection.h"
void Collection_removeItem (Any void_me, long position);
# 120 "../sys/Collection.h"
void Collection_undangleItem (Any void_me, Any item);
# 131 "../sys/Collection.h"
Any Collection_subtractItem (Any void_me, long position);
# 144 "../sys/Collection.h"
void Collection_removeAllItems (Any void_me);
# 153 "../sys/Collection.h"
void Collection_shrinkToFit (Any void_me);







Any Collections_merge (Any void_me, Any void_thee);
# 172 "../sys/Collection.h"
int _Collection_insertItem (Any void_me, Any item, long position);
# 186 "../sys/Collection.h"
typedef struct structOrdered *Ordered; typedef struct structOrdered_Table *Ordered_Table; struct structOrdered_Table { void (* _initialize) (void *table); char *_className; Collection_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); long (*position) (Any void_me, Any data); }; struct structOrdered { Ordered_Table methods; char *name; void *itemClass; long _capacity, size; Any *item; }; extern struct structOrdered_Table theStructOrdered; extern Ordered_Table classOrdered;

Any Ordered_create (void);
int Ordered_init (Any void_me, void *itemClass, long initialCapacity);





int Ordered_addItemPos (Any void_me, Any data, long position);
# 209 "../sys/Collection.h"
typedef struct structSorted *Sorted; typedef struct structSorted_Table *Sorted_Table; struct structSorted_Table { void (* _initialize) (void *table); char *_className; Collection_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); long (*position) (Any void_me, Any data); int (*compare) (Any void_me, Any void_thee); }; struct structSorted { Sorted_Table methods; char *name; void *itemClass; long _capacity, size; Any *item; }; extern struct structSorted_Table theStructSorted; extern Sorted_Table classSorted;

int Sorted_init (Any void_me, void *itemClass, long initialCapacity);
# 227 "../sys/Collection.h"
int Sorted_addItem_unsorted (Any void_me, Any data);






void Sorted_sort (Any void_me);







typedef struct structSortedSet *SortedSet; typedef struct structSortedSet_Table *SortedSet_Table; struct structSortedSet_Table { void (* _initialize) (void *table); char *_className; Sorted_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); long (*position) (Any void_me, Any data); int (*compare) (Any void_me, Any void_thee); }; struct structSortedSet { SortedSet_Table methods; char *name; void *itemClass; long _capacity, size; Any *item; }; extern struct structSortedSet_Table theStructSortedSet; extern SortedSet_Table classSortedSet;

int SortedSet_init (Any void_me, void *itemClass, long initialCapacity);







int SortedSet_hasItem (Any void_me, Any item);





typedef struct structSortedSetOfInt *SortedSetOfInt; typedef struct structSortedSetOfInt_Table *SortedSetOfInt_Table; struct structSortedSetOfInt_Table { void (* _initialize) (void *table); char *_className; SortedSet_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); long (*position) (Any void_me, Any data); int (*compare) (Any void_me, Any void_thee); }; struct structSortedSetOfInt { SortedSetOfInt_Table methods; char *name; void *itemClass; long _capacity, size; Any *item; }; extern struct structSortedSetOfInt_Table theStructSortedSetOfInt; extern SortedSetOfInt_Table classSortedSetOfInt;

int SortedSetOfInt_init (Any void_me);
SortedSetOfInt SortedSetOfInt_create (void);





typedef struct structSortedSetOfShort *SortedSetOfShort; typedef struct structSortedSetOfShort_Table *SortedSetOfShort_Table; struct structSortedSetOfShort_Table { void (* _initialize) (void *table); char *_className; SortedSet_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); long (*position) (Any void_me, Any data); int (*compare) (Any void_me, Any void_thee); }; struct structSortedSetOfShort { SortedSetOfShort_Table methods; char *name; void *itemClass; long _capacity, size; Any *item; }; extern struct structSortedSetOfShort_Table theStructSortedSetOfShort; extern SortedSetOfShort_Table classSortedSetOfShort;

int SortedSetOfShort_init (Any void_me);
SortedSetOfShort SortedSetOfShort_create (void);





typedef struct structSortedSetOfLong *SortedSetOfLong; typedef struct structSortedSetOfLong_Table *SortedSetOfLong_Table; struct structSortedSetOfLong_Table { void (* _initialize) (void *table); char *_className; SortedSet_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); long (*position) (Any void_me, Any data); int (*compare) (Any void_me, Any void_thee); }; struct structSortedSetOfLong { SortedSetOfLong_Table methods; char *name; void *itemClass; long _capacity, size; Any *item; }; extern struct structSortedSetOfLong_Table theStructSortedSetOfLong; extern SortedSetOfLong_Table classSortedSetOfLong;

int SortedSetOfLong_init (Any void_me);
SortedSetOfLong SortedSetOfLong_create (void);





typedef struct structSortedSetOfFloat *SortedSetOfFloat; typedef struct structSortedSetOfFloat_Table *SortedSetOfFloat_Table; struct structSortedSetOfFloat_Table { void (* _initialize) (void *table); char *_className; SortedSet_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); long (*position) (Any void_me, Any data); int (*compare) (Any void_me, Any void_thee); }; struct structSortedSetOfFloat { SortedSetOfFloat_Table methods; char *name; void *itemClass; long _capacity, size; Any *item; }; extern struct structSortedSetOfFloat_Table theStructSortedSetOfFloat; extern SortedSetOfFloat_Table classSortedSetOfFloat;

int SortedSetOfFloat_init (Any void_me);
SortedSetOfFloat SortedSetOfFloat_create (void);





typedef struct structSortedSetOfDouble *SortedSetOfDouble; typedef struct structSortedSetOfDouble_Table *SortedSetOfDouble_Table; struct structSortedSetOfDouble_Table { void (* _initialize) (void *table); char *_className; SortedSet_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); long (*position) (Any void_me, Any data); int (*compare) (Any void_me, Any void_thee); }; struct structSortedSetOfDouble { SortedSetOfDouble_Table methods; char *name; void *itemClass; long _capacity, size; Any *item; }; extern struct structSortedSetOfDouble_Table theStructSortedSetOfDouble; extern SortedSetOfDouble_Table classSortedSetOfDouble;

int SortedSetOfDouble_init (Any void_me);
SortedSetOfDouble SortedSetOfDouble_create (void);





typedef struct structSortedSetOfString *SortedSetOfString; typedef struct structSortedSetOfString_Table *SortedSetOfString_Table; struct structSortedSetOfString_Table { void (* _initialize) (void *table); char *_className; SortedSet_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); long (*position) (Any void_me, Any data); int (*compare) (Any void_me, Any void_thee); }; struct structSortedSetOfString { SortedSetOfString_Table methods; char *name; void *itemClass; long _capacity, size; Any *item; }; extern struct structSortedSetOfString_Table theStructSortedSetOfString; extern SortedSetOfString_Table classSortedSetOfString;

int SortedSetOfString_init (Any void_me);
SortedSetOfString SortedSetOfString_create (void);
long SortedSetOfString_lookUp (SortedSetOfString me, const char *string);
int SortedSetOfString_add (SortedSetOfString me, const char *string);






typedef struct structCyclic *Cyclic; typedef struct structCyclic_Table *Cyclic_Table; struct structCyclic_Table { void (* _initialize) (void *table); char *_className; Collection_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); long (*position) (Any void_me, Any data); int (*compare) (Any void_me, Any void_thee); }; struct structCyclic { Cyclic_Table methods; char *name; void *itemClass; long _capacity, size; Any *item; }; extern struct structCyclic_Table theStructCyclic; extern Cyclic_Table classCyclic;

int Cyclic_init (Any void_me, void *itemClass, long initialCapacity);

void Cyclic_unicize (Any void_me);
# 29 "../fon/AnyTier.h" 2


# 1 "../fon/PointProcess.h" 1
# 37 "../fon/PointProcess.h"
typedef struct structPointProcess *PointProcess; typedef struct structPointProcess_Table *PointProcess_Table; struct structPointProcess_Table { void (* _initialize) (void *table); char *_className; Function_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); int (*getMinimumUnit) (void *klas, long ilevel); int (*getMaximumUnit) (void *klas, long ilevel); const char * (*getUnitText) (void *klas, long ilevel, int unit, unsigned long flags); int (*isUnitLogarithmic) (void *klas, long ilevel, int unit); double (*convertStandardToSpecialUnit) (void *klas, double value, long ilevel, int unit); double (*convertSpecialToStandardUnit) (void *klas, double value, long ilevel, int unit); }; struct structPointProcess { PointProcess_Table methods; char *name; double xmin, xmax; long maxnt, nt; double *t; }; extern struct structPointProcess_Table theStructPointProcess; extern PointProcess_Table classPointProcess;

PointProcess PointProcess_create (double startingTime, double finishingTime, long initialMaxnt);
PointProcess PointProcess_createPoissonProcess (double startingTime, double finishingTime, double density);
int PointProcess_init (Any void_me, double startingTime, double finishingTime, long initialMaxnt);
long PointProcess_getLowIndex (PointProcess me, double t);
long PointProcess_getHighIndex (PointProcess me, double t);
long PointProcess_getNearestIndex (PointProcess me, double t);
long PointProcess_getWindowPoints (PointProcess me, double tmin, double tmax, long *imin, long *imax);
int PointProcess_addPoint (PointProcess me, double t);
long PointProcess_findPoint (PointProcess me, double t);
void PointProcess_removePoint (PointProcess me, long index);
void PointProcess_removePointNear (PointProcess me, double t);
void PointProcess_removePoints (PointProcess me, long first, long last);
void PointProcess_removePointsBetween (PointProcess me, double fromTime, double toTime);
void PointProcess_draw (PointProcess me, Graphics g, double fromTime, double toTime, int garnish);
double PointProcess_getInterval (PointProcess me, double t);
PointProcess PointProcesses_union (PointProcess me, PointProcess thee);
PointProcess PointProcesses_intersection (PointProcess me, PointProcess thee);
PointProcess PointProcesses_difference (PointProcess me, PointProcess thee);
int PointProcess_fill (PointProcess me, double tmin, double tmax, double period);
int PointProcess_voice (PointProcess me, double period, double maxT);

long PointProcess_getNumberOfPeriods (PointProcess me, double tmin, double tmax,
 double minimumPeriod, double maximumPeriod, double maximumPeriodFactor);
double PointProcess_getMeanPeriod (PointProcess me, double tmin, double tmax,
 double minimumPeriod, double maximumPeriod, double maximumPeriodFactor);
double PointProcess_getStdevPeriod (PointProcess me, double tmin, double tmax,
 double minimumPeriod, double maximumPeriod, double maximumPeriodFactor);
# 32 "../fon/AnyTier.h" 2


# 1 "../fon/AnyTier_def.h" 1
# 26 "../fon/AnyTier_def.h"
typedef struct structAnyPoint_Table *AnyPoint_Table; typedef struct structAnyPoint { AnyPoint_Table methods; char *name;

 double time;

} *AnyPoint;



typedef struct structAnyTier_Table *AnyTier_Table; typedef struct structAnyTier { AnyTier_Table methods; char *name; double xmin, xmax;

 SortedSetOfDouble points;

} *AnyTier;
# 35 "../fon/AnyTier.h" 2


struct structAnyPoint_Table { void (* _initialize) (void *table); char *_className; Data_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); }; extern struct structAnyPoint_Table theStructAnyPoint; extern AnyPoint_Table classAnyPoint;


struct structAnyTier_Table { void (* _initialize) (void *table); char *_className; Function_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); int (*getMinimumUnit) (void *klas, long ilevel); int (*getMaximumUnit) (void *klas, long ilevel); const char * (*getUnitText) (void *klas, long ilevel, int unit, unsigned long flags); int (*isUnitLogarithmic) (void *klas, long ilevel, int unit); double (*convertStandardToSpecialUnit) (void *klas, double value, long ilevel, int unit); double (*convertSpecialToStandardUnit) (void *klas, double value, long ilevel, int unit); }; extern struct structAnyTier_Table theStructAnyTier; extern AnyTier_Table classAnyTier;

long AnyTier_timeToLowIndex (Any void_me, double time);
long AnyTier_timeToHighIndex (Any void_me, double time);
long AnyTier_getWindowPoints (Any void_me, double tmin, double tmax, long *imin, long *imax);
long AnyTier_timeToNearestIndex (Any void_me, double time);
long AnyTier_hasPoint (Any void_me, double t);
int AnyTier_addPoint (Any void_me, Any point);
void AnyTier_removePoint (Any void_me, long i);
void AnyTier_removePointNear (Any void_me, double time);
void AnyTier_removePointsBetween (Any void_me, double tmin, double tmax);
PointProcess AnyTier_downto_PointProcess (Any void_me);
# 28 "../fon/RealTier.h" 2





# 1 "../fon/TableOfReal.h" 1
# 35 "../fon/TableOfReal.h"
# 1 "../fon/Strings.h" 1
# 29 "../fon/Strings.h"
# 1 "../fon/Strings_def.h" 1
# 27 "../fon/Strings_def.h"
typedef struct structStrings_Table *Strings_Table; typedef struct structStrings { Strings_Table methods; char *name;

 long numberOfStrings;
 char **strings;

} *Strings;
# 30 "../fon/Strings.h" 2


struct structStrings_Table { void (* _initialize) (void *table); char *_className; Data_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); }; extern struct structStrings_Table theStructStrings; extern Strings_Table classStrings;

Strings Strings_createAsFileList (const char *path);
Strings Strings_createAsDirectoryList (const char *path);
Strings Strings_readFromRawTextFile (MelderFile fs);
int Strings_writeToRawTextFile (Strings me, MelderFile fs);

void Strings_randomize (Strings me);
int Strings_genericize (Strings me);
void Strings_sort (Strings me);
# 36 "../fon/TableOfReal.h" 2
# 44 "../fon/TableOfReal.h"
typedef struct structTableOfReal *TableOfReal; typedef struct structTableOfReal_Table *TableOfReal_Table; struct structTableOfReal_Table { void (* _initialize) (void *table); char *_className; Data_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); }; struct structTableOfReal { TableOfReal_Table methods; char *name; long numberOfRows, numberOfColumns; char **rowLabels, **columnLabels; double **data; }; extern struct structTableOfReal_Table theStructTableOfReal; extern TableOfReal_Table classTableOfReal;

int TableOfReal_init (Any void_me, long numberOfRows, long numberOfColumns);
TableOfReal TableOfReal_create (long numberOfRows, long numberOfColumns);
int TableOfReal_removeRow (Any void_me, long irow);
int TableOfReal_removeColumn (Any void_me, long icol);
int TableOfReal_insertRow (Any void_me, long irow);
int TableOfReal_insertColumn (Any void_me, long icol);
void TableOfReal_setRowLabel (Any void_me, long irow, const char *label);
void TableOfReal_setColumnLabel (Any void_me, long icol, const char *label);
long TableOfReal_rowLabelToIndex (Any void_me, const char *label);
long TableOfReal_columnLabelToIndex (Any void_me, const char *label);
double TableOfReal_getColumnMean (Any void_me, long icol);
double TableOfReal_getColumnStdev (Any void_me, long icol);

Matrix TableOfReal_to_Matrix (Any void_me);
TableOfReal Matrix_to_TableOfReal (Any void_me);
int TableOfReal_formula (Any void_me, const char *expression, Any target);
void TableOfReal_drawAsNumbers (Any void_me, Graphics g, long rowmin, long rowmax, int iformat, int precision);
void TableOfReal_drawAsNumbers_if (Any void_me, Graphics g, long rowmin, long rowmax, int iformat, int precision,
 const char *conditionFormula);
void TableOfReal_drawAsSquares (Any void_me, Graphics g, long rowmin, long rowmax,
 long colmin, long colmax, int garnish);
void TableOfReal_drawVerticalLines (Any void_me, Graphics g, long rowmin, long rowmax);
void TableOfReal_drawHorizontalLines (Any void_me, Graphics g, long rowmin, long rowmax);
void TableOfReal_drawLeftAndRightLines (Any void_me, Graphics g, long rowmin, long rowmax);
void TableOfReal_drawTopAndBottomLines (Any void_me, Graphics g, long rowmin, long rowmax);

Any TablesOfReal_append (Any void_me, Any void_thee);
Any TablesOfReal_appendMany (Collection me);
void TableOfReal_sortByLabel (Any void_me, long column1, long column2);
void TableOfReal_sortByColumn (Any void_me, long column1, long column2);

int TableOfReal_writeToHeaderlessSpreadsheetFile (TableOfReal me, MelderFile file);
TableOfReal TableOfReal_readFromHeaderlessSpreadsheetFile (MelderFile file);

TableOfReal TableOfReal_extractRowRanges (Any void_me, const char *ranges);
TableOfReal TableOfReal_extractColumnRanges (Any void_me, const char *ranges);

TableOfReal TableOfReal_extractRowsWhereColumn (Any void_me, long icol, int which_Melder_NUMBER, double criterion);
TableOfReal TableOfReal_extractColumnsWhereRow (Any void_me, long icol, int which_Melder_NUMBER, double criterion);

TableOfReal TableOfReal_extractRowsWhereLabel (Any void_me, int which_Melder_STRING, const char *criterion);
TableOfReal TableOfReal_extractColumnsWhereLabel (Any void_me, int which_Melder_STRING, const char *criterion);

TableOfReal TableOfReal_extractRowsWhere (Any void_me, const char *condition);
TableOfReal TableOfReal_extractColumnsWhere (Any void_me, const char *condition);

Strings TableOfReal_extractRowLabelsAsStrings (Any void_me);
Strings TableOfReal_extractColumnLabelsAsStrings (Any void_me);
# 34 "../fon/RealTier.h" 2


# 1 "../fon/Vector.h" 1
# 35 "../fon/Vector.h"
typedef struct structVector *Vector; typedef struct structVector_Table *Vector_Table; struct structVector_Table { void (* _initialize) (void *table); char *_className; Matrix_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); int (*getMinimumUnit) (void *klas, long ilevel); int (*getMaximumUnit) (void *klas, long ilevel); const char * (*getUnitText) (void *klas, long ilevel, int unit, unsigned long flags); int (*isUnitLogarithmic) (void *klas, long ilevel, int unit); double (*convertStandardToSpecialUnit) (void *klas, double value, long ilevel, int unit); double (*convertSpecialToStandardUnit) (void *klas, double value, long ilevel, int unit); double (*getValueAtSample) (Any void_me, long isamp, long ilevel, int unit); }; struct structVector { Vector_Table methods; char *name; double xmin, xmax; long nx; double dx, x1; double ymin, ymax; long ny; double dy, y1; float **z; }; extern struct structVector_Table theStructVector; extern Vector_Table classVector;
# 45 "../fon/Vector.h"
double Vector_getValueAtX (Any void_me, double x, long channel, int interpolation);

void Vector_getMinimumAndX (Any void_me, double xmin, double xmax, long channel, int interpolation,
 double *return_minimum, double *return_xOfMinimum);
void Vector_getMinimumAndXAndChannel (Any void_me, double xmin, double xmax, int interpolation,
 double *return_minimum, double *return_xOfMinimum, long *return_channelOfMinimum);
void Vector_getMaximumAndX (Any void_me, double xmin, double xmax, long channel, int interpolation,
 double *return_maximum, double *return_xOfMaximum);
void Vector_getMaximumAndXAndChannel (Any void_me, double xmin, double xmax, int interpolation,
 double *return_maximum, double *return_xOfMaximum, long *return_channelOfMaximum);
double Vector_getMinimum (Any void_me, double xmin, double xmax, int interpolation);
double Vector_getMaximum (Any void_me, double xmin, double xmax, int interpolation);
double Vector_getAbsoluteExtremum (Any void_me, double xmin, double xmax, int interpolation);
double Vector_getXOfMinimum (Any void_me, double xmin, double xmax, int interpolation);
double Vector_getXOfMaximum (Any void_me, double xmin, double xmax, int interpolation);
long Vector_getChannelOfMinimum (Any void_me, double xmin, double xmax, int interpolation);
long Vector_getChannelOfMaximum (Any void_me, double xmin, double xmax, int interpolation);

double Vector_getMean (Any void_me, double xmin, double xmax, long channel);
double Vector_getStandardDeviation (Any void_me, double xmin, double xmax, long channel);

void Vector_addScalar (Any void_me, double scalar);
void Vector_subtractMean (Any void_me);
void Vector_multiplyByScalar (Any void_me, double scalar);
void Vector_scale (Any void_me, double scale);

void Vector_draw (Any void_me, Graphics g, double *pxmin, double *pxmax, double *pymin, double *pymax,
 double defaultDy, const char *method);
# 37 "../fon/RealTier.h" 2
# 45 "../fon/RealTier.h"
typedef struct structRealPoint *RealPoint; typedef struct structRealPoint_Table *RealPoint_Table; struct structRealPoint_Table { void (* _initialize) (void *table); char *_className; Data_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); }; struct structRealPoint { RealPoint_Table methods; char *name; double time; double value; }; extern struct structRealPoint_Table theStructRealPoint; extern RealPoint_Table classRealPoint;

RealPoint RealPoint_create (double time, double value);
# 59 "../fon/RealTier.h"
typedef struct structRealTier *RealTier; typedef struct structRealTier_Table *RealTier_Table; struct structRealTier_Table { void (* _initialize) (void *table); char *_className; Function_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); int (*getMinimumUnit) (void *klas, long ilevel); int (*getMaximumUnit) (void *klas, long ilevel); const char * (*getUnitText) (void *klas, long ilevel, int unit, unsigned long flags); int (*isUnitLogarithmic) (void *klas, long ilevel, int unit); double (*convertStandardToSpecialUnit) (void *klas, double value, long ilevel, int unit); double (*convertSpecialToStandardUnit) (void *klas, double value, long ilevel, int unit); }; struct structRealTier { RealTier_Table methods; char *name; double xmin, xmax; SortedSetOfDouble points; }; extern struct structRealTier_Table theStructRealTier; extern RealTier_Table classRealTier;

int RealTier_init (Any void_me, double tmin, double tmax);
RealTier RealTier_create (double tmin, double tmax);







double RealTier_getValueAtIndex (Any void_me, long point);


double RealTier_getValueAtTime (Any void_me, double t);




double RealTier_getMinimumValue (Any void_me);
double RealTier_getMaximumValue (Any void_me);
double RealTier_getArea (Any void_me, double tmin, double tmax);
double RealTier_getMean_curve (Any void_me, double tmin, double tmax);
double RealTier_getMean_points (Any void_me, double tmin, double tmax);
double RealTier_getStandardDeviation_curve (Any void_me, double tmin, double tmax);
double RealTier_getStandardDeviation_points (Any void_me, double tmin, double tmax);

int RealTier_addPoint (Any void_me, double t, double value);
void RealTier_draw (Any void_me, Graphics g, double tmin, double tmax,
 double ymin, double ymax, int garnish, const char *quantity);
TableOfReal RealTier_downto_TableOfReal (Any void_me, const char *timeLabel, const char *valueLabel);

int RealTier_interpolateQuadratically (Any void_me, long numberOfPointsPerParabola, int logarithmically);

RealTier Vector_to_RealTier (Any void_me, long channel);
RealTier Vector_to_RealTier_peaks (Any void_me, long channel);
RealTier Vector_to_RealTier_valleys (Any void_me, long channel);
RealTier PointProcess_upto_RealTier (PointProcess me, double value);

int RealTier_formula (Any void_me, const char *expression, Any void_thee);
void RealTier_multiplyPart (Any void_me, double tmin, double tmax, double factor);
# 29 "../fon/DurationTier.h" 2
# 38 "../fon/DurationTier.h"
typedef struct structDurationTier *DurationTier; typedef struct structDurationTier_Table *DurationTier_Table; struct structDurationTier_Table { void (* _initialize) (void *table); char *_className; RealTier_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); int (*getMinimumUnit) (void *klas, long ilevel); int (*getMaximumUnit) (void *klas, long ilevel); const char * (*getUnitText) (void *klas, long ilevel, int unit, unsigned long flags); int (*isUnitLogarithmic) (void *klas, long ilevel, int unit); double (*convertStandardToSpecialUnit) (void *klas, double value, long ilevel, int unit); double (*convertSpecialToStandardUnit) (void *klas, double value, long ilevel, int unit); }; struct structDurationTier { DurationTier_Table methods; char *name; double xmin, xmax; SortedSetOfDouble points; }; extern struct structDurationTier_Table theStructDurationTier; extern DurationTier_Table classDurationTier;

DurationTier DurationTier_create (double tmin, double tmax);

void DurationTier_draw (DurationTier me, Graphics g, double tmin, double tmax,
 double ymin, double ymax, int garnish);

DurationTier PointProcess_upto_DurationTier (PointProcess me);
# 41 "DTW.h" 2


# 1 "DTW_def.h" 1
# 27 "DTW_def.h"
typedef struct structDTW_Path {
 long x;
 long y;
} *DTW_Path; void DTW_Path_destroy (DTW_Path me); int DTW_Path_copy (DTW_Path me, DTW_Path thee); int DTW_Path_equal (DTW_Path me, DTW_Path thee);



typedef struct structDTW_Path_Index {
 long ibegin;
 long iend;
} *DTW_Path_Index; void DTW_Path_Index_destroy (DTW_Path_Index me); int DTW_Path_Index_copy (DTW_Path_Index me, DTW_Path_Index thee); int DTW_Path_Index_equal (DTW_Path_Index me, DTW_Path_Index thee);



typedef struct structDTW_Path_xytime {
 double x;
 double y;
} *DTW_Path_xytime; void DTW_Path_xytime_destroy (DTW_Path_xytime me); int DTW_Path_xytime_copy (DTW_Path_xytime me, DTW_Path_xytime thee); int DTW_Path_xytime_equal (DTW_Path_xytime me, DTW_Path_xytime thee);



typedef struct structDTW_Path_Query {
 long nx;
 long ny;
 long nxy;
 DTW_Path_xytime xytimes;
 DTW_Path_Index xindex;
 DTW_Path_Index yindex;
} *DTW_Path_Query; void DTW_Path_Query_destroy (DTW_Path_Query me); int DTW_Path_Query_copy (DTW_Path_Query me, DTW_Path_Query thee); int DTW_Path_Query_equal (DTW_Path_Query me, DTW_Path_Query thee);



typedef struct structDTW_Table *DTW_Table; typedef struct structDTW { DTW_Table methods; char *name; double xmin, xmax; long nx; double dx, x1; double ymin, ymax; long ny; double dy, y1; float **z;
 double weightedDistance;
 long pathLength;
 DTW_Path path;

  DTW_Path_Query pathQuery;





} *DTW;
# 44 "DTW.h" 2

struct structDTW_Table { void (* _initialize) (void *table); char *_className; Matrix_Table _parent; long _size; long version; void (*destroy) (Any void_me); void (*info) (Any void_me); void (*nameChanged) (Any void_me); struct structData_Description *description; int (*copy) (Any data_from, Any data_to); int (*equal) (Any data1, Any data2); int (*writeAscii) (Any void_me, FILE *f); int (*readAscii) (Any void_me, FILE *f); int (*writeBinary) (Any void_me, FILE *f); int (*readBinary) (Any void_me, FILE *f); int (*writeCache) (Any void_me, CACHE *f); int (*readCache) (Any void_me, CACHE *f); int (*writeLisp) (Any void_me, FILE *f); int (*readLisp) (Any void_me, FILE *f); double (*getNrow) (Any void_me); double (*getNcol) (Any void_me); double (*getXmin) (Any void_me); double (*getXmax) (Any void_me); double (*getYmin) (Any void_me); double (*getYmax) (Any void_me); double (*getNx) (Any void_me); double (*getNy) (Any void_me); double (*getDx) (Any void_me); double (*getDy) (Any void_me); double (*getX) (Any void_me, long ix); double (*getY) (Any void_me, long iy); char * (*getRowStr) (Any void_me, long irow); char * (*getColStr) (Any void_me, long icol); double (*getCell) (Any void_me); double (*getVector) (Any void_me, long irow, long icol); char * (*getVectorStr) (Any void_me, long icol); double (*getMatrix) (Any void_me, long irow, long icol); char * (*getMatrixStr) (Any void_me, long irow, long icol); double (*getFunction0) (Any void_me); double (*getFunction1) (Any void_me, long irow, double x); double (*getFunction2) (Any void_me, double x, double y); double (*getRowIndex) (Any void_me, const char *rowLabel); double (*getColumnIndex) (Any void_me, const char *columnLabel); int (*getMinimumUnit) (void *klas, long ilevel); int (*getMaximumUnit) (void *klas, long ilevel); const char * (*getUnitText) (void *klas, long ilevel, int unit, unsigned long flags); int (*isUnitLogarithmic) (void *klas, long ilevel, int unit); double (*convertStandardToSpecialUnit) (void *klas, double value, long ilevel, int unit); double (*convertSpecialToStandardUnit) (void *klas, double value, long ilevel, int unit); double (*getValueAtSample) (Any void_me, long isamp, long ilevel, int unit); }; extern struct structDTW_Table theStructDTW; extern DTW_Table classDTW;
# 59 "DTW.h"
Any DTW_create (double tminp, double tmaxp, long ntp, double dtp, double t1p,
 double tminc, double tmaxc, long ntc, double dtc, double t1c);

DTW DTW_swapAxes (DTW me);

int DTW_pathFinder_band (DTW me, double adjustment_window_duration, int adjustment_window_includes_end,
  double costs_x, double costs_y, double costs_xandy);
int DTW_pathFinder_slopes (DTW me, long nsteps_xory, long nsteps_xandy, double costs_x, double costs_y, double costs_xandy);

void DTW_findPath (DTW me, int matchStart, int matchEnd, int slope);
# 87 "DTW.h"
double DTW_getPathY (DTW me, double tx);



long DTW_getMaximumConsecutiveSteps (DTW me, int direction);

void DTW_paintDistances (DTW me, Any g, double xmin, double xmax, double ymin,
 double ymax, double minimum, double maximum, int garnish);

void DTW_drawPath (DTW me, Any g, double xmin, double xmax, double ymin,
 double ymax, int garnish);

void DTW_pathRemoveRedundantNodes (DTW me);
void DTW_pathQueryRecode (DTW me);

void DTW_drawDistancesAlongPath (DTW me, Any g, double xmin, double xmax,
 double dmin, double dmax, int garnish);

Polygon DTW_to_Polygon_band (DTW me, double adjustment_window_duration, int adjustment_window_includes_end);
Polygon DTW_to_Polygon_slopes (DTW me, long nsteps_xory, long nsteps_xandy);

Matrix DTW_distancesToMatrix (DTW me);

DTW Matrices_to_DTW (Any void_me, Any void_thee, int matchStart, int matchEnd, int slope, int metric);

DTW Spectrograms_to_DTW (Spectrogram me, Spectrogram thee, int matchStart,
 int matchEnd, int slope, int metric);

DTW Pitches_to_DTW (Pitch me, Pitch thee, double vuv_costs, double time_weight, int matchStart, int matchEnd, int slope);

DurationTier DTW_to_DurationTier (DTW me);
# 32 "DTW.c" 2
# 1 "../dwsys/NUM2.h" 1
# 30 "../dwsys/NUM2.h"
# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/limits.h" 1 3 4
# 11 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/limits.h" 3 4
# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/syslimits.h" 1 3 4






# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/limits.h" 1 3 4
# 122 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/limits.h" 3 4
# 1 "/usr/include/limits.h" 1 3 4
# 145 "/usr/include/limits.h" 3 4
# 1 "/usr/include/bits/posix1_lim.h" 1 3 4
# 153 "/usr/include/bits/posix1_lim.h" 3 4
# 1 "/usr/include/bits/local_lim.h" 1 3 4
# 36 "/usr/include/bits/local_lim.h" 3 4
# 1 "/usr/include/linux/limits.h" 1 3 4
# 37 "/usr/include/bits/local_lim.h" 2 3 4
# 154 "/usr/include/bits/posix1_lim.h" 2 3 4
# 146 "/usr/include/limits.h" 2 3 4



# 1 "/usr/include/bits/posix2_lim.h" 1 3 4
# 150 "/usr/include/limits.h" 2 3 4
# 123 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/limits.h" 2 3 4
# 8 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/syslimits.h" 2 3 4
# 12 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/limits.h" 2 3 4
# 31 "../dwsys/NUM2.h" 2


# 1 "../dwsys/regularExp.h" 1
# 36 "../dwsys/regularExp.h"
typedef struct regexp {
   char *startp [50];
   char *endp [50];
   char *extentpBW;


   char *extentpFW;


   int top_branch;

   char match_start;
   char anchor;
   char program [1];
} regexp;



typedef enum {
  REDFLT_STANDARD = 0,
  REDFLT_CASE_INSENSITIVE = 1

} RE_DEFAULT_FLAG;



regexp * CompileRE (
   const char *exp,
   char **errorText,
   int defaultFlags);



int ExecRE (
   regexp *prog,
   regexp *cross_regex_backref,




   const char *string,
   const char *end,

   int reverse,
   char prev_char,

   char succ_char,

   const char *delimiters,
   const char *look_behind_to);




void SubstituteRE (
   regexp *prog,
   const char *source,
   char *dest,
   int max);





void SetREDefaultWordDelimiters (
   char *delimiters);



void EnableCountingQuantifier (int is_enabled);
# 34 "../dwsys/NUM2.h" 2




int NUMstrcmp (const char *s1, const char *s2);






int NUMstring_containsPrintableCharacter (char *s);

double *NUMstring_to_numbers (const char *s, long *numbers_found);


int NUMstrings_equal (char **s1, char **s2, long lo, long hi);
int NUMstrings_copyElements (char **from, char**to, long lo, long hi);
void NUMstrings_free (char **s, long lo, long hi);
int NUMstrings_setSequentialNumbering (char **s, long lo, long hi,
 char *precursor, long number, long increment);







char **NUMstrings_copy (char **from, long lo, long hi);

regexp *NUMregexp_compile (const char *regexp);



char *strstr_regexp (const char *string, const char *search_regexp);






char **strs_replace (char **from, long lo, long hi, const char *search,
 const char *replace, int maximumNumberOfReplaces, long *nmatches,
 long *nstringmatches, int use_regexp);
# 91 "../dwsys/NUM2.h"
char *str_replace_literal (char *string, const char *search,
 const char *replace, long maximumNumberOfReplaces, long *nmatches);





char *str_replace_regexp (char *string, regexp *search_compiled,
 const char *replace_regexp, long maximumNumberOfReplaces, long *nmatches);
# 111 "../dwsys/NUM2.h"
void NUMlvector_extrema (long v[], long lo, long hi, double *min, double *max);
void NUMfvector_extrema (float v[], long lo, long hi, double *min, double *max);
void NUMivector_extrema (int v[], long lo, long hi, double *min, double *max);
void NUMdvector_extrema (double v[], long lo, long hi, double *min,
 double *max);
void NUMsvector_extrema (short v[], long lo, long hi, double *min, double *max);






void NUMdmatrix_printMatlabForm (double **m, long nr, long nc, char *name);
# 135 "../dwsys/NUM2.h"
double **NUMdmatrix_transpose (double **m, long nr, long nc);




void NUMdmatrix_extrema (double **x, long rb, long re, long cb, long ce,
 double *min, double *max);
void NUMfmatrix_extrema (float **x, long rb, long re, long cb, long ce,
 double *min, double *max);
void NUMlmatrix_extrema (long **x, long rb, long re, long cb, long ce,
 double *min, double *max);
void NUMimatrix_extrema (int **x, long rb, long re, long cb, long ce,
 double *min, double *max);
void NUMsmatrix_extrema (short **x, long rb, long re, long cb, long ce,
 double *min, double *max);


void NUMlvector_clip (long v[], long lo, long hi, double min, double max);
void NUMfvector_clip (float v[], long lo, long hi, double min, double max);
void NUMivector_clip (int v[], long lo, long hi, double min, double max);
void NUMdvector_clip (double v[], long lo, long hi, double min, double max);
void NUMsvector_clip (short v[], long lo, long hi, double min, double max);





int NUMdmatrix_hasInfinities (double **m, long rb, long re, long cb, long ce);

void NUMfvector_moment2 (float v[], long lo, long hi, double *mean,
 double *variance);

float NUMfvector_normalize1 (float v[], long n);
float NUMfvector_normalize2 (float v[], long n);
float NUMfvector_getNorm1 (const float v[], long n);
float NUMfvector_getNorm2 (const float v[], long n);
double NUMdvector_normalize1 (double v[], long n);
double NUMdvector_normalize2 (double v[], long n);
double NUMdvector_getNorm1 (const double v[], long n);
double NUMdvector_getNorm2 (const double v[], long n);

void NUMcentreRows_d(double **a, long rb, long re, long cb, long ce);



void NUMcentreColumns_d (double **a, long rb, long re, long cb, long ce,
 double *centres);





void NUMdoubleCentre_d (double **a, long rb, long re, long cb, long ce);





void NUMnormalizeRows_d (double **a, long nr, long nc, double norm);

void NUMnormalizeColumns_d (double **a, long nr, long nc, double norm);




void NUMnormalize_d (double **a, long nr, long nc, double norm);





void NUMstandardizeColumns (double **a, long rb, long re, long cb, long ce);

void NUMstandardizeRows (double **a, long rb, long re, long cb, long ce);


void NUMaverageColumns (double **a, long rb, long re, long cb, long ce);


void NUMcolumn_avevar (double **a, long nr, long nc, long icol,
 double *average, double *variance);






void NUMcolumn2_avevar (double **a, long nr, long nc, long icol1, long icol2,
 double *average1, double *variance1, double *average2, double *variance2,
 double *covariance);






int NUMmad_f (float *x, long n, double *location, int wantlocation,
 double *mad, float *work);
int NUMmad_d (double *x, long n, double *location, int wantlocation,
 double *mad, double *work);
# 246 "../dwsys/NUM2.h"
int NUMstatistics_huber_f (float *x, long n, double *location, int wantlocation,
 double *scale, int wantscale, double k, double tol, float *work);
int NUMstatistics_huber_d (double *x, long n, double *location, int wantlocation,
 double *scale, int wantscale, double k, double tol, double *work);
# 259 "../dwsys/NUM2.h"
void NUMmonotoneRegression_d (const double x[], long n, double xs[]);






void NUMsort2_fl (long n, float a[], long b[]);
void NUMsort2_ff (long n, float a[], float b[]);
void NUMsort2_dl (long n, double a[], long b[]);
void NUMsort2_dd (long n, double a[], double b[]);
void NUMsort2_ll (long n, long a[], long b[]);
# 280 "../dwsys/NUM2.h"
void NUMindexx_f (const float a[], long n, long indx[]);
void NUMindexx_d (const double a[], long n, long indx[]);
void NUMindexx_s (char *a[], long n, long indx[]);






void NUMrank_f (long n, float a []);
void NUMrank_d (long n, double a []);





int NUMrankColumns_f (float **m, long rb, long re, long cb, long ce);
int NUMrankColumns_d (double **m, long rb, long re, long cb, long ce);



void NUMhunt_f (float xx[], long n, float x, long *jlo);
void NUMhunt_d (double xx[], long n, double x, long *jlo);







void NUMlocate_f (float *xx, long n, float x, long *index);
void NUMlocate_d (double *xx, long n, double x, long *index);







int NUMjacobi (float **a, long n, float d[], float **v, long *nrot);
# 332 "../dwsys/NUM2.h"
void NUMtred2_f (float **a, long n, float d[], float e[]);
void NUMtred2_d (double **a, long n, double d[], double e[]);







int NUMtqli_f (float d[], float e[], long n, float **z);
int NUMtqli_d (double d[], double e[], long n, double **z);
# 360 "../dwsys/NUM2.h"
int NUMgaussj_d (double **a, long n, double **b, long m);

int NUMgaussj (float **a, long n);






int NUMsvdcmp (double **a, long m, long n, double w[], double **v);
# 378 "../dwsys/NUM2.h"
int NUMsvbksb (double **u, double w[], double **v, long m, long n, double b[], double x[]);
# 388 "../dwsys/NUM2.h"
int NUMludcmp (double **a, long n, long *indx, double *d);
int NUMludcmp_f (float **a, long n, long *indx, float *d);
# 400 "../dwsys/NUM2.h"
int NUMcholeskyDecomposition(double **a, long n, double d[]);




void NUMcholeskySolve (double **a, long n, double d[], double b[], double x[]);




double **NUMcholdc_inverse (double **a, long n, double *d);




int NUMinverse_cholesky (double **a, long n, double *lnd);





int NUMdeterminant_cholesky (double **a, long n, double *lnd);




double NUMmahalanobisDistance_chi (double **l, double *v, double *m, long n);





double NUMtrace (double **a, long n);
double NUMtrace2 (double **a1, double **a2, long n);





void eigenSort_d (double d[], double **v, long n, int sort);

int NUMeigensystem_d (double **a, long n, double **evec, double eval[]);
# 451 "../dwsys/NUM2.h"
int NUMdominantEigenvector_d (double **mns, long n, double *q, double *lambda, double tolerance);
# 465 "../dwsys/NUM2.h"
int NUMdmatrix_into_principalComponents (double **m, long nrows, long ncols,
 long numberOfComponents, double **pc);
# 490 "../dwsys/NUM2.h"
int NUMprincipalComponents_d (double **a, long n, long nComponents, double **pc);





int NUMpseudoInverse_d (double **y, long nr, long nc, double **yinv, double tolerance);







int NUMsolveEquation_d (double **a, long nr, long nc, double *b, double tol, double *x);







int NUMsolveEquations_d (double **a, long nr, long nc, double **b, long ncb, double tol, double **x);







void NUMsolveNonNegativeLeastSquaresRegression (double **a, long nr, long nc,
 double *b, double tol, long itermax, double *x);







int NUMsolveConstrainedLSQuadraticRegression (double **o, const double y[],
 long n, double *alpha, double *gamma);
# 543 "../dwsys/NUM2.h"
int NUMsolveWeaklyConstrainedLinearRegression (double **f, long n, long m, double phi[],
 double alpha, double delta, double t[]);
# 561 "../dwsys/NUM2.h"
int NUMProcrustes (double **x, double **y, long nPoints,
 long nDimensions, double **t, double *v, double *s);
# 572 "../dwsys/NUM2.h"
int NUMnrbis (void (*f)(double x, double *fx, double *dfx, void *closure),
 double x1, double x2, void *closure, double *root);







double NUMridders (double (*f) (double x, void *closure), double x1, double x2, void *closure);






int NUMmspline (double knot[], long nKnots, long order, long i, double x,
 double *y);
# 601 "../dwsys/NUM2.h"
int NUMispline (double aknot[], long nKnots, long order, long i, double x,
 double *y);
# 619 "../dwsys/NUM2.h"
double NUMwilksLambda (double *lambda, long from, long to);





double NUMincompleteBeta (double a, double b, double x);





double NUMbetaContinuedFraction(double a, double b, double x);

double NUMfactln (int n);




double NUMstudentP (double t, long df);





double NUMstudentQ (double t, long df);





double NUMfisherP (double f, long df1, long df2);





double NUMfisherQ (double f, long df1, long df2);





double NUMinvGaussQ (double p);







double NUMinvChiSquareQ (double p, long df);





double NUMinvStudentQ (double p, long df);





double NUMinvFisherQ (double p, long df1, long df2);







double NUMmelToHertz2 (double mel);




double NUMhertzToMel2 (double f);




double NUMmelToHertz3 (double mel);




double NUMhertzToMel3 (double hz);




double NUMbarkToHertz2 (double bark);




double NUMhertzToBark2 (double hz);




double NUMhertzToBark_traunmueller (double hz);




double NUMbarkToHertz_traunmueller (double bark);




double NUMbarkToHertz_schroeder (double bark);




double NUMbarkToHertz_zwickerterhardt (double hz);




double NUMhertzToBark_schroeder (double hz);




double NUMbladonlindblomfilter_amplitude (double zc, double z);
# 761 "../dwsys/NUM2.h"
double NUMsekeyhansonfilter_amplitude (double zc, double z);
# 777 "../dwsys/NUM2.h"
double NUMtriangularfilter_amplitude (double fl, double fc, double fh,
 double f);
# 791 "../dwsys/NUM2.h"
double NUMformantfilter_amplitude (double fc, double bw, double f);







int NUMburg (float x[], long n, float a[], int m, float *xms);






int NUMfmatrix_to_dBs (float **m, long rb, long re, long cb, long ce,
 double ref, double factor, double floor);
# 823 "../dwsys/NUM2.h"
double **NUMcosinesTable_d (long first, long last, long npoints);
# 837 "../dwsys/NUM2.h"
int NUMspline_f (float x[], float y[], long n, float yp1, float ypn,
 float y2[]);
int NUMspline_d (double x[], double y[], long n, double yp1, double ypn,
 double y2[]);
# 853 "../dwsys/NUM2.h"
int NUMsplint_f (float xa[], float ya[], float y2a[], long n, float x,
 float *y);
int NUMsplint_d (double xa[], double ya[], double y2a[], long n, double x,
 double *y);
# 866 "../dwsys/NUM2.h"
int NUMgetOrientationOfPoints (double x1, double y1, double x2, double y2, double x3, double y3);




int NUMdoLineSegmentsIntersect (double x1, double y1, double x2, double y2, double x3, double y3,
 double x4, double y4);


int NUMgetIntersectionsWithRectangle (double x1, double y1, double x2, double y2,
 double xmin, double ymin, double xmax, double ymax, double *xi, double *yi);





void NUMgetEllipseBoundingBox (double a, double b, double cospsi,
 double *width, double *height);
# 904 "../dwsys/NUM2.h"
double NUMminimize_brent (double (*f) (double x, void *closure), double a, double b,
 void *closure, double tol, double *fx);
# 938 "../dwsys/NUM2.h"
struct NUMfft_Table_f
{
  long n;
  float *trigcache;
  long *splitcache;
};

struct NUMfft_Table_d
{
  long n;
  double *trigcache;
  long *splitcache;
};

typedef struct NUMfft_Table_f *NUMfft_Table_f;
typedef struct NUMfft_Table_d *NUMfft_Table_d;

int NUMfft_Table_init_f (NUMfft_Table_f table, long n);
int NUMfft_Table_init_d (NUMfft_Table_d table, long n);




void NUMfft_Table_free_f (NUMfft_Table_f table);
void NUMfft_Table_free_d (NUMfft_Table_d table);

void NUMfft_forward_f (NUMfft_Table_f table, float *data);
void NUMfft_forward_d (NUMfft_Table_d table, double *data);
# 1011 "../dwsys/NUM2.h"
void NUMfft_backward_f (NUMfft_Table_f table, float *data);
void NUMfft_backward_d (NUMfft_Table_d table, double *data);
# 1054 "../dwsys/NUM2.h"
int NUMforwardRealFastFourierTransform_f (float *data, long n);
int NUMforwardRealFastFourierTransform_d (double *data, long n);
# 1069 "../dwsys/NUM2.h"
int NUMreverseRealFastFourierTransform_f (float *data, long n);
int NUMreverseRealFastFourierTransform_d (double *data, long n);
# 1082 "../dwsys/NUM2.h"
int NUMrealft_f (float *data, long n, int direction);
int NUMrealft_d (double *data, long n, int direction);
# 33 "DTW.c" 2

# 1 "../sys/oo_DESTROY.h" 1
# 26 "../sys/oo_DESTROY.h"
# 1 "../sys/oo_undef.h" 1
# 27 "../sys/oo_DESTROY.h" 2
# 35 "DTW.c" 2
# 1 "DTW_def.h" 1
# 27 "DTW_def.h"
void DTW_Path_destroy (DTW_Path me) { (void) me;


}



void DTW_Path_Index_destroy (DTW_Path_Index me) { (void) me;


}



void DTW_Path_xytime_destroy (DTW_Path_xytime me) { (void) me;


}



void DTW_Path_Query_destroy (DTW_Path_Query me) { (void) me;



 if (me -> xytimes) { long i; for (i = 1; i <= me -> nxy; i ++) DTW_Path_xytime_destroy (& me -> xytimes [i]); NUMvector_free (sizeof (struct structDTW_Path_xytime), me -> xytimes, 1); }
 if (me -> xindex) { long i; for (i = 1; i <= me -> nx; i ++) DTW_Path_Index_destroy (& me -> xindex [i]); NUMvector_free (sizeof (struct structDTW_Path_Index), me -> xindex, 1); }
 if (me -> yindex) { long i; for (i = 1; i <= me -> ny; i ++) DTW_Path_Index_destroy (& me -> yindex [i]); NUMvector_free (sizeof (struct structDTW_Path_Index), me -> yindex, 1); }
}



static void classDTW_destroy (Any void_me) { DTW me = (DTW) void_me;


 if (me -> path) { long i; for (i = 1; i <= me -> pathLength; i ++) DTW_Path_destroy (& me -> path [i]); NUMvector_free (sizeof (struct structDTW_Path), me -> path, 1); }

  DTW_Path_Query pathQuery;





classDTW -> _parent -> destroy (me); }
# 36 "DTW.c" 2
# 1 "../sys/oo_COPY.h" 1
# 26 "../sys/oo_COPY.h"
# 1 "../sys/oo_undef.h" 1
# 27 "../sys/oo_COPY.h" 2
# 37 "DTW.c" 2
# 1 "DTW_def.h" 1
# 27 "DTW_def.h"
int DTW_Path_copy (DTW_Path me, DTW_Path thee) {
 thee -> x = me -> x;
 thee -> y = me -> y;
return 1; }



int DTW_Path_Index_copy (DTW_Path_Index me, DTW_Path_Index thee) {
 thee -> ibegin = me -> ibegin;
 thee -> iend = me -> iend;
return 1; }



int DTW_Path_xytime_copy (DTW_Path_xytime me, DTW_Path_xytime thee) {
 thee -> x = me -> x;
 thee -> y = me -> y;
return 1; }



int DTW_Path_Query_copy (DTW_Path_Query me, DTW_Path_Query thee) {
 thee -> nx = me -> nx;
 thee -> ny = me -> ny;
 thee -> nxy = me -> nxy;
 if (me -> xytimes) { long i; if (! (thee -> xytimes = NUMvector (sizeof (struct structDTW_Path_xytime), 1, me -> nxy))) return 0; for (i = 1; i <= me -> nxy; i ++) if (! DTW_Path_xytime_copy (& me -> xytimes [i], & thee -> xytimes [i])) return 0; }
 if (me -> xindex) { long i; if (! (thee -> xindex = NUMvector (sizeof (struct structDTW_Path_Index), 1, me -> nx))) return 0; for (i = 1; i <= me -> nx; i ++) if (! DTW_Path_Index_copy (& me -> xindex [i], & thee -> xindex [i])) return 0; }
 if (me -> yindex) { long i; if (! (thee -> yindex = NUMvector (sizeof (struct structDTW_Path_Index), 1, me -> ny))) return 0; for (i = 1; i <= me -> ny; i ++) if (! DTW_Path_Index_copy (& me -> yindex [i], & thee -> yindex [i])) return 0; }
return 1; }



static int classDTW_copy (Any void_me, Any void_thee) { DTW me = (DTW) void_me; DTW thee = (DTW) void_thee; if (! classDTW -> _parent -> copy (me, thee)) return 0;
 thee -> weightedDistance = me -> weightedDistance;
 thee -> pathLength = me -> pathLength;
 if (me -> path) { long i; if (! (thee -> path = NUMvector (sizeof (struct structDTW_Path), 1, me -> pathLength))) return 0; for (i = 1; i <= me -> pathLength; i ++) if (! DTW_Path_copy (& me -> path [i], & thee -> path [i])) return 0; }

  DTW_Path_Query pathQuery;





return 1; }
# 38 "DTW.c" 2
# 1 "../sys/oo_EQUAL.h" 1
# 27 "../sys/oo_EQUAL.h"
# 1 "../sys/oo_undef.h" 1
# 28 "../sys/oo_EQUAL.h" 2
# 39 "DTW.c" 2
# 1 "DTW_def.h" 1
# 27 "DTW_def.h"
int DTW_Path_equal (DTW_Path me, DTW_Path thee) {
 if (me -> x != thee -> x) return 0;
 if (me -> y != thee -> y) return 0;
return 1; }



int DTW_Path_Index_equal (DTW_Path_Index me, DTW_Path_Index thee) {
 if (me -> ibegin != thee -> ibegin) return 0;
 if (me -> iend != thee -> iend) return 0;
return 1; }



int DTW_Path_xytime_equal (DTW_Path_xytime me, DTW_Path_xytime thee) {
 if (me -> x != thee -> x) return 0;
 if (me -> y != thee -> y) return 0;
return 1; }



int DTW_Path_Query_equal (DTW_Path_Query me, DTW_Path_Query thee) {
 if (me -> nx != thee -> nx) return 0;
 if (me -> ny != thee -> ny) return 0;
 if (me -> nxy != thee -> nxy) return 0;
 if (! me -> xytimes != ! thee -> xytimes) return 0; if (me -> xytimes) { long i; for (i = 1; i <= me -> nxy; i ++) if (! DTW_Path_xytime_equal (& me -> xytimes [i], & thee -> xytimes [i])) return 0; }
 if (! me -> xindex != ! thee -> xindex) return 0; if (me -> xindex) { long i; for (i = 1; i <= me -> nx; i ++) if (! DTW_Path_Index_equal (& me -> xindex [i], & thee -> xindex [i])) return 0; }
 if (! me -> yindex != ! thee -> yindex) return 0; if (me -> yindex) { long i; for (i = 1; i <= me -> ny; i ++) if (! DTW_Path_Index_equal (& me -> yindex [i], & thee -> yindex [i])) return 0; }
return 1; }



static int classDTW_equal (Any void_me, Any void_thee) { DTW me = (DTW) void_me; DTW thee = (DTW) void_thee; if (! classDTW -> _parent -> equal (me, thee)) return 0;
 if (me -> weightedDistance != thee -> weightedDistance) return 0;
 if (me -> pathLength != thee -> pathLength) return 0;
 if (! me -> path != ! thee -> path) return 0; if (me -> path) { long i; for (i = 1; i <= me -> pathLength; i ++) if (! DTW_Path_equal (& me -> path [i], & thee -> path [i])) return 0; }

  DTW_Path_Query pathQuery;





return 1; }
# 40 "DTW.c" 2
# 1 "../sys/oo_WRITE_ASCII.h" 1
# 26 "../sys/oo_WRITE_ASCII.h"
# 1 "../sys/oo_undef.h" 1
# 27 "../sys/oo_WRITE_ASCII.h" 2
# 41 "DTW.c" 2
# 1 "DTW_def.h" 1
# 27 "DTW_def.h"
static int DTW_Path_writeAscii (DTW_Path me, FILE *f) {
 ascputi4 (me -> x, f, "x");
 ascputi4 (me -> y, f, "y");
return 1; }



static int DTW_Path_Index_writeAscii (DTW_Path_Index me, FILE *f) {
 ascputi4 (me -> ibegin, f, "ibegin");
 ascputi4 (me -> iend, f, "iend");
return 1; }



static int DTW_Path_xytime_writeAscii (DTW_Path_xytime me, FILE *f) {
 ascputr8 (me -> x, f, "x");
 ascputr8 (me -> y, f, "y");
return 1; }



static int DTW_Path_Query_writeAscii (DTW_Path_Query me, FILE *f) {
 ascputi4 (me -> nx, f, "nx");
 ascputi4 (me -> ny, f, "ny");
 ascputi4 (me -> nxy, f, "nxy");
 ascputintro (f, "xytimes" " []: %s", me -> nxy >= 1 ? "" : "(empty)"); { long i; for (i = 1; i <= me -> nxy; i ++) { ascputintro (f, "xytimes" " [%ld]:", i); DTW_Path_xytime_writeAscii (& me -> xytimes [i], f); ascexdent (); } } ascexdent ();
 ascputintro (f, "xindex" " []: %s", me -> nx >= 1 ? "" : "(empty)"); { long i; for (i = 1; i <= me -> nx; i ++) { ascputintro (f, "xindex" " [%ld]:", i); DTW_Path_Index_writeAscii (& me -> xindex [i], f); ascexdent (); } } ascexdent ();
 ascputintro (f, "yindex" " []: %s", me -> ny >= 1 ? "" : "(empty)"); { long i; for (i = 1; i <= me -> ny; i ++) { ascputintro (f, "yindex" " [%ld]:", i); DTW_Path_Index_writeAscii (& me -> yindex [i], f); ascexdent (); } } ascexdent ();
return 1; }



static int classDTW_writeAscii (Any void_me, FILE *f) { DTW me = (DTW) void_me; if (! classDTW -> _parent -> writeAscii (me, f)) return 0;
 ascputr8 (me -> weightedDistance, f, "weightedDistance");
 ascputi4 (me -> pathLength, f, "pathLength");
 ascputintro (f, "path" " []: %s", me -> pathLength >= 1 ? "" : "(empty)"); { long i; for (i = 1; i <= me -> pathLength; i ++) { ascputintro (f, "path" " [%ld]:", i); DTW_Path_writeAscii (& me -> path [i], f); ascexdent (); } } ascexdent ();







return 1; }
# 42 "DTW.c" 2
# 1 "../sys/oo_WRITE_BINARY.h" 1
# 26 "../sys/oo_WRITE_BINARY.h"
# 1 "../sys/oo_undef.h" 1
# 27 "../sys/oo_WRITE_BINARY.h" 2
# 43 "DTW.c" 2
# 1 "DTW_def.h" 1
# 27 "DTW_def.h"
static int DTW_Path_writeBinary (DTW_Path me, FILE *f) {
 binputi4 (me -> x, f);
 binputi4 (me -> y, f);
return 1; }



static int DTW_Path_Index_writeBinary (DTW_Path_Index me, FILE *f) {
 binputi4 (me -> ibegin, f);
 binputi4 (me -> iend, f);
return 1; }



static int DTW_Path_xytime_writeBinary (DTW_Path_xytime me, FILE *f) {
 binputr8 (me -> x, f);
 binputr8 (me -> y, f);
return 1; }



static int DTW_Path_Query_writeBinary (DTW_Path_Query me, FILE *f) {
 binputi4 (me -> nx, f);
 binputi4 (me -> ny, f);
 binputi4 (me -> nxy, f);
 if (me -> nxy >= 1) { long i; for (i = 1; i <= me -> nxy; i ++) DTW_Path_xytime_writeBinary (& me -> xytimes [i], f); }
 if (me -> nx >= 1) { long i; for (i = 1; i <= me -> nx; i ++) DTW_Path_Index_writeBinary (& me -> xindex [i], f); }
 if (me -> ny >= 1) { long i; for (i = 1; i <= me -> ny; i ++) DTW_Path_Index_writeBinary (& me -> yindex [i], f); }
return 1; }



static int classDTW_writeBinary (Any void_me, FILE *f) { DTW me = (DTW) void_me; if (! classDTW -> _parent -> writeBinary (me, f)) return 0;
 binputr8 (me -> weightedDistance, f);
 binputi4 (me -> pathLength, f);
 if (me -> pathLength >= 1) { long i; for (i = 1; i <= me -> pathLength; i ++) DTW_Path_writeBinary (& me -> path [i], f); }







return 1; }
# 44 "DTW.c" 2
# 1 "../sys/oo_READ_ASCII.h" 1
# 28 "../sys/oo_READ_ASCII.h"
# 1 "../sys/oo_undef.h" 1
# 29 "../sys/oo_READ_ASCII.h" 2
# 45 "DTW.c" 2
# 1 "DTW_def.h" 1
# 27 "DTW_def.h"
static int DTW_Path_readAscii (DTW_Path me, FILE *f) { int localVersion = Thing_version; (void) localVersion;
 me -> x = ascgeti4 (f); if (Melder_hasError ()) return Melder_error ("Trying to read \"%s\".", "x");
 me -> y = ascgeti4 (f); if (Melder_hasError ()) return Melder_error ("Trying to read \"%s\".", "y");
return 1; }



static int DTW_Path_Index_readAscii (DTW_Path_Index me, FILE *f) { int localVersion = Thing_version; (void) localVersion;
 me -> ibegin = ascgeti4 (f); if (Melder_hasError ()) return Melder_error ("Trying to read \"%s\".", "ibegin");
 me -> iend = ascgeti4 (f); if (Melder_hasError ()) return Melder_error ("Trying to read \"%s\".", "iend");
return 1; }



static int DTW_Path_xytime_readAscii (DTW_Path_xytime me, FILE *f) { int localVersion = Thing_version; (void) localVersion;
 me -> x = ascgetr8 (f); if (Melder_hasError ()) return Melder_error ("Trying to read \"%s\".", "x");
 me -> y = ascgetr8 (f); if (Melder_hasError ()) return Melder_error ("Trying to read \"%s\".", "y");
return 1; }



static int DTW_Path_Query_readAscii (DTW_Path_Query me, FILE *f) { int localVersion = Thing_version; (void) localVersion;
 me -> nx = ascgeti4 (f); if (Melder_hasError ()) return Melder_error ("Trying to read \"%s\".", "nx");
 me -> ny = ascgeti4 (f); if (Melder_hasError ()) return Melder_error ("Trying to read \"%s\".", "ny");
 me -> nxy = ascgeti4 (f); if (Melder_hasError ()) return Melder_error ("Trying to read \"%s\".", "nxy");
 if (me -> nxy >= 1) { long i; if (! (me -> xytimes = NUMvector (sizeof (struct structDTW_Path_xytime), 1, me -> nxy))) return 0; for (i = 1; i <= me -> nxy; i ++) if (! DTW_Path_xytime_readAscii (& me -> xytimes [i], f)) return 0; }
 if (me -> nx >= 1) { long i; if (! (me -> xindex = NUMvector (sizeof (struct structDTW_Path_Index), 1, me -> nx))) return 0; for (i = 1; i <= me -> nx; i ++) if (! DTW_Path_Index_readAscii (& me -> xindex [i], f)) return 0; }
 if (me -> ny >= 1) { long i; if (! (me -> yindex = NUMvector (sizeof (struct structDTW_Path_Index), 1, me -> ny))) return 0; for (i = 1; i <= me -> ny; i ++) if (! DTW_Path_Index_readAscii (& me -> yindex [i], f)) return 0; }
return 1; }



static int classDTW_readAscii (Any void_me, FILE *f) { DTW me = (DTW) void_me; int localVersion = Thing_version; (void) localVersion; if (localVersion > me -> methods -> version) return Melder_error ("The format of this file is too new. Download a newer version of Praat."); if (! classDTW -> _parent -> readAscii (me, f)) return 0;
 me -> weightedDistance = ascgetr8 (f); if (Melder_hasError ()) return Melder_error ("Trying to read \"%s\".", "weightedDistance");
 me -> pathLength = ascgeti4 (f); if (Melder_hasError ()) return Melder_error ("Trying to read \"%s\".", "pathLength");
 if (me -> pathLength >= 1) { long i; if (! (me -> path = NUMvector (sizeof (struct structDTW_Path), 1, me -> pathLength))) return 0; for (i = 1; i <= me -> pathLength; i ++) if (! DTW_Path_readAscii (& me -> path [i], f)) return 0; }




  DTW_pathRemoveRedundantNodes (me);
  DTW_pathQueryRecode (me);

return 1; }
# 46 "DTW.c" 2
# 1 "../sys/oo_READ_BINARY.h" 1
# 27 "../sys/oo_READ_BINARY.h"
# 1 "../sys/oo_undef.h" 1
# 28 "../sys/oo_READ_BINARY.h" 2
# 47 "DTW.c" 2
# 1 "DTW_def.h" 1
# 27 "DTW_def.h"
static int DTW_Path_readBinary (DTW_Path me, FILE *f) { int localVersion = Thing_version; (void) localVersion;
 me -> x = bingeti4 (f);
 me -> y = bingeti4 (f);
return 1; }



static int DTW_Path_Index_readBinary (DTW_Path_Index me, FILE *f) { int localVersion = Thing_version; (void) localVersion;
 me -> ibegin = bingeti4 (f);
 me -> iend = bingeti4 (f);
return 1; }



static int DTW_Path_xytime_readBinary (DTW_Path_xytime me, FILE *f) { int localVersion = Thing_version; (void) localVersion;
 me -> x = bingetr8 (f);
 me -> y = bingetr8 (f);
return 1; }



static int DTW_Path_Query_readBinary (DTW_Path_Query me, FILE *f) { int localVersion = Thing_version; (void) localVersion;
 me -> nx = bingeti4 (f);
 me -> ny = bingeti4 (f);
 me -> nxy = bingeti4 (f);
 if (me -> nxy >= 1) { long i; if (! (me -> xytimes = NUMvector (sizeof (struct structDTW_Path_xytime), 1, me -> nxy))) return 0; for (i = 1; i <= me -> nxy; i ++) if (! DTW_Path_xytime_readBinary (& me -> xytimes [i], f)) return 0; }
 if (me -> nx >= 1) { long i; if (! (me -> xindex = NUMvector (sizeof (struct structDTW_Path_Index), 1, me -> nx))) return 0; for (i = 1; i <= me -> nx; i ++) if (! DTW_Path_Index_readBinary (& me -> xindex [i], f)) return 0; }
 if (me -> ny >= 1) { long i; if (! (me -> yindex = NUMvector (sizeof (struct structDTW_Path_Index), 1, me -> ny))) return 0; for (i = 1; i <= me -> ny; i ++) if (! DTW_Path_Index_readBinary (& me -> yindex [i], f)) return 0; }
return 1; }



static int classDTW_readBinary (Any void_me, FILE *f) { DTW me = (DTW) void_me; int localVersion = Thing_version; (void) localVersion; if (localVersion > me -> methods -> version) return Melder_error ("The format of this file is too new. Download a newer version of Praat."); if (! classDTW -> _parent -> readBinary (me, f)) return 0;
 me -> weightedDistance = bingetr8 (f);
 me -> pathLength = bingeti4 (f);
 if (me -> pathLength >= 1) { long i; if (! (me -> path = NUMvector (sizeof (struct structDTW_Path), 1, me -> pathLength))) return 0; for (i = 1; i <= me -> pathLength; i ++) if (! DTW_Path_readBinary (& me -> path [i], f)) return 0; }




  DTW_pathRemoveRedundantNodes (me);
  DTW_pathQueryRecode (me);

return 1; }
# 48 "DTW.c" 2
# 1 "../sys/oo_DESCRIPTION.h" 1
# 26 "../sys/oo_DESCRIPTION.h"
# 1 "../sys/oo_undef.h" 1
# 27 "../sys/oo_DESCRIPTION.h" 2
# 49 "DTW.c" 2
# 1 "DTW_def.h" 1
# 27 "DTW_def.h"
static struct structData_Description DTW_Path_description [] = {
 { "x", 4, (int) & ((DTW_Path) 0) -> x, sizeof (long) },
 { "y", 4, (int) & ((DTW_Path) 0) -> y, sizeof (long) },
{ 0 } };



static struct structData_Description DTW_Path_Index_description [] = {
 { "ibegin", 4, (int) & ((DTW_Path_Index) 0) -> ibegin, sizeof (long) },
 { "iend", 4, (int) & ((DTW_Path_Index) 0) -> iend, sizeof (long) },
{ 0 } };



static struct structData_Description DTW_Path_xytime_description [] = {
 { "x", 10, (int) & ((DTW_Path_xytime) 0) -> x, sizeof (double) },
 { "y", 10, (int) & ((DTW_Path_xytime) 0) -> y, sizeof (double) },
{ 0 } };



static struct structData_Description DTW_Path_Query_description [] = {
 { "nx", 4, (int) & ((DTW_Path_Query) 0) -> nx, sizeof (long) },
 { "ny", 4, (int) & ((DTW_Path_Query) 0) -> ny, sizeof (long) },
 { "nxy", 4, (int) & ((DTW_Path_Query) 0) -> nxy, sizeof (long) },
 { "xytimes", 21, (int) & ((DTW_Path_Query) 0) -> xytimes, sizeof (struct structDTW_Path_xytime), "DTW_Path_xytime", DTW_Path_xytime_description, 1, 0, "my nxy" },
 { "xindex", 21, (int) & ((DTW_Path_Query) 0) -> xindex, sizeof (struct structDTW_Path_Index), "DTW_Path_Index", DTW_Path_Index_description, 1, 0, "my nx" },
 { "yindex", 21, (int) & ((DTW_Path_Query) 0) -> yindex, sizeof (struct structDTW_Path_Index), "DTW_Path_Index", DTW_Path_Index_description, 1, 0, "my ny" },
{ 0 } };



static struct structData_Description classDTW_description [] = { { "DTW", 25, 0, sizeof (struct structDTW), "DTW", & theStructMatrix. description },
 { "weightedDistance", 10, (int) & ((DTW) 0) -> weightedDistance, sizeof (double) },
 { "pathLength", 4, (int) & ((DTW) 0) -> pathLength, sizeof (long) },
 { "path", 21, (int) & ((DTW) 0) -> path, sizeof (struct structDTW_Path), "DTW_Path", DTW_Path_description, 1, 0, "my pathLength" },

  DTW_Path_Query pathQuery;





{ 0 } };
# 50 "DTW.c" 2
# 91 "DTW.c"
static int DTW_Path_Query_init (DTW_Path_Query me, long ny, long nx)
{
 ((ny > 0 && nx > 0) ? (void) (0) : (void) _Melder_assert ("ny > 0 && nx > 0", "DTW.c", 93));
 me -> ny = ny;
 me -> nx = nx;
 me -> nxy = 2 * (ny > nx ? ny : nx) + 1;
 if ((me -> xytimes = NUMvector (sizeof (struct structDTW_Path_xytime), 1, me -> nxy)) == ((void *)0)) return 0;
 if ((me -> yindex = NUMvector (sizeof (struct structDTW_Path_Index), 1, me -> ny)) == ((void *)0)) return 0;
 if ((me -> xindex = NUMvector (sizeof (struct structDTW_Path_Index), 1, me -> nx)) == ((void *)0)) return 0;
 return 1;
}

void DTW_Path_recode (DTW me)
{
 DTW_Path_Query thee = me -> pathQuery;
 long j, nxy, nx = 1, ny = 1, ixp = 0, iyp = 0;







 thee -> xytimes[1].x = me -> xmin;
 thee -> xytimes[1].y = me -> ymin;
 thee -> xytimes[2].x = me -> x1 - 0.5 * me -> dx;
 thee -> xytimes[2].y = me -> y1 - 0.5 * me -> dy;

 nxy = 2;
 for (j = 1; j <= me -> pathLength; j++)
 {
  long index, ix = me -> path[j].x, iy = me -> path[j].y;
  double xright = me -> x1 + (ix - 1 + 0.5) * me -> dx;
  double x, y, f, ytop = me -> y1 + (iy - 1 + 0.5) * me -> dy;

  if (iy == iyp)
  {
   nx++;
   if (ny > 1)
   {
    f = (ny - 1) / (nx * ny - 1);
    x = xright - nx * dx + nx * dx * f;
    y = ytop - dy + dy * f;
    index = nxy - 1;
    if (nx == 2)
    {
     index = nxy;
     nxy++;
    }

    thee -> xytimes[index].x = x;
    thee -> xytimes[index].y = y;
   }
  }
  else if (ix == ixp)
  {
   ny++;
   if (nx > 1)
   {
    f = (ny - 1) / (nx * ny - 1);
    x = xright - dx + nx * dx * f;
    y = ytop - ny * dy + dy * f;
    if (ny == 2)
    {
     index = nxy;
     nxy++;
    }

    thee -> xytimes[index].x = x;
    thee -> xytimes[index].y = y;
   }
  }
  else
  {
   if (nx != 1 || ny != 1)
   {
    nxy++;
   }
   nx = ny = 1;
  }

  thee -> xytimes[nxy].x = xright;
  thee -> xytimes[nxy].y = ytop;
  ixp = ix; iyp = iy;
 }
 nxy++;
 thee -> xytimes[nxy].x = me -> xmax;
 thee -> xytimes[nxy].y = me -> ymax;
 ((nxy <= thee -> nxy) ? (void) (0) : (void) _Melder_assert ("nxy <= thy nxy", "DTW.c", 179));
 thee -> nxy = nxy;
}

void DTW_pathRemoveRedundantNodes (DTW me)
{
 long i = 1, j, skip = 0;

 for (j = 2; j <= me -> pathLength; j++)
 {
  if ((me -> path[j].y == me -> path[i].y) || me -> path[j].x == me -> path[i].x)
  {
   skip++;
  }
  else
  {

   if (skip > 0) me -> path[++i] = me -> path[j-1];

   skip = 0;
   if ((me -> path[j].y == me -> path[i].y) || me -> path[j].x == me -> path[i].x)
   {
    skip++;
   }
   else
   {
    me -> path[++i] = me -> path[j];
   }
  }
 }
 if (skip > 0) me -> path[++i] = me -> path[me -> pathLength];
 me -> pathLength = i;
}

static int get_ylimitsFromConstraints (long nsteps_xory, long nsteps_xandy, long nx, long ny, long x, long *ylow, long *yhigh)
{
 long xextension, yextension, nfitsx, restx, nfitsy, resty;
 long i, xp[3], yl[3],yh[3];

 if (nsteps_xandy == 0)
 {
  *ylow = 1; *yhigh = ny + 1;
  return 1;
 }
 else if (nsteps_xory < 2)
 {
  *ylow = *yhigh = x;
  return 1;
 }
 xextension = nsteps_xory + nsteps_xandy - 1;
 yextension = nsteps_xandy + 1 - 1;
 xp[1] = x;
 xp[2] = nx - x + 1;
 for (i = 1; i <= 2; i++)
 {
  nfitsx = (xp[i] - 1) / xextension;
  nfitsy = (xp[i] - 1) / yextension;
  resty = (xp[i] - 1) % yextension;
  resty += nsteps_xory;
  yh[i] = nfitsy * xextension + resty;
  restx = (xp[i] - 1) % xextension;
  restx = restx > 0 && restx > nsteps_xory ? restx - nsteps_xory + 1 : 1;
  yl[i] = nfitsx * yextension + restx;
 }
 yh[0] = yh[2];
 yh[2] = ny - yl[2] + 1;
 yl[2] = ny - yh[0] - 1;



 if (((*ylow = yl[1] - yh[2]) > 0) || ((*ylow = yl[2]- yh[1]) > 0)) return 0;

 *ylow = yl[1] > yl[2] ? yl[1] : yl[2];
 *yhigh = yh[1] < yh[2] ? yh[1] : yh[2];

 return 1;
}

static void get_adjustmentwindow_parameters (DTW me, double adjustment_window_duration, int adjustment_window_includes_end,
 long *r, double *adjustment_window_slope)
{
 double durationx = (me -> xmax - me -> xmin);
 double durationy = (me -> ymax - me -> ymin);
 double slope = durationy / durationx;

 *adjustment_window_slope = slope;


 *adjustment_window_slope = adjustment_window_includes_end ? slope : 1;

 *r = ceil (fabs (adjustment_window_duration) / me -> dx);
}

static void get_ylimitsFromAdjustmentwindow (DTW me, double adjustment_window_duration, int adjustment_window_includes_end,
 long x, long *ylow, long *yhigh)
{
 double dtx, ty, adjustment_window_slope;
 long yscaled, r;

 get_adjustmentwindow_parameters (me, adjustment_window_duration, adjustment_window_includes_end, &r, &adjustment_window_slope);

 dtx = me -> x1 + (x - 1) * me -> dx - me -> xmin;
 ty = me -> ymin + adjustment_window_slope * dtx;
 yscaled = (ty - me -> y1) / me -> dy;

 *yhigh = yscaled + r;
 if (*yhigh > me -> ny) *yhigh = me -> ny;
 *ylow = yscaled - r;
 if (*ylow < 1) *ylow = 1;

 if (*ylow > me -> ny) *ylow = me -> ny + 1;
}

static void info (Any void_me)
{
 DTW me = (DTW) void_me;

 classData -> info (me);
 MelderInfo_writeLine5 ("Domain prototype:", Melder_doubleA (me -> ymin), " to ",
  Melder_doubleA (me -> ymax), " (s).");
 MelderInfo_writeLine5 ("Domain candidate:", Melder_doubleA (me -> xmin), " to ",
  Melder_doubleA (me -> xmax), " (s).");
 MelderInfo_writeLine2 ("Number of frames prototype: ", Melder_integerA (me -> ny));
 MelderInfo_writeLine2 ("Number of frames candidate: ", Melder_integerA (me -> nx));
 MelderInfo_writeLine2 ("Path length (frames): ", Melder_integerA (me -> pathLength));
 MelderInfo_writeLine2 ("Global warped distance: ", Melder_doubleA (me -> weightedDistance));
 if (me -> nx == me -> ny)
 {
  double dd = 0; long i;
  for (i=1; i <= me -> nx; i++)
  {
   dd += me -> z[i][i];
  }
  MelderInfo_writeLine2 ("Distance along diagonal: ", Melder_doubleA (dd / me -> nx));
 }
}

static void _DTW_initialize (void *table); struct structDTW_Table theStructDTW = { _DTW_initialize, "DTW", & theStructMatrix, sizeof (struct structDTW) }; DTW_Table classDTW = & theStructDTW; static void _DTW_initialize (void *table) { DTW_Table us = (DTW_Table) table; if (! classMatrix -> destroy) classMatrix -> _initialize (classMatrix); classMatrix -> _initialize (us);
 us -> destroy = classDTW_destroy;
 us -> equal = classDTW_equal;
 us -> copy = classDTW_copy;
 us -> info = info;
 us -> readAscii = classDTW_readAscii;
 us -> readBinary = classDTW_readBinary;
 us -> writeAscii = classDTW_writeAscii;
 us -> writeBinary = classDTW_writeBinary;
 us -> description = classDTW_description;
}



Any DTW_create (double tminp, double tmaxp, long ntp, double dtp, double t1p,
 double tminc, double tmaxc, long ntc, double dtc, double t1c)
{
 DTW me = (DTW) Thing_new ((void *) classDTW);
 if (me == ((void *)0)) return ((void *)0);
 if (! Matrix_init (me, tminc, tmaxc, ntc, dtc, t1c, tminp, tmaxp, ntp, dtp, t1p)) goto end;
 if ((me -> path = NUMvector (sizeof (struct structDTW_Path), 1, ntc + ntp - 1)) == ((void *)0)) goto end;
 (void) DTW_Path_Query_init (me);
end:
 if (Melder_hasError()) _Thing_forget ((Thing *) & (me));
 return me;
}

DTW DTW_swapAxes (DTW me)
{
 DTW thee;
 long x, y, i;

 thee = DTW_create (me -> xmin, me -> xmax, me -> nx, me -> dx, me -> x1, me -> ymin, me -> ymax, me -> ny, me -> dy, me -> y1);
 if (thee == ((void *)0)) return ((void *)0);

 for (x = 1; x <= me -> nx; x++)
 {
  for (y = 1; y <= me -> ny; y++)
  {
   thee -> z[x][y] = me -> z[y][x];
  }
 }
 thee -> pathLength = me -> pathLength;
 for (i = 1; i <= me -> pathLength; i++)
 {
  thee -> path[i].x = me -> path[i].y;
  thee -> path[i].y = me -> path[i].x;
 }
 return thee;
}

static int DTW_checkAdjustmentWindow (DTW me, char *proc, double adjustment_window_duration, int adjustment_window_includes_end)
{
 double durationx = (me -> xmax - me -> xmin), durationMin = durationx;
 double durationy = (me -> ymax - me -> ymin), durationMax = durationy;

 if (durationx > durationy)
 {
  durationMin = durationy; durationMax = durationx;
 }

 if (! adjustment_window_includes_end && durationMin + adjustment_window_duration < durationMax)
 {
  return Melder_error ("%s: There is a conflict between the chosen parameters.\n "
   "We cannot \'Match end positions\' because the sum of the durations of the shortest \n"
   "object and the adjustment window is shorter than the duration of the longest object and you have not \n"
   "chosen to include the end point in the adjustment window.\n"
   "Suggestions:\n"
   "1. Include end point in adjustment window, or,\n"
   "2. Uncheck \'Match end positions\'.", proc);
 }
 return 1;
}

static int DTW_checkSlopeConstraintParameters (DTW me, char *proc, long nsteps_xory, long nsteps_xandy)
{
 double durationx = (me -> xmax - me -> xmin), durationMin = durationx;
 double durationy = (me -> ymax - me -> ymin), durationMax = durationy;
 double slope = durationy / durationx;

 if (durationx > durationy)
 {
  durationMin = durationy; durationMax = durationx;
 }

 if (nsteps_xory > 0 && nsteps_xandy > 0)
 {

  long ylow, yhigh;

  if (! get_ylimitsFromConstraints (nsteps_xory, nsteps_xandy, me -> nx, me -> ny, 1, &ylow, &yhigh) && ylow > 0)
  {
   double slope_min = slope < 1 ? 1 / slope : slope;
   return Melder_error ("%s: The slope constraints cannot be satisfied.\n"
    "Hint:\n"
    "To follow the the shortest path diagonal, the quotient \'Non-diagonal steps\'/\'Diagonal steps\' is %.4g.\n"
    "",
    proc, slope_min);
  }
 }
 return 1;
}

static int get_ylimits_x (DTW me, int choice, double adjustment_window_duration, int adjustment_window_includes_end,
 long nsteps_xory, long nsteps_xandy, long x, long *ylow, long *yhigh)
{
 if (choice == 1)
 {
  get_ylimitsFromAdjustmentwindow (me, adjustment_window_duration, adjustment_window_includes_end, x, ylow, yhigh);
 }
 else if (choice == 2)
 {
  return get_ylimitsFromConstraints (nsteps_xory, nsteps_xandy, me -> nx, me -> ny, x, ylow, yhigh);
 }
 return 1;
}

static int slope_constraints (long x, long y, long nsteps_x, long nsteps_y, long nsteps_xandy, long **psi)
{
 long i, xm = 0, ym = 0;
 long minsteps_xory = nsteps_x < nsteps_y ? nsteps_x : nsteps_y;


 if (nsteps_xandy <= 0) return 1;



 if (x < nsteps_x && y < nsteps_y) return 1;

 for (i = 1; i <= minsteps_xory + nsteps_xandy; i++)
 {

     if (x > 1 && psi[y][x] == 4)
  {
   xm++;
   if (xm >= nsteps_x) return 0;
   x--;
  }

  else if (y > 1 && psi[y][x] == 6)
  {
   ym++;
   if (ym >= nsteps_y) return 0;
   y--;
  }

  else if (x > 1 && y > 1 && psi[y][x] == 2)
  {
   x--; y--;
  }
  else break;
 }
 return 1;
}





static int _DTW_pathFinder (DTW me, int choice, double adjustment_window_duration, int adjustment_window_includes_end,
 long nsteps_xory, long nsteps_xandy, double costs_x, double costs_y, double costs_xandy)
{
 float **delta = ((void *)0), minimum;
 long xmargin = me -> dx, ymargin = me -> dy, x, y, ylow, yhigh, xpos, ypos, **psi = ((void *)0);
 long pathIndex, numberOfCells = 0, nodirection_assigned = 0;
 long nsteps_x = nsteps_xory, nsteps_y = nsteps_xory;
 int xstart_flexible = 1, xend_flexible = 1, ystart_flexible = 1, yend_flexible = 1;
 int no_slope_constraints = choice != 2 || nsteps_xandy == 0;



 if (((delta = NUMfmatrix_copy (me -> z, 1, me -> ny, 1, me -> nx)) == ((void *)0)) ||
  ((psi = NUMlmatrix (1, me -> ny, 1, me -> nx)) == ((void *)0))) goto end;




 Melder_progress (0.0, "Find path");






 for (x = 1; x <= me -> nx; x++)
 {
  if (! get_ylimits_x (me, choice, adjustment_window_duration, adjustment_window_includes_end,
   nsteps_xory, nsteps_xandy, x, &ylow, &yhigh)) goto end;

  for (y = me -> ny; y > yhigh; y--) psi[y][x] = 1;
  for (y = ylow - 1; y >= 1; y--) psi[y][x] = 1;
  for (y = 1; y <= me -> ny; y++) delta[y][x] = 1e38;

  if (x == 1)
  {
   psi[1][x] = 3;
   delta[1][x] = me -> z[1][x];
   for (y = 2; y <= ylow; y++)
   {
    if (ystart_flexible && ! no_slope_constraints)
    {
     psi[y][x] = 3;
     delta[y][x] = me -> z[y][x];
    }
    else
    {
     psi[y][x] = 6;
     delta[y][x] += delta[y-1][x] + costs_y * me -> z[y][x];
    }
   }
  }
  if (psi[1][x] != 1 && x > 1)
  {
   if (xstart_flexible && ! no_slope_constraints)
   {
    psi[1][x] = 3;
    delta[1][x] = me -> z[1][y];
   }
   else
   {
    psi[1][x] = 4;
    delta[1][x] += delta[1][x-1] + costs_x * me -> z[1][x];
   }
  }
 }

 for (x = 2; x <= me -> nx; x++)
 {
  if (! get_ylimits_x (me, choice, adjustment_window_duration, adjustment_window_includes_end,
   nsteps_xory, nsteps_xandy, x, &ylow, &yhigh)) return Melder_error ("Er");

  if (ylow < 2) ylow = 2;
  if (yhigh > me -> ny) yhigh = me -> ny;
  for (y = ylow; y <= yhigh; y++)
  {
   long direction; float g;

   numberOfCells++;
   minimum = 1e38;
   direction = 0;

   if ((psi[y-1][x-1] != 0 && psi[y-1][x-1] != 1))
   {
    minimum = delta[y-1][x-1] + costs_xandy * me -> z[y][x];
    direction = 2;
   }
   if ((psi[y][x-1] != 0 && psi[y][x-1] != 1) &&
    (no_slope_constraints || slope_constraints (x - 1, y, nsteps_x - 1, nsteps_y, nsteps_xandy, psi)) &&
    (g = delta[y][x-1] + costs_x * me -> z[y][x]) < minimum)
   {
    minimum = g;
    direction = 4;
   }
   if ((psi[y-1][x] != 0 && psi[y-1][x] != 1) &&
    (no_slope_constraints || slope_constraints (x, y - 1, nsteps_x, nsteps_y - 1, nsteps_xandy, psi)) &&
    (g = delta[y-1][x] + costs_y * me -> z[y][x]) < minimum)
   {
    minimum = g;
    direction = 6;
   }

   if (direction == 0)
   {
    nodirection_assigned++;
    if (Melder_debug != 0)
    {
     if (nodirection_assigned == 1) MelderInfo_open ();
     MelderInfo_writeLine4 (Melder_integerA (x), " ", Melder_integerA (y), " (x,y) unreachable.");
    }
   }
   delta[y][x] = minimum;
   psi[y][x] = direction;
  }
  if ((x % 10) == 2 && ! Melder_progress (0.999 * x / me -> nx,
   "Calculate time warp: frame %ld from %ld", x, me -> nx)) goto end;
 }






 if (Melder_debug != 0 && nodirection_assigned > 0)
 {
  MelderInfo_writeLine4 (Melder_integerA (nodirection_assigned), " cells from ", Melder_integerA (numberOfCells), " had no valid direction assigned.");
  MelderInfo_close ();

 }
 minimum = delta[ypos = me -> ny][xpos = me -> nx];
 if (choice == 2)
 {
  xmargin = xend_flexible ? nsteps_xory : 0;
  ymargin = yend_flexible ? nsteps_xory : 0;
 }

 for (y = me -> ny; y > me -> ny - ymargin; y--)
 {
  if (psi[y][me -> nx] == 1) break;
  if (delta[y][me -> nx] < minimum) minimum = delta[ypos = y][me -> nx];
 }

 for (x = me -> nx; x > me -> nx - xmargin; x--)
 {
  if (psi[me -> ny][x] == 1) break;
  if (delta[me -> ny][x] < minimum) minimum = delta[me -> ny][xpos=x];
 }

 pathIndex = me -> nx + me -> ny - 1;
 me -> weightedDistance = minimum / ( me -> nx + me -> ny);
 me -> path[pathIndex].y = y = ypos;
 me -> path[pathIndex].x = x = xpos;





 while (x > 1)
 {
  if (psi[y][x] == 2)
  {
   x--;
   y--;
  }
  else if (psi[y][x] == 4)
  {
   x--;
  }
  else if (psi[y][x] == 6)
  {
   y--;
  }
  else if (psi[y][x] == 3)
  {
   break;
  }
  else
  {
   Melder_error("DTW_pathfinder: Path stops at (x, y) = (%d, %d).", x, y);
   goto end;
  }

  ((pathIndex > 1 && y > 0) ? (void) (0) : (void) _Melder_assert ("pathIndex > 1 && y > 0", "DTW.c", 657));
  me -> path[--pathIndex].x = x;
  me -> path[pathIndex].y = y;
 }





 me -> pathLength = me -> nx + me -> ny - pathIndex;
 if (pathIndex > 1)
 {
  for (x = 1; x <= me -> pathLength; x++)
  {
   me -> path[x] = me -> path[pathIndex++];
  }
 }

end:

 Melder_progress (1.0, ((void *)0));
 NUMfmatrix_free (delta, 1, 1);
 NUMlmatrix_free (psi, 1, 1);
 return ! Melder_hasError();
}

int DTW_pathFinder_band (DTW me, double adjustment_window_duration, int adjustment_window_includes_end,
  double costs_x, double costs_y, double costs_xandy)
{
 return DTW_checkAdjustmentWindow (me, "DTW_pathFinder_band", adjustment_window_duration, adjustment_window_includes_end) &&
  _DTW_pathFinder (me, 1, adjustment_window_duration, adjustment_window_includes_end,
   1, 0, costs_x, costs_y, costs_xandy);
}

int DTW_pathFinder_slopes (DTW me, long nsteps_xory, long nsteps_xandy, double costs_x, double costs_y, double costs_xandy)
{
 return DTW_checkSlopeConstraintParameters (me, "DTW_pathFinder_slopes", nsteps_xory, nsteps_xandy) &&
  _DTW_pathFinder (me, 2, 0.0, 1, nsteps_xory, nsteps_xandy, costs_x, costs_y, costs_xandy);
}

void DTW_findPath (DTW me, int matchStart, int matchEnd, int slope)
{
 long pathIndex = me -> nx + me -> ny - 1;
 long i, j, ipos = 0, **psi = ((void *)0);
 float **delta = ((void *)0), minimum;
 float slopeConstraint[5] = { 1e38, 1e38, 3, 2, 1.5 } ;
 float relDuration = (me -> ymax - me -> ymin) / (me -> xmax - me -> xmin);

 if (slope < 1 || slope > 4) Melder_error ("DTW_findPath: Invalid slope constraint.");

 if (relDuration < 1)
 {
  relDuration = 1 / relDuration;
 }

 if (relDuration > slopeConstraint[slope])
 {
  Melder_warning ("DTW_findPath: There is a conflict between the chosen slope constraint and the relative  duration.\n "
  "The duration ratio of the longest and the shortest object is %.17g. This implies that the largest slope in the \n"
  "constraint must have a value greater or equal to this ratio.", relDuration);
 }
 if (((delta = NUMfmatrix_copy (me -> z, 1, me -> ny, 1, me -> nx)) == ((void *)0)) ||
  ((psi = NUMlmatrix (1, me -> ny, 1, me -> nx)) == ((void *)0))) goto end;




 Melder_progress (0.0, "Find path");
 if (matchStart)
 {
  for (i = 2; i <= me -> ny; i++)
  {
   delta[i][1] = 1e38;
   psi[i][1] = 3;
  }
 }
 for (j = 2; j <= me -> nx; j++)
 {
# 744 "DTW.c"
  delta[1][j] = delta[1][j-1] + me -> z[1][j];
  psi[1][j] = 4;
  for (i = 2; i <= me -> ny; i++)
  {
   long direction = 2;
   float g;

   minimum = delta[i-1][j-1] + 2 * me -> z[i][j];

   switch (slope) {
   case 1:
s1: {
    if ((g = delta[i][j-1] + me -> z[i][j]) < minimum)
    {
     minimum = g;
     direction = 4;
    }
    if ((g = delta[i-1][j] + me -> z[i][j]) < minimum)
    {
     minimum = g;
     direction = 6;
    }
   }
   break;





   case 2:
         {
    if (i < 4 || j < 4) goto s1;

    if (psi[i][j-1] == 4 &&
     psi[i][j-2] == 2 &&
     (g = delta[i-1][j-3] + 2 * me -> z[i][j-2] + me -> z[i][j-1] +
      me -> z[i][j]) < minimum)
    {
     minimum = g;
     direction = 4;
    }

    if (psi[i][j-1] == 2 &&
     (g = delta[i-1][j-2] + 2 * me -> z[i][j-1] + me -> z[i][j]) <
       minimum)
    {
     minimum = g;
     direction = 4;
    }

    if (psi[i-1][j] == 2 &&
     (g = delta[i-2][j-1] + 2 * me -> z[i-1][j] + me -> z[i][j]) <
      minimum)
    {
     minimum = g;
     direction = 6;
    }

    if (psi[i-1][j] == 6 &&
     psi[i-2][j] == 2 &&
     (g = delta[i-3][j-1] + 2 * me -> z[i-2][j] + me -> z[i-1][j] +
      me -> z[i][j]) < minimum)
    {
     minimum = g;
     direction = 6;
    }
   }
   break;





   case 3:
s3: {
    if (i < 3 || j < 3) goto s1;

    if (psi[i][j-1] == 2 &&
     (g = delta[i-1][j-2] + 2 * me -> z[i][j-1] + me -> z[i][j]) <
      minimum)
    {
     minimum = g;
     direction = 4;
    }

    if (psi[i-1][j] == 2 &&
     (g = delta[i-2][j-1] + 2 * me -> z[i-1][j] + me -> z[i][j]) <
      minimum)
    {
     minimum = g;
     direction = 6;
    }
   }
   break;





   case 4:
         {
    if (j > 3 && i > 2)
    {
     if (psi[i][j-1] == 2 &&
      psi[i-1][j-2] == 2 &&
      (g = delta[i-2][j-3] + 2 * me -> z[i-1][j-2] +
       2 * me -> z[i][j-1] + me -> z[i][j]) < minimum)
     {
      minimum = g;
      direction = 4;
     }

     if (psi[i-1][j] == 2 &&
      psi[i-2][j-1] == 2 &&
      (g = delta[i-3][j-2] + 2 * me -> z[i-2][j-1] +
       2 * me -> z[i-1][j] + me -> z[i][j]) < minimum)
     {
      minimum = g;
      direction = 6;
     }
    }
    else goto s3;
   }
   break;
   default:
   break;
   }

   psi[i][j] = direction;
   delta[i][j] = minimum;
  }
  if ((j % 10) == 2 && ! Melder_progress (0.999 * j / me -> nx,
   "Calculate time warp: frame %ld from %ld", j, me -> nx)) goto end;
 }





 minimum = delta[ipos = me -> ny][me -> nx];
 if (! matchEnd)
 {
  for (i = me -> ny - 1; i > 0; i--)
  {
   if (delta[i][me -> nx] < minimum) minimum = delta[ipos = i][me -> nx];
  }
 }

 me -> weightedDistance = minimum / ( me -> nx + me -> ny);
 me -> path[pathIndex].y = ipos;
 me -> path[pathIndex].x = j = me -> nx;





 while (j > 1)
 {
  if (psi[ipos][j] == 2)
  {
   j--;
   ipos--;
  }
  else if (psi[ipos][j] == 4)
  {
   j--;
  }
  else if (psi[ipos][j] == 6)
  {
   ipos--;
  }
  else
  {
   Melder_error("DTW_findPath: illegal path");
   goto end;
  }

  ((pathIndex > 1 && ipos > 0) ? (void) (0) : (void) _Melder_assert ("pathIndex > 1 && ipos > 0", "DTW.c", 921));
  me -> path[--pathIndex].x = j;
  me -> path[pathIndex].y = ipos;
 }

 me -> pathLength = me -> nx + me -> ny - pathIndex;
 if (pathIndex > 1)
 {
  for (j = 1; j <= me -> pathLength; j++)
  {
   me -> path[j] = me -> path[pathIndex++];
  }
 }

 DTW_Path_recode (me);

end:

 Melder_progress (1.0, ((void *)0));
 NUMfmatrix_free (delta, 1, 1);
 NUMlmatrix_free (psi, 1, 1);
}

double DTW_getPathY (DTW me, double tx)
{
 long ix, iy, i, ileft, iright, ibottom, itop, nxx, nyy;
 double ty0, ty, boxx, boxy;





 if (tx < me -> xmin) return me -> ymin - (me -> xmin -tx);
 if (tx > me -> xmax) return me -> ymax + (tx - me -> xmax);



 ix = (tx - me -> x1) / me -> dx + 1;
 if (ix < 1) ix = 1;
 if (ix > me -> nx) ix = me -> nx;



 i = ix + me -> path[1].x - 1;
 while (i <= me -> pathLength && me -> path[i].x != ix) { i++; }
 if (i > me -> pathLength) return (__builtin_huge_val());
 iy = me -> path[i].y;
# 987 "DTW.c"
 ileft = i - 1;
 while (ileft >= 1 && me -> path[ileft].y == iy) { ileft--; }
 ileft++;
 if (ileft == 1 && ix > 1 && me -> path[ileft].y > 1) ileft++;

 iright = i + 1;
 while (iright <= me -> pathLength && me -> path[iright].y == iy) { iright++; }
 iright--;
 if (iright == me -> pathLength && ix < me -> nx && me -> path[iright].y < me -> ny) iright--;

 nxx = iright - ileft + 1;



 ibottom = i;
 itop = i;

 if (nxx == 1)
 {
  ibottom--;
  while (ibottom >= 1 && me -> path[ibottom].x == ix) { ibottom--; }
  ibottom++;

  itop++;
  while (itop <= 1 && me -> path[itop].x == ix) { itop--; }
  itop++;
 }

 nyy = itop - ibottom + 1;

 boxx = nxx * me -> dx;
 boxy = nyy * me -> dy;



 if (ix == me -> nx)
 {
  boxx = me -> xmax -(me -> x1 + (ix - 1) * me -> dx - me -> dx / 2);
  boxy = me -> ymax -(me -> y1 + (iy - 1) * me -> dy - me -> dy / 2);
  ty = me -> ymax - (boxy - (boxx - (me -> xmax - tx)) * boxy / boxx);
 }
 else if (ix == 1)
 {
  boxx = me -> x1 + me -> dx / 2 - me -> xmin;
  boxy = me -> y1 + (itop - 1) * me -> dy + me -> dy / 2 - me -> ymin;
  ty = (tx - me -> xmin) * boxy / boxx + me -> ymin;
 }
 else
 {

  ty0 = (tx - (me -> x1 + (me -> path[ileft].x - 1) * me -> dx - me -> dx / 2)) * boxy / boxx;
  ty = me -> y1 + (me -> path[ibottom].y - 1) * me -> dy - me -> dy / 2 + ty0;
 }
 return ty;
}

long DTW_getMaximumConsecutiveSteps (DTW me, int direction)
{
 long i, nglobal = 1, nlocal = 1;

 for (i = 2; i <= me -> pathLength; i++)
 {
  int localdirection;

  if (me -> path[i].y == me -> path[i-1].y)
  {
   localdirection = 4;
  }
  else if (me -> path[i].x == me -> path[i-1].x)
  {
   localdirection = 6;
  }
  else
  {
   localdirection = 2;
  }

  if (localdirection == direction)
  {
   nlocal += 1;
  }
  if (direction != localdirection || i == me -> pathLength)
  {
   if (nlocal > nglobal) nglobal = nlocal;
   nlocal = 1;
  }
 }
 return nglobal;
}

void DTW_paintDistances (DTW me, Any g, double xmin, double xmax, double ymin,
 double ymax, double minimum, double maximum, int garnish)
{
 (void) garnish;
 Matrix_paintCells (me, g, xmin, xmax, ymin, ymax, minimum, maximum);
}

static Polygon _DTW_to_Polygon (DTW me, int choice, double adjustment_window_duration, int adjustment_window_includes_end,
 long nsteps_xory, long nsteps_xandy)
{
 long x, ylow, yhigh;
 long numberOfPoints, iylow, iyhigh;
 double x1, y1, x2, y2;
 Polygon thee = ((void *)0);

 numberOfPoints = 4 * me -> nx + 1;
 thee = Polygon_create (numberOfPoints);
 if (thee == ((void *)0)) return ((void *)0);

 iyhigh = 0; iylow = numberOfPoints;
 for (x = 1; x <= me -> nx; x++)
 {
  if (! get_ylimits_x (me, choice, adjustment_window_duration, adjustment_window_includes_end,
   nsteps_xory, nsteps_xandy, x, &ylow, &yhigh))
  {
   (void) Melder_error ("");
   goto end;
  }

  if (ylow > me -> ny) break;
  x1 = me -> x1 + (x - 1) * me -> dx - me -> dx / 2;
  x2 = x1 + me -> dx;
  y1 = me -> y1 + (yhigh - 1) * me -> dy + me -> dy / 2;
  y2 = me -> y1 + (ylow - 1) * me -> dy - me -> dy / 2;

  thee -> x[++iyhigh] = x1;
  thee -> y[iyhigh] = y1;
  thee -> x[++iyhigh] = x2;
  thee -> y[iyhigh] = y1;

  thee -> x[--iylow] = x1;
  thee -> y[iylow] = y2;
  thee -> x[--iylow] = x2;
  thee -> y[iylow] = y2;
 }



 thee -> x[numberOfPoints] = thee -> x[1];
 thee -> y[numberOfPoints] = thee -> y[1];

end:

 if (Melder_hasError ()) _Thing_forget ((Thing *) & (thee));
 return thee;
}

Polygon DTW_to_Polygon_band (DTW me, double adjustment_window_duration, int adjustment_window_includes_end)
{
 return DTW_checkAdjustmentWindow (me, "DTW_to_Polygon_band", adjustment_window_duration, adjustment_window_includes_end) ?
  _DTW_to_Polygon (me, 1, adjustment_window_duration, adjustment_window_includes_end, 1, 0) : ((void *)0);
}

Polygon DTW_to_Polygon_slopes (DTW me, long nsteps_xory, long nsteps_xandy)
{
 return DTW_checkSlopeConstraintParameters (me, "DTW_to_Polygon_slopes", nsteps_xory, nsteps_xandy) ?
  _DTW_to_Polygon (me, 2, 0.0, 1, nsteps_xory, nsteps_xandy) : ((void *)0);
}

void DTW_drawPath (DTW me, Any g, double xmin, double xmax, double ymin,
 double ymax, int garnish)
{
 long i, ixmin, ixmax, iymin, iymax, ipmin = 1, ipmax;
 double x1, x2, y1, y2;

 if (xmin >= xmax)
 {
  xmin = me -> xmin; xmax = me -> xmax;
 }
 if (ymin >= ymax)
 {
  ymin = me -> ymin; ymax = me -> ymax;
 }

 if (! Matrix_getWindowSamplesY (me, ymin, ymax, &iymin, &iymax) ||
  ! Matrix_getWindowSamplesX (me, xmin, xmax, &ixmin, &ixmax)) return;

 Graphics_setInner (g);
 Graphics_setWindow (g, xmin, xmax, ymin, ymax);

 while (ipmin < me -> pathLength && me -> path[ipmin].x < ixmin) ipmin++;

 ipmax = ipmin;

 while (ipmax < me -> pathLength && me -> path[ipmax].x <= ixmax) ipmax++;

 x1 = Matrix_columnToX (me, me -> path[ipmin].x);
 y1 = Matrix_rowToY (me, me -> path[ipmin].y);

 for (i = ipmin + 1; i <= ipmax; i++)
 {
  x2 = Matrix_columnToX (me, me -> path[i].x);
  y2 = Matrix_rowToY (me, me -> path[i].y);
  Graphics_line (g, x1, y1, x2, y2);
  x1 = x2;
  y1 = y2;
 }

 Graphics_unsetInner (g);
 if (garnish)
 {
  Graphics_drawInnerBox(g);
  Graphics_marksBottom (g, 2, 1, 1, 0);
  Graphics_marksLeft (g, 2, 1, 1, 0);
 }
}

Matrix DTW_distancesToMatrix (DTW me)
{
 Matrix thee;

 if ((thee = Matrix_create (me -> xmin, me -> xmax, me -> nx, me -> dx, me -> x1,
  me -> ymin, me -> ymax, me -> ny, me -> dy, me -> y1)) == ((void *)0)) return thee;

 NUMfmatrix_copyElements (me -> z, thee -> z, 1, me -> ny, 1, me -> nx);
 return thee;
}


void DTW_drawDistancesAlongPath (DTW me, Any g, double xmin, double xmax,
 double dmin, double dmax, int garnish)
{
 long i, ixmax, ixmin;
 float *d = ((void *)0);

 if (! (d = NUMfvector (1, me -> nx))) return;

 if (xmin >= xmax)
 {
  xmin = me -> xmin; xmax = me -> xmax;
 }
 if( ! Matrix_getWindowSamplesX (me, xmin, xmax, &ixmin, &ixmax)) return;

 i = 1;
 while (i < me -> pathLength && me -> path[i].x < ixmin) i++;
 ixmin = i;

 while (i <= me -> pathLength && me -> path[i].x < ixmax) i++;
 ixmax = i;

 if ((d = NUMfvector (ixmin, ixmax)) == ((void *)0)) return;

 for (i = ixmin; i <= ixmax; i++)
 {
  d[i] = me -> z[me -> path[i].y][i];
 }

 if (dmin >= dmax)
 {
  NUMfvector_extrema (d, ixmin, ixmax, &dmin, &dmax);
 }
 else
 {
  for (i = ixmin; i <= ixmax; i++)
  {
   if (d[i] > dmax)
   {
    d[i] = dmax;
   }
   else if (d[i] < dmin)
   {
    d[i] = dmin;
   }
  }
 }

 Graphics_setInner (g);
 Graphics_setWindow (g, xmin, xmax, dmin, dmax);
 Graphics_function (g, d, ixmin, ixmax, xmin, xmax);
 Graphics_unsetInner (g);

 if (garnish)
 {
  Graphics_drawInnerBox(g);
  Graphics_textLeft (g, 1, "distance");
  Graphics_marksBottom (g, 2, 1, 1, 0);
  Graphics_marksLeft (g, 2, 1, 1, 0);
 }

 NUMfvector_free (d, ixmin);
}




DTW Matrices_to_DTW (Any void_me, Any void_thee, int matchStart, int matchEnd, int slope, int metric)
{
 Matrix me = (Matrix) void_me; Matrix thee = (Matrix) void_thee;
 DTW him = ((void *)0);
 long i, j, k;

 if (thee -> ny != me -> ny) return Melder_errorp ("Matrices_to_DTW: Columns must have the same dimensions.");

 him = DTW_create (me -> xmin, me -> xmax, me -> nx, me -> dx, me -> x1, thee -> xmin, thee -> xmax, thee -> nx, thee -> dx, thee -> x1);
 if (him == ((void *)0)) return ((void *)0);

 for (i = 1; i <= me -> nx; i++)
 {
  for (j = 1; j <= thee -> nx; j++)
  {




   double dmax = 0, d = 0, dtmp;
   for (k = 1; k <= me -> ny; k++)
   {
    dtmp = fabs (me -> z[k][i] - thee -> z[k][j]);
    if (dtmp > dmax) dmax = dtmp;
   }
   if (dmax > 0)
   {
    for (k = 1; k <= me -> ny; k++)
    {
     dtmp = fabs (me -> z[k][i] - thee -> z[k][j]) / dmax;
     d += pow (dtmp, metric);
    }
   }
   d = dmax * pow (d, 1.0 / metric);
   him -> z[i][j] = d / me -> ny;
  }
  if ((i % 10) == 1 && ! Melder_progress (0.999 * i / me -> nx,
    "Calculate distances: column %ld from %ld", i, me -> nx)) goto end;
 }
 DTW_findPath (him, matchStart, matchEnd, slope);
end:
 Melder_progress (1.0, ((void *)0));
 if (Melder_hasError ()) _Thing_forget ((Thing *) & (him));
 return him;
}

DTW Spectrograms_to_DTW (Spectrogram me, Spectrogram thee, int matchStart,
 int matchEnd, int slope, int metric)
{
 Matrix m1 = ((void *)0), m2 = ((void *)0);
 DTW him = ((void *)0);
 long i, j;

 if (me -> xmin != thee -> xmin || me -> ymax != thee -> ymax || me -> ny != thee -> ny)
 {
   return Melder_errorp("Spectrograms_to_DTW: #frequencies and/or "
    "frequency ranges do not match.");
 }
 if (((m1 = Spectrogram_to_Matrix (me)) == ((void *)0)) ||
  ((m2 = Spectrogram_to_Matrix (thee)) == ((void *)0)) ||
  ((him = DTW_create (me -> xmin, me -> xmax, me -> nx, me -> dx, me -> x1,
   thee -> xmin, thee -> xmax, thee -> nx, thee -> dx, thee -> x1)) == ((void *)0))) goto end;





 for (i = 1; i <= me -> ny; i++)
 {
  for (j = 1; j <= me -> nx; j++)
  {
   m1 -> z[i][j] = 10 * log10 (m1 -> z[i][j]);
  }
 }
 for (i = 1; i <= thee -> ny; i++)
 {
  for (j = 1; j <= thee -> nx; j++)
  {
   m2 -> z[i][j] = 10 * log10 (m2 -> z[i][j]);
  }
 }

 him = Matrices_to_DTW (m1, m2, matchStart, matchEnd, slope, metric);

end:
 _Thing_forget ((Thing *) & (m1));
 _Thing_forget ((Thing *) & (m2));
 if (Melder_hasError ()) _Thing_forget ((Thing *) & (him));
 return him;
}




static int Pitch_findFirstAndLastVoicedFrame (Pitch me, long *first, long *last)
{
 *first = 1;
 while (*first <= me -> nx && ! Pitch_isVoiced_i (me, *first)) (*first)++;
 *last = me -> nx;
 while (*last >= *first && ! Pitch_isVoiced_i (me, *last)) (*last)--;
 return *first <= me -> nx && *last >= 1;
}

DTW Pitches_to_DTW_sgc (Pitch me, Pitch thee, double vuv_costs, double time_weight, int matchStart, int matchEnd, int slope);
DTW Pitches_to_DTW_sgc (Pitch me, Pitch thee, double vuv_costs, double time_weight, int matchStart, int matchEnd, int slope)
{
 DTW him = ((void *)0);
 long i, j, myfirst, mylast, thyfirst, thylast;
 double *pitchx = ((void *)0);
 int unit = 5;

  if (vuv_costs < 0) return Melder_errorp ("Voiced-unvoiced costs may not be negative.");
  if (time_weight < 0) return Melder_errorp ("Time costs weight may not be negative.");

 if (! Pitch_findFirstAndLastVoicedFrame (me, &myfirst, &mylast) ||
  ! Pitch_findFirstAndLastVoicedFrame (thee, &thyfirst, &thylast)) return Melder_errorp
   ("No voiced frames.");






  him = DTW_create (me -> xmin, me -> xmax, me -> nx, me -> dx, me -> x1, thee -> xmin, thee -> xmax, thee -> nx, thee -> dx, thee -> x1);
  if (him == ((void *)0)) return ((void *)0);
  pitchx = NUMdvector (1, thee -> nx);
  if (pitchx == ((void *)0)) goto end;
  for (j = 1; j <= thee -> nx; j++)
  {
   pitchx[j] = Sampled_getValueAtSample (thee, j, 1, unit);
  }

  for (i = 1; i <= me -> nx; i++)
  {
   double pitchy = Sampled_getValueAtSample (me, i, 1, unit);
   double t1 = me -> x1 + (i - 1) * me -> dx;
   for (j = 1; j <= thee -> nx; j++)
   {
    double t2 = thee -> x1 + (j - 1) * thee -> dx;
    double dist_f = 0;
    double dist_t = fabs (t1 -t2);
    if (pitchy == (__builtin_huge_val()))
    {
     if (pitchx[j] != (__builtin_huge_val()))
     {
      dist_f = vuv_costs;
     }
    }
    else if (pitchx[j] == (__builtin_huge_val()))
    {
     dist_f = vuv_costs;
    }
    else
    {
     dist_f = fabs(pitchy - pitchx[j]);
    }
    him -> z[i][j] = sqrt (dist_f * dist_f + time_weight * dist_t * dist_t);
   }
  }
  DTW_findPath (him, matchStart, matchEnd, slope);
end:
 NUMdvector_free (pitchx, 1);
  if (Melder_hasError ()) _Thing_forget ((Thing *) & (him));
  return him;
}

DTW Pitches_to_DTW (Pitch me, Pitch thee, double vuv_costs, double time_weight, int matchStart,
 int matchEnd, int slope)
{
 DTW him = ((void *)0);
 long i, j;
 double *pitchx = ((void *)0);
 int unit = 5;

  if (vuv_costs < 0) return Melder_errorp ("Voiced-unvoiced costs may not be negative.");
  if (time_weight < 0) return Melder_errorp ("Time costs weight may not be negative.");

  him = DTW_create (me -> xmin, me -> xmax, me -> nx, me -> dx, me -> x1, thee -> xmin, thee -> xmax, thee -> nx, thee -> dx, thee -> x1);
  if (him == ((void *)0)) return ((void *)0);
  pitchx = NUMdvector (1, thee -> nx);
  if (pitchx == ((void *)0)) goto end;
  for (j = 1; j <= thee -> nx; j++)
  {
   pitchx[j] = Sampled_getValueAtSample (thee, j, 1, unit);
  }

  for (i = 1; i <= me -> nx; i++)
  {
   double pitchy = Sampled_getValueAtSample (me, i, 1, unit);
   double t1 = me -> x1 + (i - 1) * me -> dx;
   for (j = 1; j <= thee -> nx; j++)
   {
    double t2 = thee -> x1 + (j - 1) * thee -> dx;
    double dist_f = 0;
    double dist_t = fabs (t1 -t2);
    if (pitchy == (__builtin_huge_val()))
    {
     if (pitchx[j] != (__builtin_huge_val()))
     {
      dist_f = vuv_costs;
     }
    }
    else if (pitchx[j] == (__builtin_huge_val()))
    {
     dist_f = vuv_costs;
    }
    else
    {
     dist_f = fabs(pitchy - pitchx[j]);
    }
    him -> z[i][j] = sqrt (dist_f * dist_f + time_weight * dist_t * dist_t);
   }
 }

  DTW_findPath (him, matchStart, matchEnd, slope);

end:
 NUMdvector_free (pitchx, 1);
 if (Melder_hasError ()) _Thing_forget ((Thing *) & (him));
 return him;
}

DurationTier DTW_to_DurationTier (DTW me)
{



}
