Revert Sum Product для BigInteger

This commit is contained in:
Mikhalkovich Stanislav 2020-11-23 09:37:13 +03:00
parent 712d87beb8
commit 48222f9576
5 changed files with 5 additions and 36 deletions

View file

@ -15,7 +15,7 @@ internal static class RevisionClass
public const string Major = "3";
public const string Minor = "7";
public const string Build = "1";
public const string Revision = "2746";
public const string Revision = "2747";
public const string MainVersion = Major + "." + Minor;
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;

View file

@ -1,4 +1,4 @@
%COREVERSION%=1
%REVISION%=2746
%MINOR%=7
%REVISION%=2747
%COREVERSION%=1
%MAJOR%=3

View file

@ -1 +1 @@
3.7.1.2746
3.7.1.2747

View file

@ -1 +1 @@
!define VERSION '3.7.1.2746'
!define VERSION '3.7.1.2747'

View file

@ -9745,37 +9745,6 @@ begin
Result += f(x);
end;}
/// Возвращает сумму элементов последовательности
function Sum(Self: sequence of BigInteger): BigInteger; extensionmethod;
begin
Result := 0bi;
foreach var a in Self do
Result += a
end;
/// Возвращает среднее элементов последовательности
function Average(Self: sequence of BigInteger): real; extensionmethod;
begin
var cnt := 0;
var sum := 0bi;
foreach var a in Self do
begin
sum += a;
cnt += 1;
end;
if cnt <> 0 then
Result := sum/cnt
else Result := 0
end;
/// Возвращает произведение элементов последовательности
function Product(Self: sequence of BigInteger): BigInteger; extensionmethod;
begin
Result := 0bi;
foreach var a in Self do
Result += a
end;
/// Возвращает отсортированную по возрастанию последовательность
function Sorted<T>(Self: sequence of T): sequence of T; extensionmethod;