Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5c7623f

Browse files
Merge branch 'feature/31-add-geometric-mean-functions' into develop
Fixes #31
2 parents 2e71488 + 60379b5 commit 5c7623f

File tree

16 files changed

+636
-15
lines changed

16 files changed

+636
-15
lines changed

‎collection/643.dat‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ begin
1212
for Elem in A do
1313
begin
1414
if Elem = 0 then
15-
raise SysUtils.EArgumentOutOfRangeException(sNotPositive);
15+
raise SysUtils.EArgumentOutOfRangeException.Create(sNotPositive);
1616
Result := Result + System.Ln(Elem);
1717
end;
1818
end;

‎collection/644.dat‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ begin
1212
for Elem in A do
1313
begin
1414
if Elem <= 0 then
15-
raise SysUtils.EArgumentOutOfRangeException(sNotPositive);
15+
raise SysUtils.EArgumentOutOfRangeException.Create(sNotPositive);
1616
Result := Result + System.Ln(Elem);
1717
end;
1818
end;

‎collection/645.dat‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ begin
1212
for Elem in A do
1313
begin
1414
if Elem <= 0 then
15-
raise SysUtils.EArgumentOutOfRangeException(sNotPositive);
15+
raise SysUtils.EArgumentOutOfRangeException.Create(sNotPositive);
1616
Result := Result + System.Ln(Elem);
1717
end;
1818
end;

‎collection/646.dat‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ begin
1212
for Elem in A do
1313
begin
1414
if Elem = 0 then
15-
raise SysUtils.EArgumentOutOfRangeException(sNotPositive);
15+
raise SysUtils.EArgumentOutOfRangeException.Create(sNotPositive);
1616
Result := Result + System.Ln(Elem);
1717
end;
1818
end;

‎collection/647.dat‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ begin
1212
for Elem in A do
1313
begin
1414
if Math.Sign(Elem) <> Math.PositiveValue then
15-
raise SysUtils.EArgumentOutOfRangeException(sNotPositive);
15+
raise SysUtils.EArgumentOutOfRangeException.Create(sNotPositive);
1616
Result := Result + System.Ln(Elem);
1717
end;
1818
end;

‎collection/648.dat‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ begin
1212
for Elem in A do
1313
begin
1414
if Math.Sign(Elem) <> Math.PositiveValue then
15-
raise SysUtils.EArgumentOutOfRangeException(sNotPositive);
15+
raise SysUtils.EArgumentOutOfRangeException.Create(sNotPositive);
1616
Result := Result + System.Ln(Elem);
1717
end;
1818
end;

‎collection/649.dat‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ begin
1212
for Elem in A do
1313
begin
1414
if Math.Sign(Elem) <> Math.PositiveValue then
15-
raise SysUtils.EArgumentOutOfRangeException(sNotPositive);
15+
raise SysUtils.EArgumentOutOfRangeException.Create(sNotPositive);
1616
Result := Result + System.Ln(Elem);
1717
end;
1818
end;

‎collection/675.dat‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
function GeoMean(const A: array of Double): Double; overload;
2+
begin
3+
if System.Length(A) = 0 then
4+
raise SysUtils.EArgumentException.Create('Array is empty');
5+
Result := System.Exp(SumOfLogs(A) / System.Length(A));
6+
end;

‎collection/676.dat‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
function GeoMean(const A: array of Cardinal): Double; overload;
2+
begin
3+
if System.Length(A) = 0 then
4+
raise SysUtils.EArgumentException.Create('Array is empty');
5+
Result := System.Exp(SumOfLogs(A) / System.Length(A));
6+
end;

‎collection/677.dat‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
function GeoMean(const A: array of Integer): Double; overload;
2+
begin
3+
if System.Length(A) = 0 then
4+
raise SysUtils.EArgumentException.Create('Array is empty');
5+
Result := System.Exp(SumOfLogs(A) / System.Length(A));
6+
end;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /