Package ffx.numerics.integrate
Class Integrate1DTest
java.lang.Object
ffx.utilities.FFXTest
ffx.numerics.integrate.Integrate1DTest
The IntegrationTest is a JUnit test for the Integration program that ensures that the integrals
are calculated correctly. This test is run using known integrals calculated with the equation
y=10sin(6x)-7cos(5x)+11sin(8x).
- Author:
- Claire O'Connell
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Ensures that integration performs the same on a DoublesDataSet constructed from a function as directly from the function; uses both DoublesDataSet constructors.void
Tests the parallelized versions of the integration methods.void
A more difficult test on polynomials, with just five points and larger coefficients; intended to test stability in extreme cases.void
Basic test for polynomial functions; checks to ensure that each integration method is behaving as expected, and returns the exact value (to within machine precision) when the method should be exact.void
Ensures that the by-bin integration machinery matches an all-at-once integral.void
Methods inherited from class ffx.utilities.FFXTest
afterClass, afterTest, beforeClass, beforeTest, registerTemporaryDirectory
-
Constructor Details
-
Integrate1DTest
public Integrate1DTest()
-
-
Method Details
-
castToDoubleSetTest
public void castToDoubleSetTest()Ensures that integration performs the same on a DoublesDataSet constructed from a function as directly from the function; uses both DoublesDataSet constructors. -
parallelTest
public void parallelTest()Tests the parallelized versions of the integration methods. Overall, these are not recommended for production use; it would require an enormous number of points for numerical integration of a 1-D function to be at all significant for timing, and the parallelized versions are probably not quite as CPU-efficient. -
polynomialGrinderTest
public void polynomialGrinderTest()A more difficult test on polynomials, with just five points and larger coefficients; intended to test stability in extreme cases. -
polynomialTest
public void polynomialTest()Basic test for polynomial functions; checks to ensure that each integration method is behaving as expected, and returns the exact value (to within machine precision) when the method should be exact. For example, Simpson's method fits a quadratic curve to 3 points, and should return the exact integral for polynomials of degree 2 or less. -
testByBinIntegral
public void testByBinIntegral()Ensures that the by-bin integration machinery matches an all-at-once integral. -
testSinCosine
public void testSinCosine()
-