public NelderMid( MKT_Point startPoint, Func<float, float, float> fn, SquarePoint[] bounds, MktIterationMode iterationMode) { this.startPoint = startPoint; this.fn = fn; _points = new List<MKT_Point>(); this.bounds = bounds; currentPoints = new MKT_Point[3]; maxPoints = iterationMode == MktIterationMode.Full ? 75 : 6; }
public HyperCubeWrapper(Func<float,float,float> fn, SquarePoint[] bounds, MktIterationMode iterationMode) { this.config = new ShlpHyperCubeConfig { Fn = fn, DeltaSideLenth = 1.1f, InnerPointsCount = 5, SideLength = 1, IterationCount = 15, Bounds = bounds, IterationMode = iterationMode }; }
public HyperCube( SquarePoint startpoint, float sideLength, float deltaSideLenth, int iterationCount, int innerPointsCount, SquarePoint[] bounds, MktIterationMode iterationMode, bool isDebugMode = false) { this.deltaSideLength = deltaSideLenth; this.startPoint = startpoint; this.sideLength = sideLength; this.iterationCount = iterationMode == MktIterationMode.Full ? iterationCount : 2; this.innerPointsCount = innerPointsCount; this.isDebugMode = isDebugMode; this.bounds = bounds; }
public ShlpHyperCube( SquarePoint startpoint, float sideLength, float deltaSideLenth, int iterationCount, int innerPointsCount, SquarePoint[] bounds, Func<float, float, float> fn, MktIterationMode iterationMode) : base(startpoint, sideLength, deltaSideLenth, iterationCount, innerPointsCount, bounds, iterationMode, false) { this.fn = fn; }
private IShlpWrapper GetShlp(MktIterationMode iterationMode) { var type = RandomHelper.Random(1, 10); return type % 2 == 0 ? (IShlpWrapper)new NelderMidWrapper(GlobalSettings.Fn, GlobalSettings.GetBounds(), iterationMode) : new HyperCubeWrapper(GlobalSettings.Fn, GlobalSettings.GetBounds(), iterationMode); }
private static IShlpWrapper GetShlp(int code, MktIterationMode iterationMode) { var type = (ShlpType)code; switch (type) { case ShlpType.HyperCube: return new HyperCubeWrapper(GlobalSettings.Fn, GlobalSettings.GetBounds(), iterationMode); case ShlpType.NelderMid: return new NelderMidWrapper(GlobalSettings.Fn, GlobalSettings.GetBounds(), iterationMode); default: return null; } }
public NelderMidWrapper(Func<float, float, float> fn, SquarePoint[] bounds, MktIterationMode iterationMode) { this.fn = fn; this.bounds = bounds; this.iterationMode = iterationMode; }