#include <stdio.h>
#include <stdlib.h>
#include <math.h>

double log_exp_add(double x, double y);
double log_exp_sub(double x, double y);
double d_max(double *v, int n);
double d_min(double *v, int n);
void reorg(double *v, double ***m, int nrow, int ncol);
void reorg_int(int *v, int ***m, int nrow, int ncol);
float ran1(long *idum);
float ran2(long *idum);
int getPermute(int* per, int n, long *idum);
void permute(double **dat, double **p_dat, int **dati, int **p_dati, int *per, int nrow, int ncol);

