commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r1383450 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/
Date Tue, 11 Sep 2012 15:33:10 GMT
Author: luc
Date: Tue Sep 11 15:33:10 2012
New Revision: 1383450

URL: http://svn.apache.org/viewvc?rev=1383450&view=rev
Log:
Added interfaces for differentiable multidimensional functions.

Added:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/MultivariateDifferentiableFunction.java
  (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/MultivariateDifferentiableVectorFunction.java
      - copied, changed from r1383441, commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/package-info.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/UnivariateDiferentiableMatrixFunction.java
      - copied, changed from r1383441, commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/package-info.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/UnivariateDifferentiableVectorFunction.java
      - copied, changed from r1383441, commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/package-info.java
Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/package-info.java

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/MultivariateDifferentiableFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/MultivariateDifferentiableFunction.java?rev=1383450&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/MultivariateDifferentiableFunction.java
(added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/MultivariateDifferentiableFunction.java
Tue Sep 11 15:33:10 2012
@@ -0,0 +1,49 @@
+/*
+ * 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.math3.analysis.differentiation;
+
+import org.apache.commons.math3.analysis.MultivariateFunction;
+import org.apache.commons.math3.exception.DimensionMismatchException;
+import org.apache.commons.math3.exception.MathIllegalArgumentException;
+
+/**
+ * Extension of {@link MultivariateFunction} representing a
+ * multivariate differentiable real function.
+ * @version $Id$
+ * @since 3.1
+ */
+public interface MultivariateDifferentiableFunction extends MultivariateFunction {
+
+    /**
+     * Compute the value for the function at the given point.
+     *
+     * @param point Point at which the function must be evaluated.
+     * @return the function value for the given point.
+     * @throws org.apache.commons.math3.exception.DimensionMismatchException
+     * if the parameter's dimension is wrong for the function being evaluated.
+     * @throws  org.apache.commons.math3.exception.MathIllegalArgumentException
+     * when the activated method itself can ascertain that preconditions,
+     * specified in the API expressed at the level of the activated method,
+     * have been violated.  In the vast majority of cases where Commons Math
+     * throws this exception, it is the result of argument checking of actual
+     * parameters immediately passed to a method.
+     */
+    DerivativeStructure value(DerivativeStructure[] point)
+        throws DimensionMismatchException, MathIllegalArgumentException;
+
+}

Propchange: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/MultivariateDifferentiableFunction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/MultivariateDifferentiableFunction.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Copied: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/MultivariateDifferentiableVectorFunction.java
(from r1383441, commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/package-info.java)
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/MultivariateDifferentiableVectorFunction.java?p2=commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/MultivariateDifferentiableVectorFunction.java&p1=commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/package-info.java&r1=1383441&r2=1383450&rev=1383450&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/package-info.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/MultivariateDifferentiableVectorFunction.java
Tue Sep 11 15:33:10 2012
@@ -14,22 +14,29 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
+package org.apache.commons.math3.analysis.differentiation;
+
+import org.apache.commons.math3.analysis.MultivariateVectorFunction;
+import org.apache.commons.math3.exception.DimensionMismatchException;
+
+
 /**
- *
- * <p>
- *   This package holds the main interfaces and basic building block classes
- *   dealing with differentiation.
- *   The core class is {@link DerivativeStructure} which holds the value and
- *   the differentials of a function. This class handles some arbitrary number
- *   of free parameters and arbitrary derivation order. It is used both as
- *   the input and the output type for the {@link UnivariateDifferentiableFunction}
- *   interface. Any differentiable function should implement this interface.
- * </p>
- * <p>
- *   The {@link UnivariateDifferentiator} interface defines a way to differentiation
- *   a simple {@link org.apache.commons.math3.analysis.UnivariateFunction
- *   univariate function} and get a {@link differential function}.
- * </p>
- *
+ * Extension of {@link MultivariateVectorFunction} representing a
+ * multivariate differentiable vectorial function.
+ * @version $Id$
+ * @since 3.1
  */
-package org.apache.commons.math3.analysis.differentiation;
+public interface MultivariateDifferentiableVectorFunction
+    extends MultivariateVectorFunction {
+
+    /**
+     * Compute the value for the function at the given point.
+     * @param point point at which the function must be evaluated
+     * @return function value for the given point
+     * @exception DimensionMismatchException if points dimension is wrong
+     */
+    DerivativeStructure[] value(DerivativeStructure[] point)
+        throws DimensionMismatchException;
+
+}

Copied: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/UnivariateDiferentiableMatrixFunction.java
(from r1383441, commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/package-info.java)
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/UnivariateDiferentiableMatrixFunction.java?p2=commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/UnivariateDiferentiableMatrixFunction.java&p1=commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/package-info.java&r1=1383441&r2=1383450&rev=1383450&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/package-info.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/UnivariateDiferentiableMatrixFunction.java
Tue Sep 11 15:33:10 2012
@@ -14,22 +14,24 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.commons.math3.analysis.differentiation;
+
+import org.apache.commons.math3.analysis.UnivariateMatrixFunction;
+
 /**
+ * Extension of {@link UnivariateMatrixFunction} representing a univariate differentiable
matrix function.
  *
- * <p>
- *   This package holds the main interfaces and basic building block classes
- *   dealing with differentiation.
- *   The core class is {@link DerivativeStructure} which holds the value and
- *   the differentials of a function. This class handles some arbitrary number
- *   of free parameters and arbitrary derivation order. It is used both as
- *   the input and the output type for the {@link UnivariateDifferentiableFunction}
- *   interface. Any differentiable function should implement this interface.
- * </p>
- * <p>
- *   The {@link UnivariateDifferentiator} interface defines a way to differentiation
- *   a simple {@link org.apache.commons.math3.analysis.UnivariateFunction
- *   univariate function} and get a {@link differential function}.
- * </p>
- *
+ * @version $Id$
+ * @since 3.1
  */
-package org.apache.commons.math3.analysis.differentiation;
+public interface UnivariateDiferentiableMatrixFunction
+    extends UnivariateMatrixFunction {
+
+    /**
+     * Compute the value for the function.
+     * @param x the point for which the function value should be computed
+     * @return the value
+     */
+    DerivativeStructure[][] value(DerivativeStructure x);
+
+}

Copied: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/UnivariateDifferentiableVectorFunction.java
(from r1383441, commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/package-info.java)
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/UnivariateDifferentiableVectorFunction.java?p2=commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/UnivariateDifferentiableVectorFunction.java&p1=commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/package-info.java&r1=1383441&r2=1383450&rev=1383450&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/package-info.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/UnivariateDifferentiableVectorFunction.java
Tue Sep 11 15:33:10 2012
@@ -14,22 +14,24 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.commons.math3.analysis.differentiation;
+
+import org.apache.commons.math3.analysis.UnivariateVectorFunction;
+
 /**
+ * Extension of {@link UnivariateVectorFunction} representing a univariate differentiable
vectorial function.
  *
- * <p>
- *   This package holds the main interfaces and basic building block classes
- *   dealing with differentiation.
- *   The core class is {@link DerivativeStructure} which holds the value and
- *   the differentials of a function. This class handles some arbitrary number
- *   of free parameters and arbitrary derivation order. It is used both as
- *   the input and the output type for the {@link UnivariateDifferentiableFunction}
- *   interface. Any differentiable function should implement this interface.
- * </p>
- * <p>
- *   The {@link UnivariateDifferentiator} interface defines a way to differentiation
- *   a simple {@link org.apache.commons.math3.analysis.UnivariateFunction
- *   univariate function} and get a {@link differential function}.
- * </p>
- *
+ * @version $Id$
+ * @since 3.1
  */
-package org.apache.commons.math3.analysis.differentiation;
+public interface UnivariateDifferentiableVectorFunction
+    extends UnivariateVectorFunction {
+
+    /**
+     * Compute the value for the function.
+     * @param x the point for which the function value should be computed
+     * @return the value
+     */
+    DerivativeStructure[] value(DerivativeStructure x);
+
+}

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/package-info.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/package-info.java?rev=1383450&r1=1383449&r2=1383450&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/package-info.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/package-info.java
Tue Sep 11 15:33:10 2012
@@ -26,6 +26,10 @@
  *   interface. Any differentiable function should implement this interface.
  * </p>
  * <p>
+ *   Similar interfaces also exist for multivariate functions and for vector or
+ *   matrix valued functions.
+ * </p>
+ * <p>
  *   The {@link UnivariateDifferentiator} interface defines a way to differentiation
  *   a simple {@link org.apache.commons.math3.analysis.UnivariateFunction
  *   univariate function} and get a {@link differential function}.



Mime
View raw message