Outputs a matrix of additional growth per patch per species given by hierarchical competition. The values are considered

compute_hierarchical_compet(
  composition_given_time_step,
  trait_values,
  trait_weights,
  H,
  exponent = 1
)

Arguments

composition_given_time_step

composition matrix at a given time step (a site-species matrix with sites in rows)

trait_values

a trait matrix

trait_weights

data.frame with at least three columns equal to trait (giving the name of the concerned traits in traits df), growth_weight the relative weight of the trait in growth and compet_weight the relative weight of the trait in competition.

H

the hierarchical competition scalar

exponent

exponent to use for hierarchical compet. distances