Class DynasticCalculator

java.lang.Object
org.episteme.natural.biology.DynasticCalculator

public final class DynasticCalculator extends Object
Calculates consanguinity coefficients, inbreeding, and models dynastic succession. Provides tools for genealogical analysis of historical dynasties.
  • Method Details

    • calculateInbreedingCoefficient

      public static Real calculateInbreedingCoefficient(DynasticCalculator.DynasticPerson person)
      Calculates the Wright's coefficient of inbreeding (F) for a person. Formula: F = Σ (1/2)^(n1+n2+1) × (1 + FA)
      Parameters:
      person - the person to calculate for
      Returns:
      inbreeding coefficient as a Real number
      Throws:
      NullPointerException - if person is null
    • calculateRelationshipCoefficient

      public static Real calculateRelationshipCoefficient(DynasticCalculator.DynasticPerson a, DynasticCalculator.DynasticPerson b)
      Calculates the coefficient of relationship (r) between two individuals.
      Parameters:
      a - first person
      b - second person
      Returns:
      relationship coefficient as a Real number
      Throws:
      NullPointerException - if a or b is null
    • calculateSuccessionOrder

      public static List<DynasticCalculator.DynasticPerson> calculateSuccessionOrder(DynasticCalculator.DynasticPerson monarch, boolean malePriority)
      Calculates the order of succession based on primogeniture.
      Parameters:
      monarch - current holder of the title
      malePriority - if true, males take priority over females (Salic/Semi-Salic law)
      Returns:
      unmodifiable ordered list of successors
      Throws:
      NullPointerException - if monarch is null