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);
/*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)
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;
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;