From ae41817a186bc50deaf5fbe98ac262a65fa85b7d Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Tue, 9 Feb 2016 09:44:06 -0800 Subject: [PATCH] remove useless variables in fasttree --- FastTree.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/FastTree.c b/FastTree.c index e8adc7a..3676051 100644 --- a/FastTree.c +++ b/FastTree.c @@ -4834,13 +4834,6 @@ profile_t *PosteriorProfile(profile_t *p1, profile_t *p2, if (transmat == NULL) { /* Jukes-Cantor */ assert(nCodes == 4); - numeric_t fAll[128][4]; - for (j = 0; j < 4; j++) - for (k = 0; k < 4; k++) - fAll[j][k] = (j==k) ? 1.0 : 0.0; - for (k = 0; k < 4; k++) - fAll[NOCODE][k] = 0.25; - double *PSame1 = PSameVector(len1, rates); double *PDiff1 = PDiffVector(PSame1, rates); double *PSame2 = PSameVector(len2, rates); @@ -5170,7 +5163,7 @@ double PairLogLk(profile_t *pA, profile_t *pB, double length, int nPos, /*OPTIONAL IN/OUT*/double *site_likelihoods) { double lk = 1.0; double loglk = 0.0; /* stores underflow of lk during the loop over positions */ - int i,j,k; + int i,j; assert(rates != NULL && rates->nRateCategories > 0); numeric_t *expeigenRates = NULL; if (transmat != NULL) @@ -5180,12 +5173,6 @@ double PairLogLk(profile_t *pA, profile_t *pB, double length, int nPos, assert (nCodes == 4); double *pSame = PSameVector(length, rates); double *pDiff = PDiffVector(pSame, rates); - numeric_t fAll[128][4]; - for (j = 0; j < 4; j++) - for (k = 0; k < 4; k++) - fAll[j][k] = (j==k) ? 1.0 : 0.0; - for (k = 0; k < 4; k++) - fAll[NOCODE][k] = 0.25; int iFreqA = 0; int iFreqB = 0; @@ -6133,9 +6120,6 @@ double RescaleGammaLogLk(int nPos, int nRateCats, /*IN*/numeric_t *rates, /*IN*/ double MLPairOptimize(profile_t *pA, profile_t *pB, int nPos, /*OPTIONAL*/transition_matrix_t *transmat, rates_t *rates, /*IN/OUT*/double *branch_length) { - double len5[5]; - int j; - for (j=0;j<5;j++) len5[j] = *branch_length; quartet_opt_t qopt = { nPos, transmat, rates, /*nEval*/0, /*pair1*/pA, /*pair2*/pB }; double f2x,negloglk; -- 2.39.2