FEAT-1b: Inzuchtkoeffizient endpoints via Wright path method

- PedigreeCalculator: pure, EF-free Wright path-method engine (recursive F_A,
  per-common-ancestor contributions, generationsAvailable, cycle guards)
- InbreedingService: loads pedigree from ApplicationContext shadow FKs
  (Gerbils.LitterId, Litters.FatherId/MotherId) into in-memory maps
- InbreedingController: GET /gerbils/{id}/inbreeding-coefficient,
  POST /genetics/test-inbreeding (hypothetical pairing for Probeverpaarung)
- Injects ApplicationContext directly; no Program.cs change (Dwight owns it)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-06 00:10:19 +02:00
parent bca97ed10a
commit 0c94a6ecd3
5 changed files with 366 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
namespace GerbilManagerWebAPI.Dtos
{
/// <summary>
/// Request body for a hypothetical pairing's inbreeding coefficient
/// (Inzuchtkoeffizient der geplanten Verpaarung). Either parent may be omitted,
/// in which case the coefficient is 0.
/// </summary>
public record TestInbreedingDto(Guid? FatherId, Guid? MotherId);
}