Closed ClarkMcGrew closed 4 months ago
For Ciro: I thought about it some more, and implemented our second criterion for the slopes at the end points. I think it is the least surprising behavior. The options were
Option 1 results on non-monotonic splines, so it's not a good idea. Option 3 severely distorts otherwise monotonic splines. That leaves option 2. It gives a visually reasonable behavior, and the interpolated spline is always monotonic. It also makes sure that splines that already meet the monotonic criteria are left alone. See attached figure. The red is the a parent TSpline3, and the black is the monotonic correction.
Adds validation for making the spline knot slopes meet the Fritsche-Carlson monotonicity requirements. This also separates the actual Fritsche-Carlson code out of the specific DialFactory so that it can be used outside of that class. It is no longer a class method.