/// <summary>Creates a specific grid point curve factory. /// </summary> /// <typeparam name="TLabel">The type of the label.</typeparam> /// <param name="curveParametrization">The curve parametrization.</param> /// <returns>A factory for <see cref="IGridPointCurve<TLabel>"/> objects with respect to the desired interpolation and extrapolation approaches.</returns> public static IGridPointCurveFactory <TLabel> Create <TLabel>(GridPointCurve.Parametrization curveParametrization) where TLabel : IEquatable <TLabel> { return(new CurveFactory <TLabel>( () => GridPointCurve.Create <TLabel>(curveParametrization), curveParametrization, (gridPointCount, gridPointLabels, gridPointArguments, gridPointValues, gridPointArgumentStartIndex, gridPointValueStartIndex, gridPointArgumentIncrement, gridPointValueIncrement) => { return GridPointCurve.Create(curveParametrization, gridPointCount, gridPointLabels, gridPointArguments, gridPointValues, gridPointArgumentStartIndex, gridPointValueStartIndex, gridPointArgumentIncrement, gridPointValueIncrement); })); }
/// <summary>Creates a specific grid point curve factory. /// </summary> /// <typeparam name="TLabel">The type of the label.</typeparam> /// <param name="curveInterpolator">The curve interpolator.</param> /// <param name="leftExtrapolator">The extrapolator on the left side, i.e. from the first grid point to -\infinity.</param> /// <param name="rightExtrapolator">The extrapolator on the right side, i.e. from the last grid point to \infinity.</param> /// <returns>A factory for <see cref="IGridPointCurve<TLabel>"/> objects with respect to the desired interpolation and extrapolation approaches.</returns> public static IGridPointCurveFactory <TLabel> Create <TLabel>(GridPointCurve.Interpolator curveInterpolator, GridPointCurve.Extrapolator leftExtrapolator, GridPointCurve.Extrapolator rightExtrapolator) where TLabel : IEquatable <TLabel> { return(new CurveFactory <TLabel>( () => GridPointCurve.Create <TLabel>(curveInterpolator, leftExtrapolator, rightExtrapolator), curveInterpolator, (gridPointCount, gridPointLabels, gridPointArguments, gridPointValues, gridPointArgumentStartIndex, gridPointValueStartIndex, gridPointArgumentIncrement, gridPointValueIncrement) => { return GridPointCurve.Create(curveInterpolator, leftExtrapolator, rightExtrapolator, gridPointCount, gridPointLabels, gridPointArguments, gridPointValues, gridPointArgumentStartIndex, gridPointValueStartIndex, gridPointArgumentIncrement, gridPointValueIncrement); })); }