From 21ef4c08f1e8d1bfd56d7fa1726c1afe5b10d877 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20M=C3=BCller?= Date: Sat, 9 Nov 2024 23:11:05 +0100 Subject: [PATCH] Added TBinomialCoefficientCache method documentation --- UBinomialCoefficients.pas | 3 +++ 1 file changed, 3 insertions(+) diff --git a/UBinomialCoefficients.pas b/UBinomialCoefficients.pas index 1d4e875..96b9ff6 100644 --- a/UBinomialCoefficients.pas +++ b/UBinomialCoefficients.pas @@ -37,7 +37,10 @@ type public constructor Create; destructor Destroy; override; + // Returns N choose K, with N >= K >= 0. function Get(const AN, AK: Cardinal): Cardinal; + // Returns the number of cached rows C = N + 1, where N is the highest from previously queried "N choose K". The + // actual number of cached binomial coefficient values is C * (C + 1) / 2. function GetCachedRowsCount: Cardinal; end;