Get the number of parameters a tree prior has

get_tree_prior_n_params(tree_prior)

Arguments

tree_prior

a tree_prior, as created by create_tree_prior

Value

the number of parameters a tree prior has

Author

Richèl J.C. Bilderbeek

Examples

 # birth_rate_distr is uniform, which has zero parameters
 # death_rate_distr is uniform, which has zero parameters
 testit::assert(
   get_tree_prior_n_params(create_bd_tree_prior()) == 0
 )

 # no distributions, no parameters
 testit::assert(
   get_tree_prior_n_params(create_cbs_tree_prior()) == 0
 )

 # pop_size_distr is 1/x, which has zero parameters
 testit::assert(
   get_tree_prior_n_params(create_ccp_tree_prior()) == 0
 )

 # pop_size_distr is 1/x, which has zero parameters
 # growth_rate_distr is Laplace, which has two parameters
 testit::assert(
   get_tree_prior_n_params(create_cep_tree_prior()) == 2
 )

 # birth_rate_distr is uniform, which has zero parameters
 testit::assert(
   get_tree_prior_n_params(create_yule_tree_prior()) == 0
 )