[英]How to use PolynomialSplineFunction from Apache Commons Math
I do not understand number two: 我不明白第二点:
The value of the polynomial spline function for an argument x is computed as follows:
参数x的多项式样条函数的值计算如下:
- The knot array is searched to find the segment to which x belongs.
搜索结数组以查找x所属的段。 If x is less than the smallest knot point or greater than the largest one, an IllegalArgumentException is thrown.
如果x小于最小结点或大于最大结点,则抛出IllegalArgumentException。
- Let j be the index of the largest knot point that is less than or equal to x.
令j为小于或等于x的最大结点的索引。 The value returned is polynomials[j](x - knot[j])
返回的值是多项式[j](x-knot [j])
The polynomial array is always one value less than the knot array right? 多项式数组总是比结结数组小一个值,对吗? So the second section does not always work?
那么第二部分并不总是有效吗? Is there a better way to state number 2?
有没有更好的方法陈述2号?
That just says that if x
belongs to the interval [knot[j], knot[j+1]]
, then the corresponding y
value will be computed as polynomials[j](x - knot[j])
. 这只是说,如果
x
属于区间[knot[j], knot[j+1]]
,则相应的y
值将被计算为polynomials[j](x - knot[j])
。 If your polynomials
array's last index is n
then the last knot
interval will be [knot[n], knot[n+1]]
, meaning the last index of the knot
array is n+1
(so 2 will always hold). 如果您的
polynomials
数组的最后一个索引为n
则最后一个knot
间隔将为[knot[n], knot[n+1]]
,这意味着该knot
数组的最后一个索引为n+1
(因此2将始终成立)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.