/// <summary> /// Create a new object to do cardinal spline interpolation. /// </summary> /// <param name = "keyPoints">The list of key points to interpolate between.</param> /// <param name = "tension">Specify a custom tension for the tangents. 1 will yield all zero tangents, 0.5 yields a Catmull-Rom spline (default).</param> public CardinalSplineInterpolation(AbstractKeyPointCollection <TValue, TMath> keyPoints, double tension) : base(keyPoints) { Contract.Requires(tension >= 0 && tension <= 1, "The tension should be a value between 0 and 1."); Tension = tension; }
/// <summary> /// Create a new object to do interpolation, initialized with a given list of data. /// </summary> /// <param name = "keyPoints">The list of key points to interpolate between.</param> protected AbstractInterpolation(AbstractKeyPointCollection <TValue, TMath> keyPoints) { KeyPoints = keyPoints; }
protected AbstractInterpolationContract(AbstractKeyPointCollection <TValue, TMath> keyPoints) : base(keyPoints) { }
/// <summary> /// Create a new object to do linear interpolation. /// </summary> /// <param name = "keyPoints">The list of key points to interpolate between.</param> public LinearInterpolation(AbstractKeyPointCollection <TValue, TMath> keyPoints) : base(keyPoints) { }
/// <summary> /// Create a new object to do cardinal spline interpolation. /// </summary> /// <param name = "keyPoints">The list of key points to interpolate between.</param> public CardinalSplineInterpolation(AbstractKeyPointCollection <TValue, TMath> keyPoints) : this(keyPoints, 0.5) { }