X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2FrTrait.c;h=43dc73ad85f3163b65e49333889a2088d30a06a5;hb=c3c9c0a9590fabd2996543a4789c84634b7aca71;hp=0e543a6d8642f205891e3d0d32a192695f960040;hpb=cc266bd204f991845994007b428ba9e20f92963c;p=ape.git diff --git a/src/rTrait.c b/src/rTrait.c index 0e543a6..43dc73a 100644 --- a/src/rTrait.c +++ b/src/rTrait.c @@ -12,6 +12,7 @@ void rTraitCont(int *model, int *Nedge, int *edge1, int *edge2, double *el, { /* The tree must be in pruningwise order */ int i; + double alphaT, M, S; switch(*model) { case 1 : for (i = *Nedge - 1; i >= 0; i--) { @@ -25,7 +26,7 @@ void rTraitCont(int *model, int *Nedge, int *edge1, int *edge2, double *el, alphaT = alpha[i] * el[i]; M = exp(-alphaT); S = sigma[i] * sqrt((1 - exp(-2 * alphaT))/(2 * alpha[i])); - } else { + } else { /* same than if (alpha[i] ==0) */ M = 1; S = sqrt(el[i]) * sigma[i]; }