commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1037896 [1/2] - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/analysis/ main/java/org/apache/commons/math/analysis/function/ test/java/org/apache/commons/math/analysis/
Date Mon, 22 Nov 2010 21:29:51 GMT
Author: erans
Date: Mon Nov 22 21:29:49 2010
New Revision: 1037896

URL: http://svn.apache.org/viewvc?rev=1037896&view=rev
Log:
MATH-430
New package "function" contains univariate and bivariate function objects.
"FunctionUtils" contains methods to compose and combine function objects.
Together they replace "ComposableFunction" and "BinaryFunction" which are
now deprecated.

Added:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/FunctionUtils.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Abs.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Acos.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Acosh.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Add.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Asin.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Asinh.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Atan.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Atan2.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Atanh.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Cbrt.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Constant.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Cos.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Cosh.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Divide.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Exp.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Expm1.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Identity.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Inverse.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Log.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Log10.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Log1p.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Max.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Min.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Minus.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Multiply.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Pow.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Power.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Sin.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Sinc.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Sinh.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Sqrt.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Subtract.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Tan.java   (with props)
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Tanh.java   (with props)
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/FunctionUtilsTest.java   (with props)
Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/BinaryFunction.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/ComposableFunction.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/ComposableFunctionTest.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/BinaryFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/BinaryFunction.java?rev=1037896&r1=1037895&r2=1037896&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/BinaryFunction.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/BinaryFunction.java Mon Nov 22 21:29:49 2010
@@ -27,62 +27,45 @@ import org.apache.commons.math.util.Fast
  *
  * @since 2.1
  * @version $Revision$ $Date$
+ * @deprecated in 2.2 (to be removed in 3.0). Please use the function classes
+ * in the {@link org.apache.commons.math.analysis.function} package and the
+ * methods in {@link FunctionUtils}.
  */
+@Deprecated
 public abstract class BinaryFunction implements BivariateRealFunction {
+    public static BinaryFunction make(final BivariateRealFunction f) {
+        return new BinaryFunction() {
+            /** {@inheritDoc} */
+            @Override
+                public double value(double x, double y) {
+                return f.value(x, y);
+            }
+        };
+    }
 
     /** The + operator method wrapped as a {@link BinaryFunction}. */
-    public static final BinaryFunction ADD = new BinaryFunction() {
-        /** {@inheritDoc} */
-        @Override
-        public double value(double x, double y) {
-            return x + y;
-        }
-    };
+    public static final BinaryFunction ADD =
+        make(new org.apache.commons.math.analysis.function.Add());
 
     /** The - operator method wrapped as a {@link BinaryFunction}. */
-    public static final BinaryFunction SUBTRACT = new BinaryFunction() {
-        /** {@inheritDoc} */
-        @Override
-        public double value(double x, double y) {
-            return x - y;
-        }
-    };
+    public static final BinaryFunction SUBTRACT =
+        make(new org.apache.commons.math.analysis.function.Subtract());
 
     /** The * operator method wrapped as a {@link BinaryFunction}. */
-    public static final BinaryFunction MULTIPLY = new BinaryFunction() {
-        /** {@inheritDoc} */
-        @Override
-        public double value(double x, double y) {
-            return x * y;
-        }
-    };
+    public static final BinaryFunction MULTIPLY =
+        make(new org.apache.commons.math.analysis.function.Multiply());
 
     /** The / operator method wrapped as a {@link BinaryFunction}. */
-    public static final BinaryFunction DIVIDE = new BinaryFunction() {
-        /** {@inheritDoc} */
-        @Override
-        public double value(double x, double y) {
-            return x / y;
-        }
-    };
+    public static final BinaryFunction DIVIDE =
+        make(new org.apache.commons.math.analysis.function.Divide());
 
     /** The {@code FastMath.pow} method wrapped as a {@link BinaryFunction}. */
-    public static final BinaryFunction POW = new BinaryFunction() {
-        /** {@inheritDoc} */
-        @Override
-        public double value(double x, double y) {
-            return FastMath.pow(x, y);
-        }
-    };
+    public static final BinaryFunction POW =
+        make(new org.apache.commons.math.analysis.function.Pow());
 
     /** The {@code FastMath.atan2} method wrapped as a {@link BinaryFunction}. */
-    public static final BinaryFunction ATAN2 = new BinaryFunction() {
-        /** {@inheritDoc} */
-        @Override
-        public double value(double x, double y) {
-            return FastMath.atan2(x, y);
-        }
-    };
+    public static final BinaryFunction ATAN2 =
+        make(new org.apache.commons.math.analysis.function.Atan2());
 
     /** {@inheritDoc} */
     public abstract double value(double x, double y) throws MathUserException;
@@ -92,13 +75,7 @@ public abstract class BinaryFunction imp
      * @return a function such that {@code f.value(y) == value(fixedX, y)}
      */
     public ComposableFunction fix1stArgument(final double fixedX) {
-        return new ComposableFunction() {
-            @Override
-            /** {@inheritDoc} */
-            public double value(double x) throws MathUserException {
-                return BinaryFunction.this.value(fixedX, x);
-            }
-        };
+        return ComposableFunction.make(FunctionUtils.fix1stArgument(this, fixedX));
     }
 
     /** Get a composable function by fixing the second argument of the instance.
@@ -106,13 +83,6 @@ public abstract class BinaryFunction imp
      * @return a function such that {@code f.value(x) == value(x, fixedY)}
      */
     public ComposableFunction fix2ndArgument(final double fixedY) {
-        return new ComposableFunction() {
-            @Override
-            /** {@inheritDoc} */
-            public double value(double x) throws MathUserException {
-                return BinaryFunction.this.value(x, fixedY);
-            }
-        };
+        return ComposableFunction.make(FunctionUtils.fix2ndArgument(this, fixedY));
     }
-
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/ComposableFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/ComposableFunction.java?rev=1037896&r1=1037895&r2=1037896&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/ComposableFunction.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/ComposableFunction.java Mon Nov 22 21:29:49 2010
@@ -26,152 +26,85 @@ import org.apache.commons.math.util.Fast
  *
  * @since 2.1
  * @version $Revision$ $Date$
+ * @deprecated in 2.2 (to be removed in 3.0). Please use the function classes
+ * in the {@link org.apache.commons.math.analysis.function} package and the
+ * methods in {@link FunctionUtils}.
  */
+@Deprecated
 public abstract class ComposableFunction implements UnivariateRealFunction {
+    public static ComposableFunction make(final UnivariateRealFunction f) {
+        return new ComposableFunction() {
+            /** {@inheritDoc} */
+            @Override
+            public double value(double x) {
+                return f.value(x);
+            }
+        };
+    }
 
     /** The constant function always returning 0. */
-    public static final ComposableFunction ZERO = new ComposableFunction() {
-        /** {@inheritDoc} */
-        @Override
-        public double value(double d) {
-            return 0;
-        }
-    };
-
+    public static final ComposableFunction ZERO =
+        make(new org.apache.commons.math.analysis.function.Constant(0));
+    
     /** The constant function always returning 1. */
-    public static final ComposableFunction ONE = new ComposableFunction() {
-        /** {@inheritDoc} */
-        @Override
-        public double value(double d) {
-            return 1;
-        }
-    };
+    public static final ComposableFunction ONE = 
+        make(new org.apache.commons.math.analysis.function.Constant(1));
 
     /** The identity function. */
-    public static final ComposableFunction IDENTITY = new ComposableFunction() {
-        /** {@inheritDoc} */
-        @Override
-        public double value(double d) {
-            return d;
-        }
-    };
+    public static final ComposableFunction IDENTITY =
+        make(new org.apache.commons.math.analysis.function.Identity());
 
     /** The {@code FastMath.abs} method wrapped as a {@link ComposableFunction}. */
-    public static final ComposableFunction ABS = new ComposableFunction() {
-        /** {@inheritDoc} */
-        @Override
-        public double value(double d) {
-            return FastMath.abs(d);
-        }
-    };
+    public static final ComposableFunction ABS =
+        make(new org.apache.commons.math.analysis.function.Abs());
 
     /** The - operator wrapped as a {@link ComposableFunction}. */
-    public static final ComposableFunction NEGATE = new ComposableFunction() {
-        /** {@inheritDoc} */
-        @Override
-        public double value(double d) {
-            return -d;
-        }
-    };
+    public static final ComposableFunction NEGATE = 
+        make(new org.apache.commons.math.analysis.function.Minus());
 
     /** The invert operator wrapped as a {@link ComposableFunction}. */
-    public static final ComposableFunction INVERT = new ComposableFunction () {
-        /** {@inheritDoc} */
-        @Override
-        public double value(double d){
-            return 1/d;
-        }
-    };
+    public static final ComposableFunction INVERT =
+        make(new org.apache.commons.math.analysis.function.Inverse());
 
     /** The {@code FastMath.sin} method wrapped as a {@link ComposableFunction}. */
-    public static final ComposableFunction SIN = new ComposableFunction() {
-        /** {@inheritDoc} */
-        @Override
-        public double value(double d) {
-            return FastMath.sin(d);
-        }
-    };
+    public static final ComposableFunction SIN =
+        make(new org.apache.commons.math.analysis.function.Sin());
 
     /** The {@code FastMath.sqrt} method wrapped as a {@link ComposableFunction}. */
-    public static final ComposableFunction SQRT = new ComposableFunction() {
-        /** {@inheritDoc} */
-        @Override
-        public double value(double d) {
-            return FastMath.sqrt(d);
-        }
-    };
+    public static final ComposableFunction SQRT =
+        make(new org.apache.commons.math.analysis.function.Sqrt());
 
     /** The {@code FastMath.sinh} method wrapped as a {@link ComposableFunction}. */
-    public static final ComposableFunction SINH = new ComposableFunction() {
-        /** {@inheritDoc} */
-        @Override
-        public double value(double d) {
-            return FastMath.sinh(d);
-        }
-    };
+    public static final ComposableFunction SINH =
+        make(new org.apache.commons.math.analysis.function.Sinh());
 
     /** The {@code FastMath.exp} method wrapped as a {@link ComposableFunction}. */
-    public static final ComposableFunction EXP = new ComposableFunction() {
-        /** {@inheritDoc} */
-        @Override
-        public double value(double d) {
-            return FastMath.exp(d);
-        }
-    };
+    public static final ComposableFunction EXP =
+        make(new org.apache.commons.math.analysis.function.Exp());
 
     /** The {@code FastMath.expm1} method wrapped as a {@link ComposableFunction}. */
-    public static final ComposableFunction EXPM1 = new ComposableFunction() {
-        /** {@inheritDoc} */
-        @Override
-        public double value(double d) {
-            return FastMath.expm1(d);
-        }
-    };
+    public static final ComposableFunction EXPM1 =
+        make(new org.apache.commons.math.analysis.function.Expm1());
 
     /** The {@code FastMath.asin} method wrapped as a {@link ComposableFunction}. */
-    public static final ComposableFunction ASIN = new ComposableFunction() {
-        /** {@inheritDoc} */
-        @Override
-        public double value(double d) {
-            return FastMath.asin(d);
-        }
-    };
+    public static final ComposableFunction ASIN =
+        make(new org.apache.commons.math.analysis.function.Asin());
 
     /** The {@code FastMath.atan} method wrapped as a {@link ComposableFunction}. */
-    public static final ComposableFunction ATAN = new ComposableFunction() {
-        /** {@inheritDoc} */
-        @Override
-        public double value(double d) {
-            return FastMath.atan(d);
-        }
-    };
+    public static final ComposableFunction ATAN =
+        make(new org.apache.commons.math.analysis.function.Atan());
 
     /** The {@code FastMath.tan} method wrapped as a {@link ComposableFunction}. */
-    public static final ComposableFunction TAN = new ComposableFunction() {
-        /** {@inheritDoc} */
-        @Override
-        public double value(double d) {
-            return FastMath.tan(d);
-        }
-    };
+    public static final ComposableFunction TAN =
+        make(new org.apache.commons.math.analysis.function.Tan());
 
     /** The {@code FastMath.tanh} method wrapped as a {@link ComposableFunction}. */
-    public static final ComposableFunction TANH = new ComposableFunction() {
-        /** {@inheritDoc} */
-        @Override
-        public double value(double d) {
-            return FastMath.tanh(d);
-        }
-    };
+    public static final ComposableFunction TANH =
+        make(new org.apache.commons.math.analysis.function.Tanh());
 
     /** The {@code FastMath.cbrt} method wrapped as a {@link ComposableFunction}. */
-    public static final ComposableFunction CBRT = new ComposableFunction() {
-        /** {@inheritDoc} */
-        @Override
-        public double value(double d) {
-            return FastMath.cbrt(d);
-        }
-    };
+    public static final ComposableFunction CBRT =
+        make(new org.apache.commons.math.analysis.function.Cbrt());
 
     /** The {@code FastMath.ceil} method wrapped as a {@link ComposableFunction}. */
     public static final ComposableFunction CEIL = new ComposableFunction() {
@@ -192,57 +125,28 @@ public abstract class ComposableFunction
     };
 
     /** The {@code FastMath.log} method wrapped as a {@link ComposableFunction}. */
-    public static final ComposableFunction LOG = new ComposableFunction() {
-        /** {@inheritDoc} */
-        @Override
-        public double value(double d) {
-            return FastMath.log(d);
-        }
-    };
+    public static final ComposableFunction LOG =
+        make(new org.apache.commons.math.analysis.function.Log());
 
     /** The {@code FastMath.log10} method wrapped as a {@link ComposableFunction}. */
-    public static final ComposableFunction LOG10 = new ComposableFunction() {
-        /** {@inheritDoc} */
-        @Override
-        public double value(double d) {
-            return FastMath.log10(d);
-        }
-    };
+    public static final ComposableFunction LOG10 =
+        make(new org.apache.commons.math.analysis.function.Log10());
 
     /** The {@code FastMath.log1p} method wrapped as a {@link ComposableFunction}. */
-    public static final ComposableFunction LOG1P = new ComposableFunction () {
-        @Override
-        public double value(double d){
-            return FastMath.log1p(d);
-        }
-    };
+    public static final ComposableFunction LOG1P =
+        make(new org.apache.commons.math.analysis.function.Log1p());
 
     /** The {@code FastMath.cos} method wrapped as a {@link ComposableFunction}. */
-    public static final ComposableFunction COS = new ComposableFunction() {
-        /** {@inheritDoc} */
-        @Override
-        public double value(double d) {
-            return FastMath.cos(d);
-        }
-    };
+    public static final ComposableFunction COS =
+        make(new org.apache.commons.math.analysis.function.Cos());
 
     /** The {@code FastMath.abs} method wrapped as a {@link ComposableFunction}. */
-    public static final ComposableFunction ACOS = new ComposableFunction() {
-        /** {@inheritDoc} */
-        @Override
-        public double value(double d) {
-            return FastMath.acos(d);
-        }
-    };
+    public static final ComposableFunction ACOS =
+        make(new org.apache.commons.math.analysis.function.Acos());
 
     /** The {@code FastMath.cosh} method wrapped as a {@link ComposableFunction}. */
-    public static final ComposableFunction COSH = new ComposableFunction() {
-        /** {@inheritDoc} */
-        @Override
-        public double value(double d) {
-            return FastMath.cosh(d);
-        }
-    };
+    public static final ComposableFunction COSH =
+        make(new org.apache.commons.math.analysis.function.Cosh());
 
     /** The {@code FastMath.rint} method wrapped as a {@link ComposableFunction}. */
     public static final ComposableFunction RINT = new ComposableFunction() {

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/FunctionUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/FunctionUtils.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/FunctionUtils.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/FunctionUtils.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,170 @@
+/*
+ * 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 org.apache.commons.math.analysis.function.Identity;
+
+/**
+ * Utilities for manipulating function objects.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class FunctionUtils {
+    /**
+     * Compose functions.
+     *
+     * @param f List of functions.
+     * @return the composed function.
+     */
+    public static UnivariateRealFunction compose(final UnivariateRealFunction ... f) {
+        return new UnivariateRealFunction() {
+            /** {@inheritDoc} */
+            public double value(double x) {
+                double r = x;
+                for (int i = f.length - 1; i >= 0; i--) {
+                    r = f[i].value(r);
+                }
+                return r;
+            }
+        };
+    }
+
+    /**
+     * Add functions.
+     *
+     * @param f List of functions.
+     * @return a function that computes the addition of the functions.
+     */
+    public static UnivariateRealFunction add(final UnivariateRealFunction ... f) {
+        return new UnivariateRealFunction() {
+            /** {@inheritDoc} */
+            public double value(double x) {
+                double r = f[0].value(x);
+                for (int i = 1; i < f.length; i++) {
+                    r += f[i].value(x);
+                }
+                return r;
+            }
+        };
+    }
+
+    /**
+     * Multiply functions.
+     *
+     * @param f List of functions.
+     * @return a function that computes the multiplication of the functions.
+     */
+    public static UnivariateRealFunction multiply(final UnivariateRealFunction ... f) {
+        return new UnivariateRealFunction() {
+            /** {@inheritDoc} */
+            public double value(double x) {
+                double r = f[0].value(x);
+                for (int i = 1; i < f.length; i++) {
+                    r *= f[i].value(x);
+                }
+                return r;
+            }
+        };
+    }
+
+    /**
+     * Combine functions.
+     *
+     * @param combiner Combiner function.
+     * @param f Function.
+     * @param g Function.
+     * @return the composed function.
+     */
+    public static UnivariateRealFunction combine(final BivariateRealFunction combiner,
+                                                 final UnivariateRealFunction f,
+                                                 final UnivariateRealFunction g) {
+        return new UnivariateRealFunction() {
+            /** {@inheritDoc} */
+            public double value(double x) {
+                return combiner.value(f.value(x), g.value(x));
+            }
+        };
+    }
+
+    /**
+     * Generate a collector function.
+     *
+     * @param combiner Combiner function.
+     * @param f Function.
+     * @param initialValue Initial value.
+     * @return a collector function.
+     */
+    public static MultivariateRealFunction collector(final BivariateRealFunction combiner,
+                                                     final UnivariateRealFunction f,
+                                                     final double initialValue) {
+        return new MultivariateRealFunction() {
+            /** {@inheritDoc} */
+            public double value(double[] point) {
+                double result = combiner.value(initialValue, f.value(point[0]));
+                for (int i = 1; i < point.length; i++) {
+                    result = combiner.value(result, f.value(point[i]));
+                }
+                return result;
+            }
+        };
+    }
+
+    /**
+     * Generate a collector function.
+     *
+     * @param combiner Combiner function.
+     * @param initialValue Initial value.
+     * @return a collector function.
+     */
+    public static MultivariateRealFunction collector(final BivariateRealFunction combiner,
+                                                     final double initialValue) {
+        return collector(combiner, new Identity(), initialValue);
+    }
+
+    /**
+     * Create a unary function by fixing the first argument of a binary function.
+     *
+     * @param f Binary function.
+     * @param fixed Value to which the first argument of {@code f} is set.
+     */
+    public static UnivariateRealFunction fix1stArgument(final BivariateRealFunction f,
+                                                        final double fixed) {
+        return new UnivariateRealFunction() {
+            /** {@inheritDoc} */
+            public double value(double x) {
+                return f.value(fixed, x);
+            }
+        };
+    }
+    /**
+     * Create a unary function by fixing the second argument of a binary function.
+     *
+     * @param f Binary function.
+     * @param fixed Value to which the second argument of {@code f} is set.
+     */
+    public static UnivariateRealFunction fix2ndArgument(final BivariateRealFunction f,
+                                                        final double fixed) {
+        return new UnivariateRealFunction() {
+            /** {@inheritDoc} */
+            public double value(double x) {
+                return f.value(x, fixed);
+            }
+        };
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Abs.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Abs.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Abs.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Abs.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,34 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.UnivariateRealFunction;
+import org.apache.commons.math.util.FastMath;
+
+/**
+ * Absolute value function.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Abs implements UnivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x) {
+        return FastMath.abs(x);
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Acos.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Acos.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Acos.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Acos.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,34 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.UnivariateRealFunction;
+import org.apache.commons.math.util.FastMath;
+
+/**
+ * Arc-cosine function.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Acos implements UnivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x) {
+        return FastMath.acos(x);
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Acosh.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Acosh.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Acosh.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Acosh.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,34 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.UnivariateRealFunction;
+import org.apache.commons.math.util.FastMath;
+
+/**
+ * Hyperbolic arc-cosine function.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Acosh implements UnivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x) {
+        return FastMath.acosh(x);
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Add.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Add.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Add.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Add.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,33 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.BivariateRealFunction;
+
+/**
+ * Add the two operands.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Add implements BivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x, double y) {
+        return x + y;
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Asin.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Asin.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Asin.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Asin.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,34 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.UnivariateRealFunction;
+import org.apache.commons.math.util.FastMath;
+
+/**
+ * Arc-sine function.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Asin implements UnivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x) {
+        return FastMath.asin(x);
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Asinh.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Asinh.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Asinh.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Asinh.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,34 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.UnivariateRealFunction;
+import org.apache.commons.math.util.FastMath;
+
+/**
+ * Hyperbolic arc-sine function.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Asinh implements UnivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x) {
+        return FastMath.asinh(x);
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Atan.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Atan.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Atan.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Atan.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,34 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.UnivariateRealFunction;
+import org.apache.commons.math.util.FastMath;
+
+/**
+ * Arc-tangent function.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Atan implements UnivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x) {
+        return FastMath.atan(x);
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Atan2.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Atan2.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Atan2.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Atan2.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,34 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.BivariateRealFunction;
+import org.apache.commons.math.util.FastMath;
+
+/**
+ * Arc-tangent function.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Atan2 implements BivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x, double y) {
+        return FastMath.atan2(x, y);
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Atanh.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Atanh.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Atanh.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Atanh.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,34 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.UnivariateRealFunction;
+import org.apache.commons.math.util.FastMath;
+
+/**
+ * Hyperbolic arc-tangent function.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Atanh implements UnivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x) {
+        return FastMath.atanh(x);
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Cbrt.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Cbrt.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Cbrt.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Cbrt.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,34 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.UnivariateRealFunction;
+import org.apache.commons.math.util.FastMath;
+
+/**
+ * Cubic-root function.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Cbrt implements UnivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x) {
+        return FastMath.cbrt(x);
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Constant.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Constant.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Constant.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Constant.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,43 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.UnivariateRealFunction;
+
+/**
+ * Constant function.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Constant implements UnivariateRealFunction {
+    /** Constant. */
+    private final double c;
+
+    /**
+     * @param c Constant.
+     */
+    public Constant(double c) {
+        this.c = c;
+    }
+
+    /** {@inheritDoc} */
+    public double value(double x) {
+        return c;
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Cos.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Cos.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Cos.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Cos.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,34 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.UnivariateRealFunction;
+import org.apache.commons.math.util.FastMath;
+
+/**
+ * Cosine function.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Cos implements UnivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x) {
+        return FastMath.cos(x);
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Cosh.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Cosh.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Cosh.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Cosh.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,34 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.UnivariateRealFunction;
+import org.apache.commons.math.util.FastMath;
+
+/**
+ * Hyperbolic cosine function.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Cosh implements UnivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x) {
+        return FastMath.cosh(x);
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Divide.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Divide.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Divide.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Divide.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,33 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.BivariateRealFunction;
+
+/**
+ * Divide the first operand by the second.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Divide implements BivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x, double y) {
+        return x / y;
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Exp.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Exp.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Exp.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Exp.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,34 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.UnivariateRealFunction;
+import org.apache.commons.math.util.FastMath;
+
+/**
+ * Exponential function.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Exp implements UnivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x) {
+        return FastMath.exp(x);
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Expm1.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Expm1.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Expm1.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Expm1.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,34 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.UnivariateRealFunction;
+import org.apache.commons.math.util.FastMath;
+
+/**
+ * <code>e<sup>x</sup>-1</code> function.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Expm1 implements UnivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x) {
+        return FastMath.expm1(x);
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Identity.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Identity.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Identity.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Identity.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,33 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.UnivariateRealFunction;
+
+/**
+ * Identity function.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Identity implements UnivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x) {
+        return x;
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Inverse.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Inverse.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Inverse.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Inverse.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,33 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.UnivariateRealFunction;
+
+/**
+ * Inverse function.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Inverse implements UnivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x) {
+        return 1 / x;
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Log.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Log.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Log.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Log.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,34 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.UnivariateRealFunction;
+import org.apache.commons.math.util.FastMath;
+
+/**
+ * Natural logarithm function.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Log implements UnivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x) {
+        return FastMath.log(x);
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Log10.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Log10.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Log10.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Log10.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,34 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.UnivariateRealFunction;
+import org.apache.commons.math.util.FastMath;
+
+/**
+ * Base 10 logarithm function.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Log10 implements UnivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x) {
+        return FastMath.log10(x);
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Log1p.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Log1p.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Log1p.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Log1p.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,34 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.UnivariateRealFunction;
+import org.apache.commons.math.util.FastMath;
+
+/**
+ * <code>log(1 + p)</code> function.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Log1p implements UnivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x) {
+        return FastMath.log1p(x);
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Max.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Max.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Max.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Max.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,34 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.BivariateRealFunction;
+import org.apache.commons.math.util.FastMath;
+
+/**
+ * Maximum function.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Max implements BivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x, double y) {
+        return FastMath.max(x, y);
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Min.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Min.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Min.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Min.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,34 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.BivariateRealFunction;
+import org.apache.commons.math.util.FastMath;
+
+/**
+ * Minimum function.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Min implements BivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x, double y) {
+        return FastMath.min(x, y);
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Minus.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Minus.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Minus.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Minus.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,33 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.UnivariateRealFunction;
+
+/**
+ * Minus function.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Minus implements UnivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x) {
+        return -x;
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Multiply.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Multiply.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Multiply.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Multiply.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,33 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.BivariateRealFunction;
+
+/**
+ * Multiply the two operands.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Multiply implements BivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x, double y) {
+        return x * y;
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Pow.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Pow.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Pow.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Pow.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,34 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.BivariateRealFunction;
+import org.apache.commons.math.util.FastMath;
+
+/**
+ * Power function.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Pow implements BivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x, double y) {
+        return FastMath.pow(x, y);
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Power.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Power.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Power.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Power.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,44 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.UnivariateRealFunction;
+import org.apache.commons.math.util.FastMath;
+
+/**
+ * Power function.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Power implements UnivariateRealFunction {
+    /** Power. */
+    private final double p;
+
+    /**
+     * @param p Power.
+     */
+    public Power(double p) {
+        this.p = p;
+    }
+
+    /** {@inheritDoc} */
+    public double value(double x) {
+        return FastMath.pow(x, p);
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Sin.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Sin.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Sin.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Sin.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,34 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.UnivariateRealFunction;
+import org.apache.commons.math.util.FastMath;
+
+/**
+ * Sine function.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Sin implements UnivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x) {
+        return FastMath.sin(x);
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Sinc.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Sinc.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Sinc.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Sinc.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,34 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.UnivariateRealFunction;
+import org.apache.commons.math.util.FastMath;
+
+/**
+ * Sinc function.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Sinc implements UnivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x) {
+        return FastMath.abs(x) < 1e-9 ? 1 : FastMath.sin(x) / x;
+    }
+}

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

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Sinh.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Sinh.java?rev=1037896&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Sinh.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/function/Sinh.java Mon Nov 22 21:29:49 2010
@@ -0,0 +1,34 @@
+/*
+ * 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.function;
+
+import org.apache.commons.math.analysis.UnivariateRealFunction;
+import org.apache.commons.math.util.FastMath;
+
+/**
+ * Hyperbolic sine function.
+ *
+ * @version $Revision$ $Date$
+ * @since 3.0
+ */
+public class Sinh implements UnivariateRealFunction {
+    /** {@inheritDoc} */
+    public double value(double x) {
+        return FastMath.sinh(x);
+    }
+}

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



Mime
View raw message