Reintroduced @Override as master needs at least Java 7. Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/0aa826e8 Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/0aa826e8 Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/0aa826e8
Branch: refs/heads/master Commit: 0aa826e84b14f6f39b23a057986c1329657b9c46 Parents: 6e4265d Author: Luc Maisonobe <l...@apache.org> Authored: Wed Jan 6 13:40:45 2016 +0100 Committer: Luc Maisonobe <l...@apache.org> Committed: Wed Jan 6 13:40:45 2016 +0100 ---------------------------------------------------------------------- .../commons/math4/ode/AbstractFieldIntegrator.java | 14 ++++++++++++++ .../commons/math4/ode/ContinuousOutputFieldModel.java | 1 + .../commons/math4/ode/events/FieldEventState.java | 1 + .../ClassicalRungeKuttaFieldStepInterpolator.java | 1 + .../DormandPrince54FieldStepInterpolator.java | 1 + .../DormandPrince853FieldStepInterpolator.java | 1 + .../ode/nonstiff/EulerFieldStepInterpolator.java | 1 + .../math4/ode/nonstiff/GillFieldStepInterpolator.java | 1 + .../nonstiff/HighamHall54FieldStepInterpolator.java | 1 + .../ode/nonstiff/LutherFieldStepInterpolator.java | 1 + .../ode/nonstiff/MidpointFieldStepInterpolator.java | 1 + .../ode/nonstiff/RungeKuttaFieldStepInterpolator.java | 1 + .../nonstiff/ThreeEighthesFieldStepInterpolator.java | 1 + .../ode/sampling/AbstractFieldStepInterpolator.java | 4 ++++ .../math4/ode/sampling/FieldStepNormalizer.java | 1 + 15 files changed, 31 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-math/blob/0aa826e8/src/main/java/org/apache/commons/math4/ode/AbstractFieldIntegrator.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/ode/AbstractFieldIntegrator.java b/src/main/java/org/apache/commons/math4/ode/AbstractFieldIntegrator.java index 81f4085..d741de5 100644 --- a/src/main/java/org/apache/commons/math4/ode/AbstractFieldIntegrator.java +++ b/src/main/java/org/apache/commons/math4/ode/AbstractFieldIntegrator.java @@ -108,26 +108,31 @@ public abstract class AbstractFieldIntegrator<T extends RealFieldElement<T>> imp } /** {@inheritDoc} */ + @Override public String getName() { return name; } /** {@inheritDoc} */ + @Override public void addStepHandler(final FieldStepHandler<T> handler) { stepHandlers.add(handler); } /** {@inheritDoc} */ + @Override public Collection<FieldStepHandler<T>> getStepHandlers() { return Collections.unmodifiableCollection(stepHandlers); } /** {@inheritDoc} */ + @Override public void clearStepHandlers() { stepHandlers.clear(); } /** {@inheritDoc} */ + @Override public void addEventHandler(final FieldEventHandler<T> handler, final double maxCheckInterval, final double convergence, @@ -141,6 +146,7 @@ public abstract class AbstractFieldIntegrator<T extends RealFieldElement<T>> imp } /** {@inheritDoc} */ + @Override public void addEventHandler(final FieldEventHandler<T> handler, final double maxCheckInterval, final double convergence, @@ -151,6 +157,7 @@ public abstract class AbstractFieldIntegrator<T extends RealFieldElement<T>> imp } /** {@inheritDoc} */ + @Override public Collection<FieldEventHandler<T>> getEventHandlers() { final List<FieldEventHandler<T>> list = new ArrayList<FieldEventHandler<T>>(eventsStates.size()); for (FieldEventState<T> state : eventsStates) { @@ -160,31 +167,37 @@ public abstract class AbstractFieldIntegrator<T extends RealFieldElement<T>> imp } /** {@inheritDoc} */ + @Override public void clearEventHandlers() { eventsStates.clear(); } /** {@inheritDoc} */ + @Override public FieldODEStateAndDerivative<T> getCurrentStepStart() { return stepStart; } /** {@inheritDoc} */ + @Override public T getCurrentSignedStepsize() { return stepSize; } /** {@inheritDoc} */ + @Override public void setMaxEvaluations(int maxEvaluations) { evaluations = evaluations.withMaximalCount((maxEvaluations < 0) ? Integer.MAX_VALUE : maxEvaluations); } /** {@inheritDoc} */ + @Override public int getMaxEvaluations() { return evaluations.getMaximalCount(); } /** {@inheritDoc} */ + @Override public int getEvaluations() { return evaluations.getCount(); } @@ -294,6 +307,7 @@ public abstract class AbstractFieldIntegrator<T extends RealFieldElement<T>> imp SortedSet<FieldEventState<T>> occurringEvents = new TreeSet<FieldEventState<T>>(new Comparator<FieldEventState<T>>() { /** {@inheritDoc} */ + @Override public int compare(FieldEventState<T> es0, FieldEventState<T> es1) { return orderingSign * Double.compare(es0.getEventTime().getReal(), es1.getEventTime().getReal()); } http://git-wip-us.apache.org/repos/asf/commons-math/blob/0aa826e8/src/main/java/org/apache/commons/math4/ode/ContinuousOutputFieldModel.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/ode/ContinuousOutputFieldModel.java b/src/main/java/org/apache/commons/math4/ode/ContinuousOutputFieldModel.java index e9a1a29..e8b96a1 100644 --- a/src/main/java/org/apache/commons/math4/ode/ContinuousOutputFieldModel.java +++ b/src/main/java/org/apache/commons/math4/ode/ContinuousOutputFieldModel.java @@ -176,6 +176,7 @@ public class ContinuousOutputFieldModel<T extends RealFieldElement<T>> } /** {@inheritDoc} */ + @Override public void init(final FieldODEStateAndDerivative<T> initialState, final T t) { initialTime = initialState.getTime(); finalTime = t; http://git-wip-us.apache.org/repos/asf/commons-math/blob/0aa826e8/src/main/java/org/apache/commons/math4/ode/events/FieldEventState.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/ode/events/FieldEventState.java b/src/main/java/org/apache/commons/math4/ode/events/FieldEventState.java index 49b25bd..cfbbd43 100644 --- a/src/main/java/org/apache/commons/math4/ode/events/FieldEventState.java +++ b/src/main/java/org/apache/commons/math4/ode/events/FieldEventState.java @@ -204,6 +204,7 @@ public class FieldEventState<T extends RealFieldElement<T>> { final RealFieldUnivariateFunction<T> f = new RealFieldUnivariateFunction<T>() { /** {@inheritDoc} */ + @Override public T value(final T t) { return handler.g(interpolator.getInterpolatedState(t)); } http://git-wip-us.apache.org/repos/asf/commons-math/blob/0aa826e8/src/main/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaFieldStepInterpolator.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaFieldStepInterpolator.java b/src/main/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaFieldStepInterpolator.java index 9b70331..522530b 100644 --- a/src/main/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaFieldStepInterpolator.java +++ b/src/main/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaFieldStepInterpolator.java @@ -82,6 +82,7 @@ class ClassicalRungeKuttaFieldStepInterpolator<T extends RealFieldElement<T>> } /** {@inheritDoc} */ + @Override protected ClassicalRungeKuttaFieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK, final FieldODEStateAndDerivative<T> newGlobalPreviousState, final FieldODEStateAndDerivative<T> newGlobalCurrentState, http://git-wip-us.apache.org/repos/asf/commons-math/blob/0aa826e8/src/main/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldStepInterpolator.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldStepInterpolator.java b/src/main/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldStepInterpolator.java index c9495e2..16a2fe4 100644 --- a/src/main/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldStepInterpolator.java +++ b/src/main/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldStepInterpolator.java @@ -107,6 +107,7 @@ class DormandPrince54FieldStepInterpolator<T extends RealFieldElement<T>> } /** {@inheritDoc} */ + @Override protected DormandPrince54FieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK, final FieldODEStateAndDerivative<T> newGlobalPreviousState, final FieldODEStateAndDerivative<T> newGlobalCurrentState, http://git-wip-us.apache.org/repos/asf/commons-math/blob/0aa826e8/src/main/java/org/apache/commons/math4/ode/nonstiff/DormandPrince853FieldStepInterpolator.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/ode/nonstiff/DormandPrince853FieldStepInterpolator.java b/src/main/java/org/apache/commons/math4/ode/nonstiff/DormandPrince853FieldStepInterpolator.java index 9f4b2b0..e4d7ee5 100644 --- a/src/main/java/org/apache/commons/math4/ode/nonstiff/DormandPrince853FieldStepInterpolator.java +++ b/src/main/java/org/apache/commons/math4/ode/nonstiff/DormandPrince853FieldStepInterpolator.java @@ -188,6 +188,7 @@ class DormandPrince853FieldStepInterpolator<T extends RealFieldElement<T>> } /** {@inheritDoc} */ + @Override protected DormandPrince853FieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK, final FieldODEStateAndDerivative<T> newGlobalPreviousState, final FieldODEStateAndDerivative<T> newGlobalCurrentState, http://git-wip-us.apache.org/repos/asf/commons-math/blob/0aa826e8/src/main/java/org/apache/commons/math4/ode/nonstiff/EulerFieldStepInterpolator.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/ode/nonstiff/EulerFieldStepInterpolator.java b/src/main/java/org/apache/commons/math4/ode/nonstiff/EulerFieldStepInterpolator.java index 133e540..e57865a 100644 --- a/src/main/java/org/apache/commons/math4/ode/nonstiff/EulerFieldStepInterpolator.java +++ b/src/main/java/org/apache/commons/math4/ode/nonstiff/EulerFieldStepInterpolator.java @@ -72,6 +72,7 @@ class EulerFieldStepInterpolator<T extends RealFieldElement<T>> } /** {@inheritDoc} */ + @Override protected EulerFieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK, final FieldODEStateAndDerivative<T> newGlobalPreviousState, final FieldODEStateAndDerivative<T> newGlobalCurrentState, http://git-wip-us.apache.org/repos/asf/commons-math/blob/0aa826e8/src/main/java/org/apache/commons/math4/ode/nonstiff/GillFieldStepInterpolator.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/ode/nonstiff/GillFieldStepInterpolator.java b/src/main/java/org/apache/commons/math4/ode/nonstiff/GillFieldStepInterpolator.java index fdb16cb..bb00d04 100644 --- a/src/main/java/org/apache/commons/math4/ode/nonstiff/GillFieldStepInterpolator.java +++ b/src/main/java/org/apache/commons/math4/ode/nonstiff/GillFieldStepInterpolator.java @@ -90,6 +90,7 @@ class GillFieldStepInterpolator<T extends RealFieldElement<T>> } /** {@inheritDoc} */ + @Override protected GillFieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK, final FieldODEStateAndDerivative<T> newGlobalPreviousState, final FieldODEStateAndDerivative<T> newGlobalCurrentState, http://git-wip-us.apache.org/repos/asf/commons-math/blob/0aa826e8/src/main/java/org/apache/commons/math4/ode/nonstiff/HighamHall54FieldStepInterpolator.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/ode/nonstiff/HighamHall54FieldStepInterpolator.java b/src/main/java/org/apache/commons/math4/ode/nonstiff/HighamHall54FieldStepInterpolator.java index c5402c2..a915e26 100644 --- a/src/main/java/org/apache/commons/math4/ode/nonstiff/HighamHall54FieldStepInterpolator.java +++ b/src/main/java/org/apache/commons/math4/ode/nonstiff/HighamHall54FieldStepInterpolator.java @@ -58,6 +58,7 @@ class HighamHall54FieldStepInterpolator<T extends RealFieldElement<T>> } /** {@inheritDoc} */ + @Override protected HighamHall54FieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK, final FieldODEStateAndDerivative<T> newGlobalPreviousState, final FieldODEStateAndDerivative<T> newGlobalCurrentState, http://git-wip-us.apache.org/repos/asf/commons-math/blob/0aa826e8/src/main/java/org/apache/commons/math4/ode/nonstiff/LutherFieldStepInterpolator.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/ode/nonstiff/LutherFieldStepInterpolator.java b/src/main/java/org/apache/commons/math4/ode/nonstiff/LutherFieldStepInterpolator.java index 22bc403..438e09e 100644 --- a/src/main/java/org/apache/commons/math4/ode/nonstiff/LutherFieldStepInterpolator.java +++ b/src/main/java/org/apache/commons/math4/ode/nonstiff/LutherFieldStepInterpolator.java @@ -118,6 +118,7 @@ class LutherFieldStepInterpolator<T extends RealFieldElement<T>> } /** {@inheritDoc} */ + @Override protected LutherFieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK, final FieldODEStateAndDerivative<T> newGlobalPreviousState, final FieldODEStateAndDerivative<T> newGlobalCurrentState, http://git-wip-us.apache.org/repos/asf/commons-math/blob/0aa826e8/src/main/java/org/apache/commons/math4/ode/nonstiff/MidpointFieldStepInterpolator.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/ode/nonstiff/MidpointFieldStepInterpolator.java b/src/main/java/org/apache/commons/math4/ode/nonstiff/MidpointFieldStepInterpolator.java index 5a01a35..03bd70d 100644 --- a/src/main/java/org/apache/commons/math4/ode/nonstiff/MidpointFieldStepInterpolator.java +++ b/src/main/java/org/apache/commons/math4/ode/nonstiff/MidpointFieldStepInterpolator.java @@ -74,6 +74,7 @@ class MidpointFieldStepInterpolator<T extends RealFieldElement<T>> } /** {@inheritDoc} */ + @Override protected MidpointFieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK, final FieldODEStateAndDerivative<T> newGlobalPreviousState, final FieldODEStateAndDerivative<T> newGlobalCurrentState, http://git-wip-us.apache.org/repos/asf/commons-math/blob/0aa826e8/src/main/java/org/apache/commons/math4/ode/nonstiff/RungeKuttaFieldStepInterpolator.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/ode/nonstiff/RungeKuttaFieldStepInterpolator.java b/src/main/java/org/apache/commons/math4/ode/nonstiff/RungeKuttaFieldStepInterpolator.java index 9595ee2..20bff18 100644 --- a/src/main/java/org/apache/commons/math4/ode/nonstiff/RungeKuttaFieldStepInterpolator.java +++ b/src/main/java/org/apache/commons/math4/ode/nonstiff/RungeKuttaFieldStepInterpolator.java @@ -69,6 +69,7 @@ abstract class RungeKuttaFieldStepInterpolator<T extends RealFieldElement<T>> } /** {@inheritDoc} */ + @Override protected RungeKuttaFieldStepInterpolator<T> create(boolean newForward, FieldODEStateAndDerivative<T> newGlobalPreviousState, FieldODEStateAndDerivative<T> newGlobalCurrentState, http://git-wip-us.apache.org/repos/asf/commons-math/blob/0aa826e8/src/main/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldStepInterpolator.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldStepInterpolator.java b/src/main/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldStepInterpolator.java index 6faffd1..69df7f8 100644 --- a/src/main/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldStepInterpolator.java +++ b/src/main/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldStepInterpolator.java @@ -84,6 +84,7 @@ class ThreeEighthesFieldStepInterpolator<T extends RealFieldElement<T>> } /** {@inheritDoc} */ + @Override protected ThreeEighthesFieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK, final FieldODEStateAndDerivative<T> newGlobalPreviousState, final FieldODEStateAndDerivative<T> newGlobalCurrentState, http://git-wip-us.apache.org/repos/asf/commons-math/blob/0aa826e8/src/main/java/org/apache/commons/math4/ode/sampling/AbstractFieldStepInterpolator.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/ode/sampling/AbstractFieldStepInterpolator.java b/src/main/java/org/apache/commons/math4/ode/sampling/AbstractFieldStepInterpolator.java index 0486cef..b9a5de2 100644 --- a/src/main/java/org/apache/commons/math4/ode/sampling/AbstractFieldStepInterpolator.java +++ b/src/main/java/org/apache/commons/math4/ode/sampling/AbstractFieldStepInterpolator.java @@ -128,16 +128,19 @@ public abstract class AbstractFieldStepInterpolator<T extends RealFieldElement<T } /** {@inheritDoc} */ + @Override public FieldODEStateAndDerivative<T> getPreviousState() { return softPreviousState; } /** {@inheritDoc} */ + @Override public FieldODEStateAndDerivative<T> getCurrentState() { return softCurrentState; } /** {@inheritDoc} */ + @Override public FieldODEStateAndDerivative<T> getInterpolatedState(final T time) { final T thetaH = time.subtract(globalPreviousState.getTime()); final T oneMinusThetaH = globalCurrentState.getTime().subtract(time); @@ -146,6 +149,7 @@ public abstract class AbstractFieldStepInterpolator<T extends RealFieldElement<T } /** {@inheritDoc} */ + @Override public boolean isForward() { return forward; } http://git-wip-us.apache.org/repos/asf/commons-math/blob/0aa826e8/src/main/java/org/apache/commons/math4/ode/sampling/FieldStepNormalizer.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/ode/sampling/FieldStepNormalizer.java b/src/main/java/org/apache/commons/math4/ode/sampling/FieldStepNormalizer.java index 8551e14..9038080 100644 --- a/src/main/java/org/apache/commons/math4/ode/sampling/FieldStepNormalizer.java +++ b/src/main/java/org/apache/commons/math4/ode/sampling/FieldStepNormalizer.java @@ -168,6 +168,7 @@ public class FieldStepNormalizer<T extends RealFieldElement<T>> implements Field } /** {@inheritDoc} */ + @Override public void init(final FieldODEStateAndDerivative<T> initialState, final T finalTime) { first = null;