internal Bound(Bound @base, BoundCurveExtrapolator extrapolatorLeft, BoundCurveExtrapolator extrapolatorRight) : base(@base, extrapolatorLeft, extrapolatorRight) { this.xValues = @base.xValues; this.yValues = @base.yValues; this.poly = @base.poly; this.polySens = @base.polySens; }
internal Bound(DoubleArray xValues, DoubleArray yValues) : base(xValues, yValues) { this.xValues = xValues.toArrayUnsafe(); this.yValues = yValues.toArrayUnsafe(); PiecewisePolynomialInterpolator underlying = new NonnegativityPreservingCubicSplineInterpolator(new NaturalSplineInterpolator()); this.poly = underlying.interpolate(xValues.toArray(), yValues.toArray()); this.polySens = Suppliers.memoize(() => underlying.interpolateWithSensitivity(xValues.toArray(), yValues.toArray())); }
internal Bound(DoubleArray xValues, DoubleArray yValues) : base(xValues, yValues) { ArgChecker.isTrue(xValues.get(0) > 0d || xValues.get(xValues.size() - 1) < 0d, "xValues must have the same sign"); this.xValues = xValues.toArrayUnsafe(); this.yValues = yValues.toArrayUnsafe(); LinearInterpolator underlying = new LinearInterpolator(); this.poly = underlying.interpolate(xValues.toArray(), getProduct(this.xValues, this.yValues)); this.polySens = Suppliers.memoize(() => underlying.interpolateWithSensitivity(xValues.toArray(), getProduct(this.xValues, this.yValues))); }
internal Bound(DoubleArray xValues, DoubleArray yValues) : base(xValues, yValues) { this.xValues = xValues.toArrayUnsafe(); this.yValues = yValues.toArrayUnsafe(); this.logYValues = getYLogValues(this.yValues); PiecewisePolynomialInterpolator underlying = new MonotonicityPreservingCubicSplineInterpolator(new LogNaturalSplineHelper()); this.poly = underlying.interpolate(xValues.toArray(), logYValues); this.polySens = Suppliers.memoize(() => underlying.interpolateWithSensitivity(xValues.toArray(), logYValues)); }
internal Bound(DoubleArray xValues, DoubleArray yValues) : base(xValues, yValues) { this.xValues = xValues.toArrayUnsafe(); this.yValues = yValues.toArrayUnsafe(); this.logYValues = getYLogValues(this.yValues); ClampedPiecewisePolynomialInterpolator underlying = new ClampedPiecewisePolynomialInterpolator(new NaturalSplineInterpolator(), new double[] { 0d }, new double[] { 0d }); this.poly = underlying.interpolate(xValues.toArray(), logYValues); this.polySens = Suppliers.memoize(() => underlying.interpolateWithSensitivity(xValues.toArray(), logYValues)); }
internal Bound(DoubleArray xValues, DoubleArray yValues) : base(xValues, yValues) { ArgChecker.isTrue(xValues.get(0) > 0d || xValues.get(xValues.size() - 1) < 0d, "xValues must have the same sign"); this.xValues = xValues.toArrayUnsafe(); this.yValues = yValues.toArrayUnsafe(); PiecewisePolynomialInterpolator underlying = new MonotonicityPreservingCubicSplineInterpolator(new LogNaturalSplineHelper()); this.poly = underlying.interpolate(xValues.toArray(), getProduct(this.xValues, this.yValues)); this.polySens = Suppliers.memoize(() => underlying.interpolateWithSensitivity(xValues.toArray(), getProduct(this.xValues, this.yValues))); }
internal Bound(DoubleArray xValues, DoubleArray yValues) : base(xValues, yValues) { this.xValues = xValues.toArrayUnsafe(); this.yValues = yValues.toArrayUnsafe(); PiecewisePolynomialInterpolator underlying = new PiecewiseCubicHermiteSplineInterpolatorWithSensitivity(); PiecewisePolynomialResult poly = underlying.interpolate(xValues.toArray(), yValues.toArray()); this.knots = poly.Knots; this.coefMatrix = poly.CoefMatrix; this.coefMatrixSensi = Suppliers.memoize(() => underlying.interpolateWithSensitivity(xValues.toArray(), yValues.toArray()).CoefficientSensitivityAll); }