commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r674820 - in /commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode: FirstOrderIntegrator.java ODEIntegrator.java SecondOrderIntegrator.java
Date Tue, 08 Jul 2008 13:37:10 GMT
Author: luc
Date: Tue Jul  8 06:37:09 2008
New Revision: 674820

URL: http://svn.apache.org/viewvc?rev=674820&view=rev
Log:
introduced an upper level interface for all ODE integrators

Added:
    commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/ODEIntegrator.java
  (with props)
Modified:
    commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/FirstOrderIntegrator.java
    commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/SecondOrderIntegrator.java

Modified: commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/FirstOrderIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/FirstOrderIntegrator.java?rev=674820&r1=674819&r2=674820&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/FirstOrderIntegrator.java
(original)
+++ commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/FirstOrderIntegrator.java
Tue Jul  8 06:37:09 2008
@@ -17,9 +17,6 @@
 
 package org.apache.commons.math.ode;
 
-import java.io.Serializable;
-import java.util.Collection;
-
 import org.apache.commons.math.ode.events.EventHandler;
 import org.apache.commons.math.ode.sampling.StepHandler;
 
@@ -38,64 +35,7 @@
  * @since 1.2
  */
 
-public interface FirstOrderIntegrator extends Serializable {
-
-  /** Get the name of the method.
-   * @return name of the method
-   */
-  public String getName();
-
-  /** Add a step handler to this integrator.
-   * <p>The handler will be called by the integrator for each accepted
-   * step.</p>
-   * @param handler handler for the accepted steps
-   * @see #getStepHandlers()
-   * @see #clearStepHandlers()
-   * @since 2.0
-   */
-  public void addStepHandler (StepHandler handler);
-
-  /** Get all the step handlers that have been added to the integrator.
-   * @return an unmodifiable collection of the added events handlers
-   * @see #addStepHandler(StepHandler)
-   * @see #clearStepHandlers()
-   * @since 2.0
-   */
-  public Collection<StepHandler> getStepHandlers();
-
-  /** Remove all the step handlers that have been added to the integrator.
-   * @see #addStepHandler(StepHandler)
-   * @see #getStepHandlers()
-   * @since 2.0
-   */
-  public void clearStepHandlers();
-
-  /** Add an event handler to the integrator.
-   * @param handler event handler
-   * @param maxCheckInterval maximal time interval between switching
-   * function checks (this interval prevents missing sign changes in
-   * case the integration steps becomes very large)
-   * @param convergence convergence threshold in the event time search
-   * @param maxIterationCount upper limit of the iteration count in
-   * the event time search
-   * @see #getEventHandlers()
-   * @see #clearEventHandlers()
-   */
-  public void addEventHandler(EventHandler handler, double maxCheckInterval,
-                              double convergence, int maxIterationCount);
-
-  /** Get all the event handlers that have been added to the integrator.
-   * @return an unmodifiable collection of the added events handlers
-   * @see #addEventHandler(EventHandler, double, double, int)
-   * @see #clearEventHandlers()
-   */
-  public Collection<EventHandler> getEventHandlers();
-
-  /** Remove all the event handlers that have been added to the integrator.
-   * @see #addEventHandler(EventHandler, double, double, int)
-   * @see #getEventHandlers()
-   */
-  public void clearEventHandlers();
+public interface FirstOrderIntegrator extends ODEIntegrator {
 
   /** Integrate the differential equations up to the given time.
    * <p>This method solves an Initial Value Problem (IVP).</p>
@@ -120,26 +60,4 @@
                            double t, double[] y)
     throws DerivativeException, IntegratorException;
 
-  /** Get the current value of the step start time t<sub>i</sub>.
-   * <p>This method can be called during integration (typically by
-   * the object implementing the {@link FirstOrderDifferentialEquations
-   * differential equations} problem) if the value of the current step that
-   * is attempted is needed.</p>
-   * <p>The result is undefined if the method is called outside of
-   * calls to {@link #integrate}</p>
-   * @return current value of the step start time t<sub>i</sub>
-   */
-  public double getCurrentStepStart();
-
-  /** Get the current signed value of the integration stepsize.
-   * <p>This method can be called during integration (typically by
-   * the object implementing the {@link FirstOrderDifferentialEquations
-   * differential equations} problem) if the signed value of the current stepsize
-   * that is tried is needed.</p>
-   * <p>The result is undefined if the method is called outside of
-   * calls to {@link #integrate}</p>
-   * @return current signed value of the stepsize
-   */
-  public double getCurrentSignedStepsize();
-
 }

Added: commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/ODEIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/ODEIntegrator.java?rev=674820&view=auto
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/ODEIntegrator.java
(added)
+++ commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/ODEIntegrator.java
Tue Jul  8 06:37:09 2008
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.math.ode;
+
+import java.io.Serializable;
+import java.util.Collection;
+
+import org.apache.commons.math.ode.events.EventHandler;
+import org.apache.commons.math.ode.sampling.StepHandler;
+
+public interface ODEIntegrator extends Serializable {
+
+    /** Get the name of the method.
+     * @return name of the method
+     */
+    String getName();
+
+    /** Add a step handler to this integrator.
+     * <p>The handler will be called by the integrator for each accepted
+     * step.</p>
+     * @param handler handler for the accepted steps
+     * @see #getStepHandlers()
+     * @see #clearStepHandlers()
+     * @since 2.0
+     */
+    void addStepHandler(StepHandler handler);
+
+    /** Get all the step handlers that have been added to the integrator.
+     * @return an unmodifiable collection of the added events handlers
+     * @see #addStepHandler(StepHandler)
+     * @see #clearStepHandlers()
+     * @since 2.0
+     */
+    Collection<StepHandler> getStepHandlers();
+
+    /** Remove all the step handlers that have been added to the integrator.
+     * @see #addStepHandler(StepHandler)
+     * @see #getStepHandlers()
+     * @since 2.0
+     */
+    void clearStepHandlers();
+
+    /** Add an event handler to the integrator.
+     * @param handler event handler
+     * @param maxCheckInterval maximal time interval between switching
+     * function checks (this interval prevents missing sign changes in
+     * case the integration steps becomes very large)
+     * @param convergence convergence threshold in the event time search
+     * @param maxIterationCount upper limit of the iteration count in
+     * the event time search
+     * @see #getEventHandlers()
+     * @see #clearEventHandlers()
+     */
+    void addEventHandler(EventHandler handler,
+                                         double maxCheckInterval,
+                                         double convergence,
+                                         int maxIterationCount);
+
+    /** Get all the event handlers that have been added to the integrator.
+     * @return an unmodifiable collection of the added events handlers
+     * @see #addEventHandler(EventHandler, double, double, int)
+     * @see #clearEventHandlers()
+     */
+    Collection<EventHandler> getEventHandlers();
+
+    /** Remove all the event handlers that have been added to the integrator.
+     * @see #addEventHandler(EventHandler, double, double, int)
+     * @see #getEventHandlers()
+     */
+    void clearEventHandlers();
+
+    /** Get the current value of the step start time t<sub>i</sub>.
+     * <p>This method can be called during integration (typically by
+     * the object implementing the {@link FirstOrderDifferentialEquations
+     * differential equations} problem) if the value of the current step that
+     * is attempted is needed.</p>
+     * <p>The result is undefined if the method is called outside of
+     * calls to {@link #integrate}</p>
+     * @return current value of the step start time t<sub>i</sub>
+     */
+    double getCurrentStepStart();
+
+    /** Get the current signed value of the integration stepsize.
+     * <p>This method can be called during integration (typically by
+     * the object implementing the {@link FirstOrderDifferentialEquations
+     * differential equations} problem) if the signed value of the current stepsize
+     * that is tried is needed.</p>
+     * <p>The result is undefined if the method is called outside of
+     * calls to {@link #integrate}</p>
+     * @return current signed value of the stepsize
+     */
+    double getCurrentSignedStepsize();
+
+}
\ No newline at end of file

Propchange: commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/ODEIntegrator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/ODEIntegrator.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/SecondOrderIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/SecondOrderIntegrator.java?rev=674820&r1=674819&r2=674820&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/SecondOrderIntegrator.java
(original)
+++ commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/SecondOrderIntegrator.java
Tue Jul  8 06:37:09 2008
@@ -17,7 +17,6 @@
 
 package org.apache.commons.math.ode;
 
-import org.apache.commons.math.ode.sampling.StepHandler;
 
 /** This interface represents a second order integrator for
  * differential equations.
@@ -32,24 +31,7 @@
  * @since 1.2
  */
 
-public interface SecondOrderIntegrator {
-
-  /** Get the name of the method.
-   * @return name of the method
-   */
-  public String getName();
-
-  /** Set the step handler for this integrator.
-   * The handler will be called by the integrator for each accepted
-   * step.
-   * @param handler handler for the accepted steps
-   */
-  public void setStepHandler (StepHandler handler);
-
-  /** Get the step handler for this integrator.
-   * @return the step handler for this integrator
-   */
-  public StepHandler getStepHandler();
+public interface SecondOrderIntegrator extends ODEIntegrator {
 
   /** Integrate the differential equations up to the given time
    * @param equations differential equations to integrate



Mime
View raw message