Skip to content

Commit

Permalink
Revert "Update nrutil.h"
Browse files Browse the repository at this point in the history
  • Loading branch information
camwebb committed Dec 29, 2016
1 parent 574fe11 commit 17b2d59
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
16 changes: 8 additions & 8 deletions src/comstruct.c
Expand Up @@ -83,8 +83,8 @@ void ComDist(struct phylo P, struct sample S)

int i, j, p, q, comb;

double totR;
double **mdist;
float totR;
float **mdist;
int *attach; // "make a pointer to an int"

attach = ivector(0, S.ntaxa-1); // "allocate memory to a array pointed to
Expand Down Expand Up @@ -161,7 +161,7 @@ void ComDistNN(struct phylo P, struct sample S)
float minR = 0.0;
float rel, totminR;

double **mdist;
float **mdist;
int *attach; // "make a pointer to an int"

attach = ivector(0, S.ntaxa-1); // "allocate memory to a array pointed to
Expand Down Expand Up @@ -237,7 +237,7 @@ void IComDist(struct phylo P, struct sample S)
{

int i, j, p, q, comb;
double totR;
float totR;
//float **mdist;
int *attach; // "make a pointer to an int"
// float **dmatrix;
Expand Down Expand Up @@ -283,7 +283,7 @@ void IComDistNN(struct phylo P, struct sample S)
{

int i, j, p, q;
double minR, R;
float minR, R;
//float **mdist;
int *attach; // "make a pointer to an int"
// float **dmatrix;
Expand Down Expand Up @@ -330,7 +330,7 @@ void VComDist(struct phylo P, struct sample S)
{

int i, j, p, comb;
double totR;
float totR;
//float **mdist;
int *attach; // "make a pointer to an int"
// float **dmatrix;
Expand Down Expand Up @@ -383,7 +383,7 @@ void VComDistNN(struct phylo P, struct sample S)
{

int i, j, p;
double minR, R;
float minR, R;
//float **mdist;
int *attach; // "make a pointer to an int"
// float **dmatrix;
Expand Down Expand Up @@ -995,7 +995,7 @@ void LttR(struct phylo P, struct sample S)

}

void Sort(double Array[], int Nia)
void Sort(float Array[], int Nia)
{
int i;
float swap;
Expand Down
6 changes: 3 additions & 3 deletions src/nrutil.c
Expand Up @@ -104,7 +104,7 @@ double *dvector(long nl, long nh)
return v-nl+NR_END;
}

double **matrix(long nrl, long nrh, long ncl, long nch)
float **matrix(long nrl, long nrh, long ncl, long nch)
/* allocate a float matrix with subscript range m[nrl..nrh][ncl..nch] */
{
long i, nrow=nrh-nrl+1,ncol=nch-ncl+1;
Expand Down Expand Up @@ -177,7 +177,7 @@ int **imatrix(long nrl, long nrh, long ncl, long nch)
return m;
}

double **submatrix(float **a, long oldrl, long oldrh, long oldcl, long oldch,
float **submatrix(float **a, long oldrl, long oldrh, long oldcl, long oldch,
long newrl, long newcl)
/* point a submatrix [newrl..][newcl..] to a[oldrl..oldrh][oldcl..oldch] */
{
Expand All @@ -197,7 +197,7 @@ double **submatrix(float **a, long oldrl, long oldrh, long oldcl, long oldch,
return m;
}

double **convert_matrix(float *a, long nrl, long nrh, long ncl, long nch)
float **convert_matrix(float *a, long nrl, long nrh, long ncl, long nch)
/* allocate a float matrix m[nrl..nrh][ncl..nch] that points to the matrix
declared in the standard C manner as a[nrow][ncol], where nrow=nrh-nrl+1
and ncol=nch-ncl+1. The routine should be called with the address
Expand Down
16 changes: 8 additions & 8 deletions src/nrutil.h
Expand Up @@ -58,28 +58,28 @@ int *ivector(long nl, long nh);
char *cvector(long nl, long nh);
unsigned long *lvector(long nl, long nh);
double *dvector(long nl, long nh);
double **matrix(long nrl, long nrh, long ncl, long nch);
float **matrix(long nrl, long nrh, long ncl, long nch);
char **cmatrix(long nrl, long nrh, long ncl, long nch);
double **dmatrix(long nrl, long nrh, long ncl, long nch);
int **imatrix(long nrl, long nrh, long ncl, long nch);
double **submatrix(float **a, long oldrl, long oldrh, long oldcl, long oldch,
float **submatrix(float **a, long oldrl, long oldrh, long oldcl, long oldch,
long newrl, long newcl);
double **convert_matrix(float *a, long nrl, long nrh, long ncl, long nch);
double ***f3tensor(long nrl, long nrh, long ncl, long nch, long ndl, long ndh);
float **convert_matrix(float *a, long nrl, long nrh, long ncl, long nch);
float ***f3tensor(long nrl, long nrh, long ncl, long nch, long ndl, long ndh);
double ***d3tensor(long nrl, long nrh, long ncl, long nch, long ndl, long ndh);
char ***c3d(long nrl, long nrh, long ncl, long nch, long ndl, long ndh);
void free_vector(float *v, long nl, long nh);
void free_ivector(int *v, long nl, long nh);
void free_cvector(char *v, long nl, long nh);
void free_lvector(unsigned long *v, long nl, long nh);
void free_dvector(double *v, long nl, long nh);
void free_matrix(double **m, long nrl, long nrh, long ncl, long nch);
void free_matrix(float **m, long nrl, long nrh, long ncl, long nch);
void free_cmatrix(char **m, long nrl, long nrh, long ncl, long nch);
void free_dmatrix(double **m, long nrl, long nrh, long ncl, long nch);
void free_imatrix(int **m, long nrl, long nrh, long ncl, long nch);
void free_submatrix(double **b, long nrl, long nrh, long ncl, long nch);
void free_convert_matrix(double **b, long nrl, long nrh, long ncl, long nch);
void free_f3tensor(double ***t, long nrl, long nrh, long ncl, long nch,\
void free_submatrix(float **b, long nrl, long nrh, long ncl, long nch);
void free_convert_matrix(float **b, long nrl, long nrh, long ncl, long nch);
void free_f3tensor(float ***t, long nrl, long nrh, long ncl, long nch,\
long ndl, long ndh);
void free_d3tensor(double ***t, long nrl, long nrh, long ncl, long nch,\
long ndl, long ndh);
Expand Down
8 changes: 4 additions & 4 deletions src/phylocom.h
Expand Up @@ -76,13 +76,13 @@
#define VERSION "4.2"
#define SVNREV "SVN $Revision: 251 $"

#define MAXNODES 40000 // Higher than the largest no of nodes in phylo
#define MAXTAXA 40000 // Higher than the highest expected code for taxon
#define MAXNODES 15000 // Higher than the largest no of nodes in phylo
#define MAXTAXA 13000 // Higher than the highest expected code for taxon
#define MAXRUNS 999 // DDA comment: Changed to 999 and significance counters
// initialized at one
#define MAXLEVEL 1.0
#define MAXTAXONLENGTH 100 // Number of chars for taxon name
#define MAXPOLYTOMY 10000 // Maximum number of daughters per node
#define MAXPOLYTOMY 1000 // Maximum number of daughters per node
#define MAXBLLENGTH 15 // Number of chars for BL
#define MAXPLOTLENGTH 100 // Number of chars for plot name
#define MAXNOTELENGTH 100
Expand Down Expand Up @@ -283,7 +283,7 @@ typedef struct phylo {
int termtaxa; // number of terminal taxa
char **taxalist; //names of terminal taxa - taxalist[0 to termtaxa-1][]
int *t2n; //vector of node #s indexed by 0 to termtaxa-1, as taxalist
double **dist; // matrix of all node-to-node distances dist[node1][node2]
float **dist; // matrix of all node-to-node distances dist[node1][node2]
int arenotes; // 0 | 1
char **notes;
// DA additions
Expand Down

0 comments on commit 17b2d59

Please sign in to comment.