Added Bessel functions of the first kind, based on NetLib implementation. JIRA: MATH-1066 Based on patch provided by Brian Wignall
Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/b723f82b Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/b723f82b Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/b723f82b Branch: refs/heads/master Commit: b723f82bd55e1b78a370925393d3ee638020da0b Parents: 3769587 Author: Phil Steitz <phil.ste...@gmail.com> Authored: Mon Dec 15 15:11:32 2014 -0700 Committer: Phil Steitz <phil.ste...@gmail.com> Committed: Mon Dec 15 15:11:32 2014 -0700 ---------------------------------------------------------------------- .../org/apache/commons/math3/exception/util/LocalizedFormats.java | 2 ++ src/main/java/org/apache/commons/math3/special/BesselJ.java | 1 + .../commons/math3/exception/util/LocalizedFormats_fr.properties | 2 ++ src/test/java/org/apache/commons/math3/special/BesselJTest.java | 1 - 4 files changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-math/blob/b723f82b/src/main/java/org/apache/commons/math3/exception/util/LocalizedFormats.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math3/exception/util/LocalizedFormats.java b/src/main/java/org/apache/commons/math3/exception/util/LocalizedFormats.java index b775440..0f3848f 100644 --- a/src/main/java/org/apache/commons/math3/exception/util/LocalizedFormats.java +++ b/src/main/java/org/apache/commons/math3/exception/util/LocalizedFormats.java @@ -48,6 +48,8 @@ public enum LocalizedFormats implements Localizable { AT_LEAST_ONE_COLUMN("matrix must have at least one column"), AT_LEAST_ONE_ROW("matrix must have at least one row"), BANDWIDTH("bandwidth ({0})"), + BESSEL_FUNCTION_BAD_ARGUMENT("Bessel function of order {0} cannot be computed for x = {1}"), + BESSEL_FUNCTION_FAILED_CONVERGENCE("Bessel function of order {0} failed to converge for x = {1}"), BINOMIAL_INVALID_PARAMETERS_ORDER("must have n >= k for binomial coefficient (n, k), got k = {0}, n = {1}"), BINOMIAL_NEGATIVE_PARAMETER("must have n >= 0 for binomial coefficient (n, k), got n = {0}"), CANNOT_CLEAR_STATISTIC_CONSTRUCTED_FROM_EXTERNAL_MOMENTS("statistics constructed from external moments cannot be cleared"), http://git-wip-us.apache.org/repos/asf/commons-math/blob/b723f82b/src/main/java/org/apache/commons/math3/special/BesselJ.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math3/special/BesselJ.java b/src/main/java/org/apache/commons/math3/special/BesselJ.java index 7cacc2f..f1e6999 100644 --- a/src/main/java/org/apache/commons/math3/special/BesselJ.java +++ b/src/main/java/org/apache/commons/math3/special/BesselJ.java @@ -53,6 +53,7 @@ import org.apache.commons.math3.util.FastMath; * <li>"Bessel Functions of Real Argument and Integer Order," Sookne, D. J., NBS * Jour. of Res. B. 77B, 1973, pp 125-132.</li> * </ul> </p> + * @since 3.4 */ public class BesselJ implements UnivariateFunction { http://git-wip-us.apache.org/repos/asf/commons-math/blob/b723f82b/src/main/resources/assets/org/apache/commons/math3/exception/util/LocalizedFormats_fr.properties ---------------------------------------------------------------------- diff --git a/src/main/resources/assets/org/apache/commons/math3/exception/util/LocalizedFormats_fr.properties b/src/main/resources/assets/org/apache/commons/math3/exception/util/LocalizedFormats_fr.properties index 599dc7f..4157e52 100644 --- a/src/main/resources/assets/org/apache/commons/math3/exception/util/LocalizedFormats_fr.properties +++ b/src/main/resources/assets/org/apache/commons/math3/exception/util/LocalizedFormats_fr.properties @@ -21,6 +21,8 @@ ASSYMETRIC_EIGEN_NOT_SUPPORTED = la d\u00e9composition en valeurs/vecteurs propr AT_LEAST_ONE_COLUMN = une matrice doit comporter au moins une colonne AT_LEAST_ONE_ROW = une matrice doit comporter au moins une ligne BANDWIDTH = bande passante ({0}) +BESSEL_FUNCTION_BAD_ARGUMENT = fonction d'ordre {0} ne peut pas \u00eatre calcul\u00e9 pour x = {1} +BESSEL_FUNCTION_FAILED_CONVERGENCE = fonction de l'ordre {0} n'a pas r\u00e9ussi \u00e0 converger pour x = {1} BINOMIAL_INVALID_PARAMETERS_ORDER = n doit \u00eatre sup\u00e9rieur ou \u00e9gal \u00e0 k pour le coefficient du bin\u00f4me (n, k), or k = {0}, n = {1} BINOMIAL_NEGATIVE_PARAMETER = n doit \u00eatre positif pour le coefficient du bin\u00f4me (n, k), or n = {0} CANNOT_CLEAR_STATISTIC_CONSTRUCTED_FROM_EXTERNAL_MOMENTS = les statistiques bas\u00e9es sur des moments externes ne peuvent pas \u00eatre remises \u00e0 z\u00e9ro http://git-wip-us.apache.org/repos/asf/commons-math/blob/b723f82b/src/test/java/org/apache/commons/math3/special/BesselJTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math3/special/BesselJTest.java b/src/test/java/org/apache/commons/math3/special/BesselJTest.java index b49fd60..7477bf4 100644 --- a/src/test/java/org/apache/commons/math3/special/BesselJTest.java +++ b/src/test/java/org/apache/commons/math3/special/BesselJTest.java @@ -16,7 +16,6 @@ */ package org.apache.commons.math3.special; -import org.apache.commons.math3.exception.ConvergenceException; import org.apache.commons.math3.exception.MathIllegalArgumentException; import org.junit.Assert; import org.junit.Test;