An efficient inbreeding coefficient calculation algorithm implemented with C#