private static double MinLCxSNode(double[] LC, ConnectedParameters parametersY, int a) { var min = double.PositiveInfinity; var ey = parametersY.E == 0 ? -_k : parametersY.E; for (var c1 = 1; c1 <= _k - 1; c1++) { if (c1 + parametersY.B > _k) { continue; } var maxA = parametersY.C > ey + c1 ? parametersY.C : ey + c1; if (maxA != a) { continue; } if (LC[c1] < min) { min = LC[c1]; } } return(min); }
private static double MinRySNode(ConnectedParameters parametersX, double[] Ry, int a) { var min = double.PositiveInfinity; var ex = parametersX.E == 0 ? -_k : parametersX.E; for (var a2 = 1; a2 <= _k - 1; a2++) { if (parametersX.D + a2 > _k) { continue; } var maxA = parametersX.A > ex + a2 - 1 ? parametersX.A : ex + a2 - 1; if (maxA != a) { continue; } if (Ry[a2] < min) { min = Ry[a2]; } } return(min); }