diff --git a/packages/cultmath/tests/CultMath.Tests/BoundedLeastSquaresBaseTraces.cs b/packages/cultmath/tests/CultMath.Tests/BoundedLeastSquaresBaseTraces.cs index 33243d78..3cf0ec00 100644 --- a/packages/cultmath/tests/CultMath.Tests/BoundedLeastSquaresBaseTraces.cs +++ b/packages/cultmath/tests/CultMath.Tests/BoundedLeastSquaresBaseTraces.cs @@ -20,6 +20,12 @@ internal static class BlsBaseTraces Kkt -1 2E-06 0 0 end Converged 1 3f800000 00000000 00000000 """, + ["tie-pair-cap-0"] = """ + Candidate 0 1 6.661338147750939E-16 1E-06 + Release 0 Infinity 0 0 + Cap -1 0 0 0 + end IterationLimit 0 00000000 00000000 + """, ["tie-pair-at-hi"] = """ Candidate 0 3 1.9984014443252818E-15 1E-06 Release 0 Infinity 0 0 diff --git a/packages/cultmath/tests/CultMath.Tests/BoundedLeastSquaresTrace.cs b/packages/cultmath/tests/CultMath.Tests/BoundedLeastSquaresTrace.cs index 71d05c7b..c9baeb0e 100644 --- a/packages/cultmath/tests/CultMath.Tests/BoundedLeastSquaresTrace.cs +++ b/packages/cultmath/tests/CultMath.Tests/BoundedLeastSquaresTrace.cs @@ -54,6 +54,8 @@ internal static class BlsTrace // Equal violations: which column is released first is the tie-break (min |x0 + x1 - 1| on [0,1]^2, then three copies). yield return Make("tie-pair", 1, 2, new[] { 1f, 1f }, new[] { 1f }, new float[2], Fill(1f, 2)); yield return Make("tie-triple", 2, 3, Fill(1f, 6), new[] { 1f, 1f }, new float[3], Fill(1f, 3)); + // The cap reached right after a release, before any further step: the other place the cap ends a solve. + yield return Make("tie-pair-cap-0", 1, 2, new[] { 1f, 1f }, new[] { 1f }, new float[2], Fill(1f, 2), max: 0); yield return Make("tie-pair-at-hi", 1, 2, new[] { 1f, 1f }, new[] { -1f }, new float[2], Fill(1f, 2), Fill(1f, 2)); // A step that lands exactly on a bound is a full step, not a blocked one.