public FindMiminum ( double>.Func |
||
@func | double>.Func | |
lower | double | 구간의 하한 |
upper | double | 구간의 상한 |
tryCount | int | 시도횟수 |
tolerance | double | 허용 오차 |
return | double |
public void GoldenSectionMinimumFinderTest() { const double lower = -500; const double upper = 0; Func<double, double> f = F; var golden = new GoldenSectionMinimumFinder(); var x = golden.FindMiminum(f, lower, upper); if(IsDebugEnabled) log.Debug(@"{0} : {1}", golden, x); Assert.AreNotEqual(double.NaN, x); if(IsDebugEnabled) log.Debug("func({0}) = {1}", x, f(x)); }
public void GoldenSectionMinimumFinderTest() { const double lower = -500; const double upper = 0; Func <double, double> f = F; var golden = new GoldenSectionMinimumFinder(); var x = golden.FindMiminum(f, lower, upper); if (IsDebugEnabled) { log.Debug(@"{0} : {1}", golden, x); } Assert.AreNotEqual(double.NaN, x); if (IsDebugEnabled) { log.Debug("func({0}) = {1}", x, f(x)); } }