make.linear.decay.Rd
Create a linear decay function for genetic distance of two taxa and the probability of success of a hybridization event
make.linear.decay(threshold)
A numeric representing how quickly the hybridization success decays. Smaller values denote a quicker decay
A linear decay function
The function computes: $$1-\frac{d}{t} $$ where d is the genetic distance between taxa
a distance \(d\) greater than \(t\) will return 0
set.seed(17)
dist_func<- make.linear.decay(0.5)
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]]