-## ace.R (2009-06-10)
+## ace.R (2009-11-12)
## Ancestral Character Estimation
if (model == "BM") {
tip <- phy$edge[, 2] <= nb.tip
dev.BM <- function(p) {
+ if (p[1] < 0) return(1e100) # in case sigma² is negative
x1 <- p[-1][phy$edge[, 1] - nb.tip]
x2 <- numeric(length(x1))
x2[tip] <- x[phy$edge[tip, 2]]