简体   繁体   English

如何从Apache Commons Math使用PolynomialSplineFunction

[英]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的多项式样条函数的值计算如下:

  1. 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。
  2. 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号?

Link to documentation 链接到文档

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.

相关问题 如何正确使用 Java 中 Apache 公共数学库中的 ZipfDistribution? - How to use correctly ZipfDistribution from Apache commons math library in Java? 如何在Apache Commons Math中使用BicubicSplineInterpolator? - How to use BicubicSplineInterpolator in Apache Commons Math? 如何使用org.apache.commons.math3.distribution - how to use org.apache.commons.math3.distribution apache.commons.math3 - 如何使用线性编程? - apache.commons.math3 - how to use linear programming? 如何从apache.commons使用Factory? - How to use Factory from apache.commons? Apache Commons数学优化 - Apache Commons Math optimization NoClassDefFoundError 与 Apache 公共数学 - NoClassDefFoundError with Apache commons math 如何在导入org.apache.commons.math3.analysis.integration.SimpsonIntegrator中使用标准的SimpsonIntegrator; - How to use standard SimpsonIntegrator in import org.apache.commons.math3.analysis.integration.SimpsonIntegrator; 如何使用Apache的commons.math FastFourierTransformer进行时间序列预测 - How to use apache's commons.math FastFourierTransformer for time series prediction 如何实例化/使用Transform接口Commons Math? - How to instantiate/use Transform interface Commons Math?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM