make.polynomial.decay.Rd
Create a polynomial decay function for genetic distance of two taxa and the probability of success of a hybridization event
make.polynomial.decay(threshold, degree = 1)
A numeric denoting how quickly the polynomial function decays. Distances greater than the threshold will return a success probability of 0.
The degree of the polynomial
An polynomial decay function
The function computes: $$1- {\frac{d}{t}}^degree$$ Where d is the distance and t is the threshold
set.seed(17)
dist_func<- make.polynomial.decay(0.5,2)
net<-sim.bdh.age(1,1,5,2,2,c(1/3,1/3,1/3),hyb.inher.fxn = make.uniform.draw(),
hyb.rate.fxn=dist_func,complete=TRUE)[[1]]