brentworden 2003/11/21 21:59:31
Modified: math/src/experimental/org/apache/commons/math/linear
Decomposer.java
Added: math/src/experimental/org/apache/commons/math/analysis/derivative
AbstractDifferenceDerivative.java
CenterDifferenceDerivative.java
ForwardDifferenceDerivative.java
BackwardDifferenceDerivative.java
math/src/experimental/org/apache/commons/math/analysis
UnivariateRealFunctionUtilsTest.java
UnivariateRealFunctionUtils.java
UnivariateRealFunctionProxy.java
Log:
Here's my idea for approximating derivatives. It follows the decorator layout of
commons-collections. The main interface point is the UnivariateRealFunctionUtils type
which is responisble for creating decorated UnivariateRealFunction objects. To
demostrate the how the decorators could be used, I added the
UnivariateRealFunctionUtilsTest class which computes a local maximum of a function
using derivative decorators and the default solver.
Revision Changes Path
1.1
jakarta-commons/math/src/experimental/org/apache/commons/math/analysis/derivative/AbstractDifferenceDerivative.java
Index: AbstractDifferenceDerivative.java
===================================================================
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowledgement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party acknowledgements normally appear.
*
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their name without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.commons.math.analysis.derivative;
import org.apache.commons.math.analysis.UnivariateRealFunction;
import org.apache.commons.math.analysis.UnivariateRealFunctionProxy;
/**
* @todo add javadoc comment
* @version $Revision: 1.1 $ $Date: 2003/11/22 05:59:31 $
*/
public abstract class AbstractDifferenceDerivative extends
UnivariateRealFunctionProxy implements UnivariateRealFunction {
/** */
private double delta;
/**
* @todo add javadoc comment
*/
public AbstractDifferenceDerivative(UnivariateRealFunction function, double h) {
super(function);
setDelta(h);
}
private void setDelta(double h) {
this.delta = h;
}
protected double getDelta() {
return delta;
}
}
1.1
jakarta-commons/math/src/experimental/org/apache/commons/math/analysis/derivative/CenterDifferenceDerivative.java
Index: CenterDifferenceDerivative.java
===================================================================
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowledgement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party acknowledgements normally appear.
*
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their name without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.commons.math.analysis.derivative;
import org.apache.commons.math.MathException;
import org.apache.commons.math.analysis.UnivariateRealFunction;
/**
* @todo add javadoc comment
* @version $Revision: 1.1 $ $Date: 2003/11/22 05:59:31 $
*/
public class CenterDifferenceDerivative extends AbstractDifferenceDerivative {
/**
* @todo add javadoc comment
*/
public CenterDifferenceDerivative(UnivariateRealFunction function, double h) {
super(function, h);
}
/**
* @todo add javadoc comment
*/
public double value(double x) throws MathException {
UnivariateRealFunction f = getFunction();
double h2 = getDelta();
double h = h2 * .5;
return (f.value(x + h) - f.value(x - h)) / h2;
}
/**
*
*/
public static UnivariateRealFunction decorate(UnivariateRealFunction function,
double h) {
return new CenterDifferenceDerivative(function, h);
}
}
1.1
jakarta-commons/math/src/experimental/org/apache/commons/math/analysis/derivative/ForwardDifferenceDerivative.java
Index: ForwardDifferenceDerivative.java
===================================================================
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowledgement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party acknowledgements normally appear.
*
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their name without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.commons.math.analysis.derivative;
import org.apache.commons.math.MathException;
import org.apache.commons.math.analysis.UnivariateRealFunction;
/**
* @todo add javadoc comment
* @version $Revision: 1.1 $ $Date: 2003/11/22 05:59:31 $
*/
public class ForwardDifferenceDerivative extends AbstractDifferenceDerivative {
/**
* @todo add javadoc comment
*/
public ForwardDifferenceDerivative(UnivariateRealFunction function, double h) {
super(function, h);
}
/**
* @todo add javadoc comment
*/
public double value(double x) throws MathException {
UnivariateRealFunction f = getFunction();
double h = getDelta();
return (f.value(x + h) - f.value(x)) / h;
}
/**
*
*/
public static UnivariateRealFunction decorate(UnivariateRealFunction function,
double h) {
return new ForwardDifferenceDerivative(function, h);
}
}
1.1
jakarta-commons/math/src/experimental/org/apache/commons/math/analysis/derivative/BackwardDifferenceDerivative.java
Index: BackwardDifferenceDerivative.java
===================================================================
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowledgement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party acknowledgements normally appear.
*
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their name without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.commons.math.analysis.derivative;
import org.apache.commons.math.MathException;
import org.apache.commons.math.analysis.UnivariateRealFunction;
/**
* @todo add javadoc comment
* @version $Revision: 1.1 $ $Date: 2003/11/22 05:59:31 $
*/
public class BackwardDifferenceDerivative extends AbstractDifferenceDerivative {
/**
* @todo add javadoc comment
*/
public BackwardDifferenceDerivative(UnivariateRealFunction function, double h) {
super(function, h);
}
/**
* @todo add javadoc comment
*/
public double value(double x) throws MathException {
UnivariateRealFunction f = getFunction();
double h = getDelta();
return (f.value(x) - f.value(x - h)) / h;
}
/**
*
*/
public static UnivariateRealFunction decorate(UnivariateRealFunction function,
double h) {
return new BackwardDifferenceDerivative(function, h);
}
}
1.1
jakarta-commons/math/src/experimental/org/apache/commons/math/analysis/UnivariateRealFunctionUtilsTest.java
Index: UnivariateRealFunctionUtilsTest.java
===================================================================
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowledgement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party acknowledgements normally appear.
*
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their name without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.commons.math.analysis;
import junit.framework.TestCase;
/**
* @todo add javadoc comment
* @version $Revision: 1.1 $ $Date: 2003/11/22 05:59:31 $
*/
public class UnivariateRealFunctionUtilsTest extends TestCase {
/**
*
*/
public void testLocalMaximumCentered() {
UnivariateRealFunction function = new SinFunction();
UnivariateRealFunction derivative =
UnivariateRealFunctionUtils.centerDifferenceDerivative(function, 1.0e-5);
testLocalMaximum(derivative);
}
/**
*
*/
public void testLocalMaximumForward() {
UnivariateRealFunction function = new SinFunction();
UnivariateRealFunction derivative =
UnivariateRealFunctionUtils.forwardDifferenceDerivative(function, 1.0e-5);
testLocalMaximum(derivative);
}
/**
*
*/
public void testLocalMaximumBackward() {
UnivariateRealFunction function = new SinFunction();
UnivariateRealFunction derivative =
UnivariateRealFunctionUtils.backwardDifferenceDerivative(function, 1.0e-5);
testLocalMaximum(derivative);
}
/**
* Find a local extrema, i.e. f'(x) = 0.
*/
private void testLocalMaximum(UnivariateRealFunction derivative) {
try {
double maximum = UnivariateRealSolverUtils.solve(derivative, Math.PI /
3.0, Math.PI * 2.0 / 3.0);
assertEquals(maximum, Math.PI / 2.0, 1.0e-5);
} catch (Exception ex) {
fail(ex.getMessage());
}
}
}
1.1
jakarta-commons/math/src/experimental/org/apache/commons/math/analysis/UnivariateRealFunctionUtils.java
Index: UnivariateRealFunctionUtils.java
===================================================================
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowledgement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party acknowledgements normally appear.
*
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their name without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.commons.math.analysis;
import org.apache.commons.math.analysis.derivative.BackwardDifferenceDerivative;
import org.apache.commons.math.analysis.derivative.CenterDifferenceDerivative;
import org.apache.commons.math.analysis.derivative.ForwardDifferenceDerivative;
/**
* @todo add javadoc comment
* @version $Revision: 1.1 $ $Date: 2003/11/22 05:59:31 $
*/
public class UnivariateRealFunctionUtils {
/**
* @todo add javadoc comment
*/
private UnivariateRealFunctionUtils() {
super();
}
public static UnivariateRealFunction
backwardDifferenceDerivative(UnivariateRealFunction function, double delta) {
return BackwardDifferenceDerivative.decorate(function, delta);
}
public static UnivariateRealFunction
centerDifferenceDerivative(UnivariateRealFunction function, double delta) {
return CenterDifferenceDerivative.decorate(function, delta);
}
public static UnivariateRealFunction
forwardDifferenceDerivative(UnivariateRealFunction function, double delta) {
return ForwardDifferenceDerivative.decorate(function, delta);
}
}
1.1
jakarta-commons/math/src/experimental/org/apache/commons/math/analysis/UnivariateRealFunctionProxy.java
Index: UnivariateRealFunctionProxy.java
===================================================================
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowledgement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party acknowledgements normally appear.
*
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their name without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.commons.math.analysis;
/**
* @todo add javadoc comment
* @version $Revision: 1.1 $ $Date: 2003/11/22 05:59:31 $
*/
public abstract class UnivariateRealFunctionProxy
implements UnivariateRealFunction {
private UnivariateRealFunction function;
/**
* @todo add javadoc comment
*/
public UnivariateRealFunctionProxy(UnivariateRealFunction function) {
super();
setFunction(function);
}
/**
* @todo add javadoc comment
*/
protected UnivariateRealFunction getFunction() {
return function;
}
/**
* @todo add javadoc comment
*/
private void setFunction(UnivariateRealFunction function) {
this.function = function;
}
}
1.2 +1 -1
jakarta-commons/math/src/experimental/org/apache/commons/math/linear/Decomposer.java
Index: Decomposer.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/math/src/experimental/org/apache/commons/math/linear/Decomposer.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Decomposer.java 20 Nov 2003 04:22:16 -0000 1.1
+++ Decomposer.java 22 Nov 2003 05:59:31 -0000 1.2
@@ -14,6 +14,6 @@
*/
public interface Decomposer {
- Decomposition decompose(RealMatrix);
+ Decomposition decompose(RealMatrix matrix);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]