Adapt to "Commons Numbers" API updates.

Cf. NUMBERS-159.
This commit is contained in:
Gilles Sadowski 2021-06-09 16:20:39 +02:00
parent a5b1aa0294
commit 1d83419c90
9 changed files with 11 additions and 11 deletions

View File

@ -19,7 +19,7 @@ package org.apache.commons.math4.legacy.core;
import org.junit.Assert;
import org.junit.Test;
import org.apache.commons.numbers.arrays.LinearCombination;
import org.apache.commons.numbers.core.LinearCombination;
import org.apache.commons.rng.UniformRandomProvider;
import org.apache.commons.rng.simple.RandomSource;
import org.apache.commons.math4.legacy.core.jdkmath.AccurateMath;

View File

@ -17,7 +17,7 @@
package org.apache.commons.math4.legacy.analysis;
import org.apache.commons.numbers.arrays.LinearCombination;
import org.apache.commons.numbers.core.LinearCombination;
import org.apache.commons.math4.legacy.analysis.differentiation.DerivativeStructure;
import org.apache.commons.math4.legacy.analysis.differentiation.MultivariateDifferentiableFunction;
import org.apache.commons.math4.legacy.analysis.differentiation.UnivariateDifferentiableFunction;

View File

@ -21,7 +21,7 @@ import java.util.Arrays;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.apache.commons.numbers.arrays.LinearCombination;
import org.apache.commons.numbers.core.LinearCombination;
import org.apache.commons.math4.legacy.exception.DimensionMismatchException;
import org.apache.commons.math4.legacy.exception.MathArithmeticException;
import org.apache.commons.math4.legacy.exception.MathInternalError;

View File

@ -19,7 +19,7 @@ package org.apache.commons.math4.legacy.analysis.differentiation;
import java.util.Arrays;
import java.io.Serializable;
import org.apache.commons.numbers.arrays.LinearCombination;
import org.apache.commons.numbers.core.LinearCombination;
import org.apache.commons.math4.legacy.core.Field;
import org.apache.commons.math4.legacy.core.FieldElement;
import org.apache.commons.math4.legacy.core.RealFieldElement;

View File

@ -21,7 +21,7 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.numbers.arrays.LinearCombination;
import org.apache.commons.numbers.core.LinearCombination;
import org.apache.commons.numbers.core.Precision;
import org.apache.commons.math4.legacy.core.Field;
import org.apache.commons.math4.legacy.core.FieldElement;

View File

@ -18,7 +18,7 @@ package org.apache.commons.math4.legacy.analysis.interpolation;
import java.util.Arrays;
import org.apache.commons.numbers.arrays.LinearCombination;
import org.apache.commons.numbers.core.LinearCombination;
import org.apache.commons.math4.legacy.analysis.BivariateFunction;
import org.apache.commons.math4.legacy.exception.DimensionMismatchException;
import org.apache.commons.math4.legacy.exception.NoDataException;

View File

@ -18,8 +18,8 @@ package org.apache.commons.math4.legacy.analysis.interpolation;
import java.util.List;
import java.util.ArrayList;
import org.apache.commons.numbers.arrays.CosAngle;
import org.apache.commons.numbers.arrays.SafeNorm;
import org.apache.commons.numbers.core.Norm;
import org.apache.commons.numbers.angle.CosAngle;
import org.apache.commons.rng.sampling.UnitSphereSampler;
import org.apache.commons.math4.legacy.exception.DimensionMismatchException;
import org.apache.commons.math4.legacy.exception.NotPositiveException;
@ -222,7 +222,7 @@ public class InterpolatingMicrosphere {
for (int i = 0; i < numSamples; i++) {
// Vector between interpolation point and current sample point.
final double[] diff = MathArrays.ebeSubtract(samplePoints[i], point);
final double diffNorm = SafeNorm.value(diff);
final double diffNorm = Norm.L2.of(diff);
if (AccurateMath.abs(diffNorm) < noInterpolationTolerance) {
// No need to interpolate, as the interpolation point is

View File

@ -19,7 +19,7 @@ package org.apache.commons.math4.legacy.field;
import org.junit.Assert;
import org.junit.Test;
import org.apache.commons.numbers.arrays.LinearCombination;
import org.apache.commons.numbers.core.LinearCombination;
import org.apache.commons.rng.UniformRandomProvider;
import org.apache.commons.rng.simple.RandomSource;
import org.apache.commons.math4.legacy.core.RealFieldElement;

View File

@ -17,7 +17,7 @@
package org.apache.commons.math4.legacy.ode.nonstiff;
import org.apache.commons.math4.legacy.core.jdkmath.AccurateMath;
import org.apache.commons.numbers.arrays.LinearCombination;
import org.apache.commons.numbers.core.LinearCombination;
import org.apache.commons.math4.legacy.core.Field;
import org.apache.commons.math4.legacy.core.RealFieldElement;
import org.apache.commons.math4.legacy.exception.DimensionMismatchException;