commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r758046 - in /commons/proper/math/trunk/src/java/org/apache/commons/math: analysis/ optimization/
Date Tue, 24 Mar 2009 22:05:14 GMT
Author: luc
Date: Tue Mar 24 22:05:13 2009
New Revision: 758046

URL: http://svn.apache.org/viewvc?rev=758046&view=rev
Log:
use a single set of consistent functions definitions in the analysis package
instead of one set in the analysis and another one in optimization

Added:
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableMultivariateRealFunction.java
  (contents, props changed)
      - copied, changed from r757188, commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/ScalarDifferentiableObjectiveFunction.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableMultivariateVectorialFunction.java
  (contents, props changed)
      - copied, changed from r757188, commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/VectorialDifferentiableObjectiveFunction.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableUnivariateMatrixFunction.java
  (with props)
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableUnivariateVectorialFunction.java
  (with props)
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/MultivariateMatrixFunction.java
  (with props)
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/MultivariateRealFunction.java
      - copied, changed from r757188, commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/ScalarObjectiveFunction.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/MultivariateVectorialFunction.java
      - copied, changed from r757188, commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/VectorialObjectiveFunction.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/UnivariateMatrixFunction.java
  (with props)
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/UnivariateVectorialFunction.java
  (with props)
Removed:
    commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/ScalarDifferentiableObjectiveFunction.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/ScalarObjectiveFunction.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/VectorialDifferentiableObjectiveFunction.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/VectorialObjectiveFunction.java
Modified:
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/UnivariateRealFunction.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/package.html

Copied: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableMultivariateRealFunction.java
(from r757188, commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/ScalarDifferentiableObjectiveFunction.java)
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableMultivariateRealFunction.java?p2=commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableMultivariateRealFunction.java&p1=commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/ScalarDifferentiableObjectiveFunction.java&r1=757188&r2=758046&rev=758046&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/ScalarDifferentiableObjectiveFunction.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableMultivariateRealFunction.java
Tue Mar 24 22:05:13 2009
@@ -15,23 +15,37 @@
  * limitations under the License.
  */
 
-package org.apache.commons.math.optimization;
+package org.apache.commons.math.analysis;
 
 /** 
- * This interface represents a scalar objective function that can be differentiated.
+ * Extension of {@link MultivariateRealFunction} representing a differentiable
+ * multivariate real function.
  * @version $Revision$ $Date$
  * @since 2.0
  */
-public interface ScalarDifferentiableObjectiveFunction extends ScalarObjectiveFunction {
+public interface DifferentiableMultivariateRealFunction extends MultivariateRealFunction
{
 
-    /** 
-     * Compute the partial derivatives of the objective function.
-     * @param variables variables set
-     * @return partial derivatives of the objective function
-     * @exception ObjectiveException if no value can be computed for the parameters
-     * @exception IllegalArgumentException if variables dimension is wrong
+    /**
+     * Returns the partial derivative of the function with respect to a point coordinate.
+     * <p>
+     * The partial derivative is defined with respect to point coordinate
+     * x<sub>k</sub>. If the partial derivatives with respect to all coordinates
are
+     * needed, it may be more efficient to use the {@link #gradient()} method which will
+     * compute them all at once.
+     * </p>
+     * @param k index of the coordinate with respect to which the partial
+     * derivative is computed
+     * @return the partial derivative function with respect to k<sup>th</sup>
point coordinate
      */
-    double[] partials(double[] variables)
-        throws ObjectiveException, IllegalArgumentException;
+    MultivariateRealFunction partialDerivative(int k);
+
+    /**
+     * Returns the gradient function.
+     * <p>If only one partial derivative with respect to a specific coordinate is
+     * needed, it may be more efficient to use the {@link #partialDerivative(int)} method
+     * which will compute only the specified component.</p>
+     * @return the gradient function
+     */
+    MultivariateVectorialFunction gradient();
 
 }

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableMultivariateRealFunction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableMultivariateRealFunction.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableMultivariateRealFunction.java
------------------------------------------------------------------------------
    svn:mergeinfo = 

Copied: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableMultivariateVectorialFunction.java
(from r757188, commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/VectorialDifferentiableObjectiveFunction.java)
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableMultivariateVectorialFunction.java?p2=commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableMultivariateVectorialFunction.java&p1=commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/VectorialDifferentiableObjectiveFunction.java&r1=757188&r2=758046&rev=758046&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/VectorialDifferentiableObjectiveFunction.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableMultivariateVectorialFunction.java
Tue Mar 24 22:05:13 2009
@@ -15,24 +15,60 @@
  * limitations under the License.
  */
 
-package org.apache.commons.math.optimization;
+package org.apache.commons.math.analysis;
+
 
 /** 
- * This interface represents a vectorial objective function that can be differentiated.
+ * Extension of {@link MultivariateVectorialFunction} representing a differentiable
+ * multivariate vectorial function.
  * @version $Revision$ $Date$
  * @since 2.0
  */
-public interface VectorialDifferentiableObjectiveFunction extends VectorialObjectiveFunction
{
+public interface DifferentiableMultivariateVectorialFunction
+    extends MultivariateVectorialFunction {
+
+    /**
+     * Returns the partial derivative of the function with respect to point
+     * coordinate x<sub>j</sub>.
+     * <p>
+     * The partial derivative basically represents column j of the jacobian
+     * matrix. If the partial derivatives with respect to all coordinates are
+     * needed, it may be more efficient to use the {@link #jacobian()} method
+     * which will compute the complete matrix at once.
+     * </p>
+     * @param j index of the coordinate with respect to which the partial
+     * derivative is computed
+     * @return the partial derivative function with respect to point coordinate
+     * x<sub>i</sub>
+     */
+    MultivariateVectorialFunction partialDerivative(int j);
+
+    /**
+     * Returns the gradient function of the i<sup>th</sup> component of
+     * the vectorial function.
+     * 
+     * <p>
+     * The i<sup>th</sup> gradient basically represents row i of the jacobian
+     * matrix. If all gradients are needed, it may be more efficient to use the
+     * {@link #jacobian()} method which will compute the complete matrix at once.
+     * </p>
+     * @param i index of the function component for which the gradient is requested
+     * @return the gradient function of the i<sup>th</sup> component of
+     * the vectorial function
+     */
+    MultivariateVectorialFunction gradient(int i);
 
-    /** 
-     * Compute the jacobian of the objective function.
-     * @param variables variables set
-     * @param value value of the objective function (already computed)
-     * @return jacobian of the objective function
-     * @exception ObjectiveException if no cost can be computed for the parameters
-     * @exception IllegalArgumentException if variables dimension is wrong
+    /**
+     * Returns the jacobian function.
+     * <p>
+     * If only one column of the jacobian is needed, it may be more efficient to
+     * use the {@link #partialDerivative(int)} method which will compute only the
+     * specified column. If only one row of the jacobian is needed, it may be more
+     * efficient to use the {@link #gradient(int)} method which will compute only the
+     * specified row.
+     * </p>
+     * @return the jacobian function
      */
-    double[][] jacobian(double[] variables, double[] value)
-        throws ObjectiveException, IllegalArgumentException;
+    MultivariateMatrixFunction jacobian();
 
 }

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableMultivariateVectorialFunction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableMultivariateVectorialFunction.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableMultivariateVectorialFunction.java
------------------------------------------------------------------------------
    svn:mergeinfo = 

Added: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableUnivariateMatrixFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableUnivariateMatrixFunction.java?rev=758046&view=auto
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableUnivariateMatrixFunction.java
(added)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableUnivariateMatrixFunction.java
Tue Mar 24 22:05:13 2009
@@ -0,0 +1,35 @@
+/*
+ * 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.analysis;
+
+/**
+ * Extension of {@link UnivariateMatrixFunction} representing a differentiable univariate
matrix function.
+ *
+ * @version $Revision$ $Date$
+ * @since 2.0
+ */
+public interface DifferentiableUnivariateMatrixFunction
+    extends UnivariateMatrixFunction {
+ 
+    /**
+     * Returns the derivative of the function
+     * 
+     * @return  the derivative function
+     */
+    public UnivariateMatrixFunction derivative();
+
+}

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableUnivariateMatrixFunction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableUnivariateMatrixFunction.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableUnivariateVectorialFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableUnivariateVectorialFunction.java?rev=758046&view=auto
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableUnivariateVectorialFunction.java
(added)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableUnivariateVectorialFunction.java
Tue Mar 24 22:05:13 2009
@@ -0,0 +1,35 @@
+/*
+ * 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.analysis;
+
+/**
+ * Extension of {@link UnivariateVectorialFunction} representing a differentiable univariate
vectorial function.
+ *
+ * @version $Revision$ $Date$
+ * @since 2.0
+ */
+public interface DifferentiableUnivariateVectorialFunction
+    extends UnivariateVectorialFunction {
+ 
+    /**
+     * Returns the derivative of the function
+     * 
+     * @return  the derivative function
+     */
+    public UnivariateVectorialFunction derivative();
+
+}

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableUnivariateVectorialFunction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/DifferentiableUnivariateVectorialFunction.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/MultivariateMatrixFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/MultivariateMatrixFunction.java?rev=758046&view=auto
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/MultivariateMatrixFunction.java
(added)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/MultivariateMatrixFunction.java
Tue Mar 24 22:05:13 2009
@@ -0,0 +1,41 @@
+/*
+ * 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.analysis;
+
+import java.io.Serializable;
+
+import org.apache.commons.math.FunctionEvaluationException;
+
+/** 
+ * An interface representing a multivariate matrix function.
+ * @version $Revision$ $Date$
+ * @since 2.0
+ */
+public interface MultivariateMatrixFunction extends Serializable {
+
+    /** 
+     * 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 FunctionEvaluationException if the function evaluation fails
+     * @exception IllegalArgumentException if points dimension is wrong
+     */
+    double[][] value(double[] point)
+        throws FunctionEvaluationException, IllegalArgumentException;
+
+}

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/MultivariateMatrixFunction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/MultivariateMatrixFunction.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Copied: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/MultivariateRealFunction.java
(from r757188, commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/ScalarObjectiveFunction.java)
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/MultivariateRealFunction.java?p2=commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/MultivariateRealFunction.java&p1=commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/ScalarObjectiveFunction.java&r1=757188&r2=758046&rev=758046&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/ScalarObjectiveFunction.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/MultivariateRealFunction.java
Tue Mar 24 22:05:13 2009
@@ -15,25 +15,27 @@
  * limitations under the License.
  */
 
-package org.apache.commons.math.optimization;
+package org.apache.commons.math.analysis;
 
 import java.io.Serializable;
 
+import org.apache.commons.math.FunctionEvaluationException;
+
 /** 
- * This interface represents a scalar objective function to be either minimized or maximized.
+ * An interface representing a multivariate real function.
  * @version $Revision$ $Date$
  * @since 2.0
  */
-public interface ScalarObjectiveFunction extends Serializable {
+public interface MultivariateRealFunction extends Serializable {
 
     /** 
-     * Compute the function value for the given variables set.
-     * @param variables variables set
-     * @return function value for the given variables set
-     * @exception ObjectiveException if no value can be computed for the parameters
-     * @exception IllegalArgumentException if variables dimension is wrong
+     * 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 FunctionEvaluationException if the function evaluation fails
+     * @exception IllegalArgumentException if points dimension is wrong
      */
-    double objective(double[] variables)
-        throws ObjectiveException, IllegalArgumentException;
+    double value(double[] point)
+        throws FunctionEvaluationException, IllegalArgumentException;
 
 }

Copied: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/MultivariateVectorialFunction.java
(from r757188, commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/VectorialObjectiveFunction.java)
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/MultivariateVectorialFunction.java?p2=commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/MultivariateVectorialFunction.java&p1=commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/VectorialObjectiveFunction.java&r1=757188&r2=758046&rev=758046&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/VectorialObjectiveFunction.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/MultivariateVectorialFunction.java
Tue Mar 24 22:05:13 2009
@@ -15,26 +15,27 @@
  * limitations under the License.
  */
 
-package org.apache.commons.math.optimization;
+package org.apache.commons.math.analysis;
 
 import java.io.Serializable;
 
+import org.apache.commons.math.FunctionEvaluationException;
+
 /** 
- * This interface represents a vectorial objective function to be either minimized or maximized.
- * @see LeastSquaresConverter
+ * An interface representing a multivariate vectorial function.
  * @version $Revision$ $Date$
  * @since 2.0
  */
-public interface VectorialObjectiveFunction extends Serializable {
+public interface MultivariateVectorialFunction extends Serializable {
 
     /** 
-     * Compute the function value for the given variables set.
-     * @param variables variables set
-     * @return function value for the given variables set
-     * @exception ObjectiveException if no cost can be computed for the parameters
-     * @exception IllegalArgumentException if variables dimension is wrong
+     * 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 FunctionEvaluationException if the function evaluation fails
+     * @exception IllegalArgumentException if points dimension is wrong
      */
-    double[] objective(double[] variables)
-        throws ObjectiveException, IllegalArgumentException;
+    double[] value(double[] point)
+        throws FunctionEvaluationException, IllegalArgumentException;
 
 }

Added: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/UnivariateMatrixFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/UnivariateMatrixFunction.java?rev=758046&view=auto
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/UnivariateMatrixFunction.java
(added)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/UnivariateMatrixFunction.java
Tue Mar 24 22:05:13 2009
@@ -0,0 +1,38 @@
+/*
+ * 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.analysis;
+
+import java.io.Serializable;
+
+import org.apache.commons.math.FunctionEvaluationException;
+
+/**
+ * An interface representing a univariate matrix function.
+ *  
+ * @version $Revision$ $Date$
+ * @since 2.0
+ */
+public interface UnivariateMatrixFunction extends Serializable {
+    /**
+     * Compute the value for the function.
+     * @param x the point for which the function value should be computed
+     * @return the value
+     * @throws FunctionEvaluationException if the function evaluation fails
+     */
+    public double[][] value(double x) throws FunctionEvaluationException;
+
+}

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/UnivariateMatrixFunction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/UnivariateMatrixFunction.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/UnivariateRealFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/UnivariateRealFunction.java?rev=758046&r1=758045&r2=758046&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/UnivariateRealFunction.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/UnivariateRealFunction.java
Tue Mar 24 22:05:13 2009
@@ -16,6 +16,8 @@
  */
 package org.apache.commons.math.analysis;
 
+import java.io.Serializable;
+
 import org.apache.commons.math.FunctionEvaluationException;
 
 /**
@@ -23,7 +25,7 @@
  *  
  * @version $Revision$ $Date$
  */
-public interface UnivariateRealFunction {
+public interface UnivariateRealFunction extends Serializable {
     /**
      * Compute the value for the function.
      * @param x the point for which the function value should be computed

Added: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/UnivariateVectorialFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/UnivariateVectorialFunction.java?rev=758046&view=auto
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/UnivariateVectorialFunction.java
(added)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/UnivariateVectorialFunction.java
Tue Mar 24 22:05:13 2009
@@ -0,0 +1,38 @@
+/*
+ * 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.analysis;
+
+import java.io.Serializable;
+
+import org.apache.commons.math.FunctionEvaluationException;
+
+/**
+ * An interface representing a univariate vectorial function.
+ *  
+ * @version $Revision$ $Date$
+ * @since 2.0
+ */
+public interface UnivariateVectorialFunction extends Serializable {
+    /**
+     * Compute the value for the function.
+     * @param x the point for which the function value should be computed
+     * @return the value
+     * @throws FunctionEvaluationException if the function evaluation fails
+     */
+    public double[] value(double x) throws FunctionEvaluationException;
+
+}

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/UnivariateVectorialFunction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/UnivariateVectorialFunction.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/package.html
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/package.html?rev=758046&r1=758045&r2=758046&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/package.html (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/package.html Tue Mar
24 22:05:13 2009
@@ -16,8 +16,18 @@
    limitations under the License.
   -->
     <!-- $Revision$ $Date$ -->
-    <body>
-     Parent package for common numerical analysis procedures, including root finding,
-     function interpolation and integration.
-    </body>
+  <body>
+    <p>
+      Parent package for common numerical analysis procedures, including root finding,
+      function interpolation and integration. Note that the optimization (i.e. minimization
+      and maximization) is a huge separate top package, despite it also operate on functions
+      as defined by this top-level package.
+    </p>
+    <p>
+      Functions interfaces are intended to be implemented by user code to represent their
+      domain problems. The algorithms provided by the library will then operate on these
+      function to find their roots, or integrate them, or ... Functions can be multivariate
+      or univariate, real vectorial or matrix valued, and they can be differentiable or not.
+    </p>
+  </body>
 </html>
\ No newline at end of file



Mime
View raw message