类 PolynomialFunctionTest
java.lang.Object
org.hipparchus.analysis.polynomials.PolynomialFunctionTest
测试 UnivariateFunction 的 PolynomialFunction 实现。
-
字段概要
-
构造器概要
-
方法概要
修饰符和类型方法说明void
checkPolynomial
(PolynomialFunction p, String reference) void
void
void
void
void
void
测试常数多项式的值。void
通过比较测试 firstDerivative 函数void
void
void
void
测试线性多项式的值。void
通过比较测试 firstDerivative 函数void
void
测试二阶多项式。void
这将测试五次函数 f(x) = x^2(x-5)(x+3)(x-1) = x^5 - 3x^4 -13x^3 + 15x^2void
void
void
-
字段详细资料
-
tolerance
protected double tolerance测试的误差容限
-
-
构造器详细资料
-
PolynomialFunctionTest
public PolynomialFunctionTest()
-
-
方法详细资料
-
testConstants
public void testConstants()测试常数多项式的值。在任何地方的值为2.5。
-
testLinear
public void testLinear()测试线性多项式的值。这将测试函数 f(x) = 3*x - 1.5
这将有值 f(0) = -1.5, f(-1) = -4.5, f(-2.5) = -9, f(0.5) = 0, f(1.5) = 3 和
f(3) = 7.5
-
testQuadratic
public void testQuadratic()测试二阶多项式。这将测试函数 f(x) = 2x^2 - 3x -2 = (2x+1)(x-2)
-
testQuintic
public void testQuintic()这将测试五次函数 f(x) = x^2(x-5)(x+3)(x-1) = x^5 - 3x^4 -13x^3 + 15x^2 -
testfirstDerivativeComparison
public void testfirstDerivativeComparison()通过比较测试 firstDerivative 函数这将测试函数
f(x) = x^3 - 2x^2 + 6x + 3, g(x) = 3x^2 - 4x + 6
和h(x) = 6x - 4
-
testString
public void testString() -
testAddition
public void testAddition() -
testSubtraction
public void testSubtraction() -
testMultiplication
public void testMultiplication() -
testSerial
public void testSerial() -
testMath341
public void testMath341()通过比较测试 firstDerivative 函数这将测试函数
f(x) = x^3 - 2x^2 + 6x + 3, g(x) = 3x^2 - 4x + 6
和h(x) = 6x - 4
-
testAntiDerivative
public void testAntiDerivative() -
testAntiDerivativeConstant
public void testAntiDerivativeConstant() -
testAntiDerivativeZero
public void testAntiDerivativeZero() -
testAntiDerivativeRandom
public void testAntiDerivativeRandom() -
testIntegrate
public void testIntegrate() -
testIntegrateInfiniteBounds
public void testIntegrateInfiniteBounds() -
testIntegrateBadInterval
public void testIntegrateBadInterval() -
checkPolynomial
-