Skip to content

Commit 4dfc9a4

Browse files
committed
fix
1 parent cba0f87 commit 4dfc9a4

File tree

7 files changed

+477
-477
lines changed

7 files changed

+477
-477
lines changed

csharp/ToolGood.Algorithm/Internals/Functions/FunctionBase.csharp.cs

Lines changed: 70 additions & 70 deletions
Large diffs are not rendered by default.

csharp/ToolGood.Algorithm/Internals/Functions/FunctionBase.flow.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public Function_IF(FunctionBase func1, FunctionBase func2, FunctionBase func3) :
1515

1616
public override Operand Calculate(AlgorithmEngine work)
1717
{
18-
var args1 = func1.Calculate(work); if (args1.Type != OperandType.BOOLEAN) { args1 = args1.ToBoolean("Function IF first parameter must be boolean!"); if (args1.IsError) { return args1; } }
18+
var args1 = func1.Calculate(work); if (args1.Type != OperandType.BOOLEAN) { args1 = args1.ToBoolean("Function 'If' first parameter must be boolean!"); if (args1.IsError) { return args1; } }
1919
if (args1.BooleanValue) return func2.Calculate(work);
2020
if (func3 == null) { return Operand.False; }
2121
return func3.Calculate(work);
@@ -255,7 +255,7 @@ public override Operand Calculate(AlgorithmEngine work)
255255
{
256256
var args1 = func1.Calculate(work);
257257
if (args1.IsNull) { return Operand.True; }
258-
if (args1.Type != OperandType.TEXT) { args1 = args1.ToText("Function ISNULLOREMPTY parameter 1 is error!"); if (args1.IsError) { return args1; } }
258+
if (args1.Type != OperandType.TEXT) { args1 = args1.ToText("Function 'IsNullOrEmpty' parameter 1 is error!"); if (args1.IsError) { return args1; } }
259259
return Operand.Create(string.IsNullOrEmpty(args1.TextValue));
260260
}
261261
public override void ToString(StringBuilder stringBuilder, bool addBrackets)
@@ -274,7 +274,7 @@ public override Operand Calculate(AlgorithmEngine work)
274274
{
275275
var args1 = func1.Calculate(work);
276276
if (args1.IsNull) { return Operand.True; }
277-
if (args1.Type != OperandType.TEXT) { args1 = args1.ToText("Function ISNULLORWHITESPACE parameter 1 is error!"); if (args1.IsError) { return args1; } }
277+
if (args1.Type != OperandType.TEXT) { args1 = args1.ToText("Function 'IsNullOrWhiteSpace' parameter 1 is error!"); if (args1.IsError) { return args1; } }
278278
return Operand.Create(string.IsNullOrWhiteSpace(args1.TextValue));
279279
}
280280
public override void ToString(StringBuilder stringBuilder, bool addBrackets)

csharp/ToolGood.Algorithm/Internals/Functions/FunctionBase.math.cs

Lines changed: 126 additions & 126 deletions
Large diffs are not rendered by default.

csharp/ToolGood.Algorithm/Internals/Functions/FunctionBase.string.cs

Lines changed: 45 additions & 45 deletions
Large diffs are not rendered by default.

csharp/ToolGood.Algorithm/Internals/Functions/FunctionBase.sum.cs

Lines changed: 157 additions & 157 deletions
Large diffs are not rendered by default.

csharp/ToolGood.Algorithm/Internals/Functions/FunctionBase.time.cs

Lines changed: 70 additions & 70 deletions
Large diffs are not rendered by default.

csharp/ToolGood.Algorithm/MathNet/ExcelFunctions.ext.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,20 @@ public static double BinomDist(int k, int n, double p, bool state)
5050
return Binomial.CDF(p, n, k);
5151
}
5252

53-
public static double POISSON(int k, double lambda, bool state)
53+
public static double Poisson(int k, double lambda, bool state)
5454
{
5555
if (state == false) {
56-
return Poisson.PMF(lambda, k);
56+
return Distributions.Poisson.PMF(lambda, k);
5757
}
58-
return Poisson.CDF(lambda, k);
58+
return Distributions.Poisson.CDF(lambda, k);
5959
}
6060

61-
public static double WEIBULL(double x, double shape, double scale, bool state)
61+
public static double Weibull(double x, double shape, double scale, bool state)
6262
{
6363
if (state == false) {
64-
return Weibull.PDF(shape, scale, x);
64+
return Distributions.Weibull.PDF(shape, scale, x);
6565
}
66-
return Weibull.CDF(shape, scale, x);
66+
return Distributions.Weibull.CDF(shape, scale, x);
6767
}
6868
}
6969
}

0 commit comments

Comments
 (0)