X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2Fmat_expo.c;h=a2038b23c1999fd632e1fc7f9cda5b9e2746c142;hb=06e83c6878153f8e7999c0470263c40aad4db258;hp=a5ae2db01d3e1032df081e2a3479ffe6a6f523f2;hpb=c827059eeafc8cbe41c812b26979543ab287803e;p=ape.git diff --git a/src/mat_expo.c b/src/mat_expo.c index a5ae2db..a2038b2 100644 --- a/src/mat_expo.c +++ b/src/mat_expo.c @@ -1,6 +1,6 @@ -/* matexpo.c 2007-10-08 */ +/* matexpo.c 2011-06-23 */ -/* Copyright 2007 Emmanuel Paradis +/* Copyright 2007-2011 Emmanuel Paradis /* This file is part of the R-package `ape'. */ /* See the file ../COPYING for licensing issues. */ @@ -12,7 +12,7 @@ void mat_expo(double *P, int *nr) /* This function computes the exponential of a nr x nr matrix */ { double *U, *vl, *WR, *Uinv, *WI, *work; - int i, j, k, l, info, *ipiv, n = *nr, nc = n*n, lw = nc << 1, *ord; + int i, j, k, l, info, *ipiv, n = *nr, nc = n*n, lw = nc << 1; char yes = 'V', no = 'N'; U = (double *)R_alloc(nc, sizeof(double)); @@ -23,7 +23,6 @@ void mat_expo(double *P, int *nr) work = (double *)R_alloc(lw, sizeof(double)); ipiv = (int *)R_alloc(nc, sizeof(int)); - ord = (int *)R_alloc(n, sizeof(int)); /* The matrix is not symmetric, so we use 'dgeev'. We take the real part of the eigenvalues -> WR