Skip to content

Commit 709b95d

Browse files
committed
1.2.0版本
1 parent 0538e4a commit 709b95d

File tree

8 files changed

+1051
-1131
lines changed

8 files changed

+1051
-1131
lines changed

ToolGood.Algorithm.Test/AlgorithmEngine/AlgorithmEngineTest_math.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ public void PERMUT_test()
111111
AlgorithmEngine engine = new AlgorithmEngine();
112112
var t = engine.TryEvaluate("PERMUT(10,2)", 0.0);
113113
Assert.AreEqual(90.0, t);
114+
114115
}
115116

116117
#endregion

ToolGood.Algorithm.Test/ToolGood.Algorithm.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
</ItemGroup>
6262
<ItemGroup>
6363
<ProjectReference Include="..\ToolGood.Algorithm\ToolGood.Algorithm.csproj">
64-
<Project>{f79d1349-805c-46c9-bb99-3fb5caac3e2d}</Project>
64+
<Project>{3c8ae2a1-a7c0-42e3-8082-a95407c6e59e}</Project>
6565
<Name>ToolGood.Algorithm</Name>
6666
</ProjectReference>
6767
</ItemGroup>

ToolGood.Algorithm/MathNet/ExcelFunctions.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,31 +47,31 @@ namespace ToolGood.Algorithm.MathNet.Numerics
4747
/// </summary>
4848
public static partial class ExcelFunctions
4949
{
50-
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
50+
//[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
5151
public static double NormSDist(double z)
5252
{
5353
return Normal.CDF(0d, 1d, z);
5454
}
5555

56-
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
56+
//[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
5757
public static double NormSInv(double probability)
5858
{
5959
return Normal.InvCDF(0d, 1d, probability);
6060
}
6161

62-
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
62+
//[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
6363
public static double NormDist(double x, double mean, double standardDev, bool cumulative)
6464
{
6565
return cumulative ? Normal.CDF(mean, standardDev, x) : Normal.PDF(mean, standardDev, x);
6666
}
6767

68-
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
68+
//[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
6969
public static double NormInv(double probability, double mean, double standardDev)
7070
{
7171
return Normal.InvCDF(mean, standardDev, probability);
7272
}
7373

74-
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
74+
//[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
7575
public static double TDist(double x, int degreesFreedom, int tails)
7676
{
7777
switch (tails)
@@ -85,49 +85,49 @@ public static double TDist(double x, int degreesFreedom, int tails)
8585
}
8686
}
8787

88-
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
88+
//[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
8989
public static double TInv(double probability, int degreesFreedom)
9090
{
9191
return -StudentT.InvCDF(0d, 1d, degreesFreedom, probability/2);
9292
}
9393

94-
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
94+
//[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
9595
public static double FDist(double x, int degreesFreedom1, int degreesFreedom2)
9696
{
9797
return 1d - FisherSnedecor.CDF(degreesFreedom1, degreesFreedom2, x);
9898
}
9999

100-
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
100+
//[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
101101
public static double FInv(double probability, int degreesFreedom1, int degreesFreedom2)
102102
{
103103
return FisherSnedecor.InvCDF(degreesFreedom1, degreesFreedom2, 1d - probability);
104104
}
105105

106-
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
106+
//[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
107107
public static double BetaDist(double x, double alpha, double beta)
108108
{
109109
return Beta.CDF(alpha, beta, x);
110110
}
111111

112-
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
112+
//[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
113113
public static double BetaInv(double probability, double alpha, double beta)
114114
{
115115
return Beta.InvCDF(alpha, beta, probability);
116116
}
117117

118-
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
118+
//[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
119119
public static double GammaDist(double x, double alpha, double beta, bool cumulative)
120120
{
121121
return cumulative ? Gamma.CDF(alpha, 1/beta, x) : Gamma.PDF(alpha, 1/beta, x);
122122
}
123123

124-
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
124+
//[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
125125
public static double GammaInv(double probability, double alpha, double beta)
126126
{
127127
return Gamma.InvCDF(alpha, 1/beta, probability);
128128
}
129129

130-
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
130+
//[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
131131
public static double Quartile(double[] array, int quant)
132132
{
133133
switch (quant)
@@ -147,13 +147,13 @@ public static double Quartile(double[] array, int quant)
147147
}
148148
}
149149

150-
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
150+
//[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
151151
public static double Percentile(double[] array, double k)
152152
{
153153
return array.QuantileCustom(k, QuantileDefinition.Excel);
154154
}
155155

156-
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
156+
//[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
157157
public static double PercentRank(double[] array, double x)
158158
{
159159
return array.QuantileRank(x, RankDefinition.Min);

0 commit comments

Comments
 (0)