]> git.donarmstrong.com Git - fasttree.git/commitdiff
remove useless variables in fasttree
authorDon Armstrong <don@donarmstrong.com>
Tue, 9 Feb 2016 17:44:06 +0000 (09:44 -0800)
committerDon Armstrong <don@donarmstrong.com>
Tue, 9 Feb 2016 17:44:06 +0000 (09:44 -0800)
FastTree.c

index e8adc7a8b6a9e898246474f9af28dad6abaa93a5..36760511846a0b15442990152c716f5523ab5b50 100644 (file)
@@ -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;