public MKT(MKT_Config config) { this.shlpWrapper = config.Shlp; this.firstSeparator = config.FirstSeparator; secondSeparator = config.SecondSeparator; this.generator = config.Generator; this.iterations = 3; this.bounds = GlobalSettings.GetBounds(); this.lambda = config.Lambda; this.N = config.N; this.n = config.n; this.fn = GlobalSettings.Fn; }
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 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 SquareInformation(int pX, int pY, SquarePoint pTarget, ModelInfo pMap, bool pUserOverride, bool CalculateDiagonal) { this.mX = pX; this.mY = pY; this.mTarget = pTarget; this.mPoint = new SquarePoint(pX, pY, pTarget.X, pTarget.Y, pMap.GetState(pX, pY), pUserOverride); this.mPos = new SquarePoint[8]; if (CalculateDiagonal) { this.mPos[1] = new SquarePoint(pX - 1, pY - 1, pTarget.X, pTarget.Y, pMap.GetState(pX - 1, pY - 1), pUserOverride); this.mPos[3] = new SquarePoint(pX - 1, pY + 1, pTarget.X, pTarget.Y, pMap.GetState(pX - 1, pY + 1), pUserOverride); this.mPos[5] = new SquarePoint(pX + 1, pY + 1, pTarget.X, pTarget.Y, pMap.GetState(pX + 1, pY + 1), pUserOverride); this.mPos[7] = new SquarePoint(pX + 1, pY - 1, pTarget.X, pTarget.Y, pMap.GetState(pX + 1, pY - 1), pUserOverride); } this.mPos[0] = new SquarePoint(pX, pY - 1, pTarget.X, pTarget.Y, pMap.GetState(pX, pY - 1), pUserOverride); this.mPos[2] = new SquarePoint(pX - 1, pY, pTarget.X, pTarget.Y, pMap.GetState(pX - 1, pY), pUserOverride); this.mPos[4] = new SquarePoint(pX, pY + 1, pTarget.X, pTarget.Y, pMap.GetState(pX, pY + 1), pUserOverride); this.mPos[6] = new SquarePoint(pX + 1, pY, pTarget.X, pTarget.Y, pMap.GetState(pX + 1, pY), pUserOverride); }
public SquareInformation(int pX, int pY, SquarePoint pTarget, ModelInfo pMap, bool pUserOverride, bool CalculateDiagonal, int[,] GroupGates, Room room, double Height) { this.mX = pX; this.mY = pY; this.mTarget = pTarget; this.mPoint = new SquarePoint(pX, pY, pTarget.X, pTarget.Y, pMap.GetState(pX, pY), pUserOverride, false, room.method_93(pX, pY), Height, room.GetRoomUsersBySquare(pX, pY),room); this.mPos = new SquarePoint[8]; if (CalculateDiagonal) { this.mPos[1] = new SquarePoint(pX - 1, pY - 1, pTarget.X, pTarget.Y, pMap.GetState(pX - 1, pY - 1), pUserOverride, false, room.method_93(pX - 1, pY - 1), Height, room.GetRoomUsersBySquare(pX - 1, pY - 1),room); this.mPos[3] = new SquarePoint(pX - 1, pY + 1, pTarget.X, pTarget.Y, pMap.GetState(pX - 1, pY + 1), pUserOverride, false, room.method_93(pX - 1, pY + 1), Height, room.GetRoomUsersBySquare(pX - 1, pY + 1),room); this.mPos[5] = new SquarePoint(pX + 1, pY + 1, pTarget.X, pTarget.Y, pMap.GetState(pX + 1, pY + 1), pUserOverride, false, room.method_93(pX + 1, pY + 1), Height, room.GetRoomUsersBySquare(pX + 1, pY + 1),room); this.mPos[7] = new SquarePoint(pX + 1, pY - 1, pTarget.X, pTarget.Y, pMap.GetState(pX + 1, pY - 1), pUserOverride, false, room.method_93(pX + 1, pY - 1), Height, room.GetRoomUsersBySquare(pX + 1, pY - 1),room); } this.mPos[0] = new SquarePoint(pX, pY - 1, pTarget.X, pTarget.Y, pMap.GetState(pX, pY - 1), pUserOverride, false, room.method_93(pX, pY - 1), Height, room.GetRoomUsersBySquare(pX, pY - 1),room); this.mPos[2] = new SquarePoint(pX - 1, pY, pTarget.X, pTarget.Y, pMap.GetState(pX - 1, pY), pUserOverride, false, room.method_93(pX - 1, pY), Height, room.GetRoomUsersBySquare(pX - 1, pY),room); this.mPos[4] = new SquarePoint(pX, pY + 1, pTarget.X, pTarget.Y, pMap.GetState(pX, pY + 1), pUserOverride, false, room.method_93(pX, pY + 1), Height, room.GetRoomUsersBySquare(pX, pY + 1),room); this.mPos[6] = new SquarePoint(pX + 1, pY, pTarget.X, pTarget.Y, pMap.GetState(pX + 1, pY), pUserOverride, false, room.method_93(pX + 1, pY), Height, room.GetRoomUsersBySquare(pX + 1, pY),room); }
internal SquareInformation(int pX, int pY, SquarePoint pTarget, ModelInfo pMap, bool pUserOverride, bool CalculateDiagonal) { mX = pX; mY = pY; mTarget = pTarget; mPoint = new SquarePoint(pX, pY, pTarget.X, pTarget.Y, pMap.GetState(pX, pY), pUserOverride); //Analyze all the squares arround the user mPos = new SquarePoint[8]; if (CalculateDiagonal) { mPos[1] = new SquarePoint(pX - 1, pY - 1, pTarget.X, pTarget.Y, pMap.GetState(pX - 1, pY - 1), pUserOverride); mPos[3] = new SquarePoint(pX - 1, pY + 1, pTarget.X, pTarget.Y, pMap.GetState(pX - 1, pY + 1), pUserOverride); mPos[5] = new SquarePoint(pX + 1, pY + 1, pTarget.X, pTarget.Y, pMap.GetState(pX + 1, pY + 1), pUserOverride); mPos[7] = new SquarePoint(pX + 1, pY - 1, pTarget.X, pTarget.Y, pMap.GetState(pX + 1, pY - 1), pUserOverride); } mPos[0] = new SquarePoint(pX, pY - 1, pTarget.X, pTarget.Y, pMap.GetState(pX, pY - 1), pUserOverride); mPos[2] = new SquarePoint(pX - 1, pY, pTarget.X, pTarget.Y, pMap.GetState(pX - 1, pY), pUserOverride); mPos[4] = new SquarePoint(pX, pY + 1, pTarget.X, pTarget.Y, pMap.GetState(pX, pY + 1), pUserOverride); mPos[6] = new SquarePoint(pX + 1, pY, pTarget.X, pTarget.Y, pMap.GetState(pX + 1, pY), pUserOverride); ///456 //Y3X7 ///218 ////X }
public NelderMidWrapper(Func<float, float, float> fn, SquarePoint[] bounds, MktIterationMode iterationMode) { this.fn = fn; this.bounds = bounds; this.iterationMode = iterationMode; }