This function returns TRUE if and only if the admixture graph satisfies all constraints on the number of admixture events for the populations in admix_constraints

satisfies_numadmix(graph, admix_constraints)

Arguments

graph

An admixture graph

admix_constraints

A data frame with columns pop, min, max

Value

TRUE if all admixture constraints are satisfied, else FALSE

Examples

if (FALSE) {
# At least one admixture event for C, and none for D:
constrain_cd = tribble(
  ~pop, ~min, ~max,
  'C', 1, NA,
  'D', NA, 0)
satisfies_numadmix(random_admixturegraph(5, 2), constrain_cd)
}