Permalink
Browse files

Dropped files not included in release from tag.

  • Loading branch information...
1 parent f93b146 commit e3f74adc9b86a2217e56d8ed93988146cf50b13e @psteitz psteitz committed Jul 30, 2009
Showing with 0 additions and 19,134 deletions.
  1. +0 −34 src/experimental/org/apache/commons/math/analysis/DerivativeOperatorFactory.java
  2. +0 −46 src/experimental/org/apache/commons/math/analysis/DerivativeOperatorFactoryTest.java
  3. +0 −33 src/experimental/org/apache/commons/math/analysis/FunctionOperator.java
  4. +0 −51 src/experimental/org/apache/commons/math/analysis/UnivariateRealFunctionProxy.java
  5. +0 −48 src/experimental/org/apache/commons/math/analysis/UnivariateRealFunctionUtils.java
  6. +0 −65 src/experimental/org/apache/commons/math/analysis/UnivariateRealFunctionUtilsTest.java
  7. +0 −46 src/experimental/org/apache/commons/math/analysis/derivative/AbstractDifferenceDerivative.java
  8. +0 −51 src/experimental/org/apache/commons/math/analysis/derivative/BackwardDifferenceDerivative.java
  9. +0 −52 src/experimental/org/apache/commons/math/analysis/derivative/CenterDifferenceDerivative.java
  10. +0 −51 src/experimental/org/apache/commons/math/analysis/derivative/ForwardDifferenceDerivative.java
  11. +0 −30 src/experimental/org/apache/commons/math/function/Compilable.java
  12. +0 −220 src/experimental/org/apache/commons/math/function/DefaultContext.java
  13. +0 −30 src/experimental/org/apache/commons/math/function/Evaluation.java
  14. +0 −51 src/experimental/org/apache/commons/math/function/EvaluationContext.java
  15. +0 −62 src/experimental/org/apache/commons/math/function/EvaluationException.java
  16. +0 −37 src/experimental/org/apache/commons/math/function/Variable.java
  17. +0 −55 src/experimental/org/apache/commons/math/function/simple/Add.java
  18. +0 −54 src/experimental/org/apache/commons/math/function/simple/Divide.java
  19. +0 −52 src/experimental/org/apache/commons/math/function/simple/Equals.java
  20. +0 −52 src/experimental/org/apache/commons/math/function/simple/Multiply.java
  21. +0 −56 src/experimental/org/apache/commons/math/function/simple/Power.java
  22. +0 −51 src/experimental/org/apache/commons/math/function/simple/Sqrt.java
  23. +0 −52 src/experimental/org/apache/commons/math/function/simple/Subtract.java
  24. +0 −220 src/experimental/org/apache/commons/math/linear/CholeskySolver.java
  25. +0 −292 src/experimental/org/apache/commons/math/linear/CholeskySolverTest.java
  26. +0 −29 src/experimental/org/apache/commons/math/linear/Decomposer.java
  27. +0 −37 src/experimental/org/apache/commons/math/linear/Decomposition.java
  28. +0 −44 src/experimental/org/apache/commons/math/linear/DecompositionFactory.java
  29. +0 −23 src/experimental/org/apache/commons/math/linear/RealVector.java
  30. +0 −2,051 src/experimental/org/apache/commons/math/linear/RecursiveLayoutRealMatrix.java
  31. +0 −1,242 src/experimental/org/apache/commons/math/linear/RecursiveLayoutRealMatrixTest.java
  32. +0 −149 src/experimental/org/apache/commons/math/stat/univariate/BeanListUnivariateImpl.java
  33. +0 −228 src/experimental/org/apache/commons/math/stat/univariate/BeanListUnivariateImplTest.java
  34. +0 −93 src/experimental/org/apache/commons/math/util/BeanTransformer.java
  35. +0 −94 src/experimental/org/apache/commons/math/util/BeanTransformerTest.java
  36. +0 −202 src/mantissa/LICENSE-2.0.txt
  37. +0 −9 src/mantissa/NOTICE.txt
  38. +0 −119 src/mantissa/src/org/spaceroots/mantissa/MantissaException.java
  39. +0 −113 src/mantissa/src/org/spaceroots/mantissa/MessagesResources.java
  40. +0 −112 src/mantissa/src/org/spaceroots/mantissa/MessagesResources_fr.java
  41. +0 −1,014 src/mantissa/src/org/spaceroots/mantissa/algebra/Polynomial.java
  42. +0 −346 src/mantissa/src/org/spaceroots/mantissa/algebra/PolynomialFraction.java
  43. +0 −373 src/mantissa/src/org/spaceroots/mantissa/algebra/RationalNumber.java
  44. +0 −42 src/mantissa/src/org/spaceroots/mantissa/functions/ExhaustedSampleException.java
  45. +0 −59 src/mantissa/src/org/spaceroots/mantissa/functions/FunctionException.java
  46. +0 −73 src/mantissa/src/org/spaceroots/mantissa/functions/scalar/BasicSampledFunctionIterator.java
  47. +0 −57 src/mantissa/src/org/spaceroots/mantissa/functions/scalar/ComputableFunction.java
  48. +0 −146 src/mantissa/src/org/spaceroots/mantissa/functions/scalar/ComputableFunctionSampler.java
  49. +0 −68 src/mantissa/src/org/spaceroots/mantissa/functions/scalar/SampledFunction.java
  50. +0 −47 src/mantissa/src/org/spaceroots/mantissa/functions/scalar/SampledFunctionIterator.java
  51. +0 −97 src/mantissa/src/org/spaceroots/mantissa/functions/scalar/ScalarValuedPair.java
  52. +0 −78 src/mantissa/src/org/spaceroots/mantissa/functions/vectorial/BasicSampledFunctionIterator.java
  53. +0 −61 src/mantissa/src/org/spaceroots/mantissa/functions/vectorial/ComputableFunction.java
  54. +0 −150 src/mantissa/src/org/spaceroots/mantissa/functions/vectorial/ComputableFunctionSampler.java
  55. +0 −73 src/mantissa/src/org/spaceroots/mantissa/functions/vectorial/SampledFunction.java
  56. +0 −52 src/mantissa/src/org/spaceroots/mantissa/functions/vectorial/SampledFunctionIterator.java
  57. +0 −58 src/mantissa/src/org/spaceroots/mantissa/functions/vectorial/VectorialValuedPair.java
  58. +0 −139 src/mantissa/src/org/spaceroots/mantissa/linalg/DiagonalMatrix.java
  59. +0 −119 src/mantissa/src/org/spaceroots/mantissa/linalg/GeneralMatrix.java
  60. +0 −276 src/mantissa/src/org/spaceroots/mantissa/linalg/GeneralSquareMatrix.java
  61. +0 −216 src/mantissa/src/org/spaceroots/mantissa/linalg/LowerTriangularMatrix.java
  62. +0 −484 src/mantissa/src/org/spaceroots/mantissa/linalg/Matrix.java
  63. +0 −86 src/mantissa/src/org/spaceroots/mantissa/linalg/MatrixFactory.java
  64. +0 −103 src/mantissa/src/org/spaceroots/mantissa/linalg/NonNullRange.java
  65. +0 −41 src/mantissa/src/org/spaceroots/mantissa/linalg/SingularMatrixException.java
  66. +0 −99 src/mantissa/src/org/spaceroots/mantissa/linalg/SquareMatrix.java
  67. +0 −223 src/mantissa/src/org/spaceroots/mantissa/linalg/SymetricalMatrix.java
  68. +0 −216 src/mantissa/src/org/spaceroots/mantissa/linalg/UpperTriangularMatrix.java
  69. BIN src/mantissa/src/org/spaceroots/mantissa/linalg/doc-files/org_spaceroots_mantissa_linalg_classes.png
  70. +0 −37 src/mantissa/src/org/spaceroots/mantissa/linalg/package.html
  71. +0 −49 src/mantissa/src/org/spaceroots/mantissa/quadrature/scalar/ComputableFunctionIntegrator.java
  72. +0 −57 src/mantissa/src/org/spaceroots/mantissa/quadrature/scalar/EnhancedSimpsonIntegrator.java
  73. +0 −100 src/mantissa/src/org/spaceroots/mantissa/quadrature/scalar/EnhancedSimpsonIntegratorSampler.java
  74. +0 −62 src/mantissa/src/org/spaceroots/mantissa/quadrature/scalar/RiemannIntegrator.java
  75. +0 −87 src/mantissa/src/org/spaceroots/mantissa/quadrature/scalar/RiemannIntegratorSampler.java
  76. +0 −48 src/mantissa/src/org/spaceroots/mantissa/quadrature/scalar/SampledFunctionIntegrator.java
  77. +0 −53 src/mantissa/src/org/spaceroots/mantissa/quadrature/scalar/TrapezoidIntegrator.java
  78. +0 −89 src/mantissa/src/org/spaceroots/mantissa/quadrature/scalar/TrapezoidIntegratorSampler.java
  79. +0 −49 src/mantissa/src/org/spaceroots/mantissa/quadrature/vectorial/ComputableFunctionIntegrator.java
  80. +0 −57 src/mantissa/src/org/spaceroots/mantissa/quadrature/vectorial/EnhancedSimpsonIntegrator.java
  81. +0 −117 src/mantissa/src/org/spaceroots/mantissa/quadrature/vectorial/EnhancedSimpsonIntegratorSampler.java
  82. +0 −162 src/mantissa/src/org/spaceroots/mantissa/quadrature/vectorial/GaussLegendreIntegrator.java
  83. +0 −63 src/mantissa/src/org/spaceroots/mantissa/quadrature/vectorial/RiemannIntegrator.java
  84. +0 −99 src/mantissa/src/org/spaceroots/mantissa/quadrature/vectorial/RiemannIntegratorSampler.java
  85. +0 −49 src/mantissa/src/org/spaceroots/mantissa/quadrature/vectorial/SampledFunctionIntegrator.java
  86. +0 −54 src/mantissa/src/org/spaceroots/mantissa/quadrature/vectorial/TrapezoidIntegrator.java
  87. +0 −101 src/mantissa/src/org/spaceroots/mantissa/quadrature/vectorial/TrapezoidIntegratorSampler.java
  88. +0 −161 src/mantissa/src/org/spaceroots/mantissa/random/ScalarSampleStatistics.java
  89. +0 −285 src/mantissa/src/org/spaceroots/mantissa/random/VectorialSampleStatistics.java
  90. BIN src/mantissa/src/org/spaceroots/mantissa/random/doc-files/org_spaceroots_mantissa_random_classes.png
  91. +0 −49 src/mantissa/src/org/spaceroots/mantissa/random/package.html
  92. +0 −188 src/mantissa/src/org/spaceroots/mantissa/roots/BrentSolver.java
  93. +0 −57 src/mantissa/src/org/spaceroots/mantissa/roots/ConvergenceChecker.java
  94. +0 −54 src/mantissa/src/org/spaceroots/mantissa/roots/RootsFinder.java
  95. +0 −141 src/mantissa/src/org/spaceroots/mantissa/utilities/ArrayMapper.java
  96. +0 −46 src/mantissa/src/org/spaceroots/mantissa/utilities/ArrayMapperEntry.java
  97. +0 −81 src/mantissa/src/org/spaceroots/mantissa/utilities/ArraySliceMappable.java
  98. +0 −166 src/mantissa/src/org/spaceroots/mantissa/utilities/Interval.java
  99. +0 −362 src/mantissa/src/org/spaceroots/mantissa/utilities/IntervalsList.java
  100. +0 −85 src/mantissa/src/org/spaceroots/mantissa/utilities/MappableArray.java
  101. +0 −88 src/mantissa/src/org/spaceroots/mantissa/utilities/MappableScalar.java
  102. +0 −41 src/mantissa/tests-src/org/spaceroots/mantissa/AllTests.java
  103. +0 −36 src/mantissa/tests-src/org/spaceroots/mantissa/algebra/AllTests.java
  104. +0 −131 src/mantissa/tests-src/org/spaceroots/mantissa/algebra/PolynomialDoubleTest.java
  105. +0 −195 src/mantissa/tests-src/org/spaceroots/mantissa/algebra/PolynomialFractionTest.java
  106. +0 −146 src/mantissa/tests-src/org/spaceroots/mantissa/algebra/PolynomialRationalTest.java
  107. +0 −186 src/mantissa/tests-src/org/spaceroots/mantissa/algebra/RationalNumberTest.java
  108. +0 −34 src/mantissa/tests-src/org/spaceroots/mantissa/functions/AllTests.java
  109. +0 −35 src/mantissa/tests-src/org/spaceroots/mantissa/functions/scalar/AllTests.java
  110. +0 −149 ...mantissa/tests-src/org/spaceroots/mantissa/functions/scalar/BasicSampledFunctionIteratorTest.java
  111. +0 −196 src/mantissa/tests-src/org/spaceroots/mantissa/functions/scalar/ComputableFunctionSamplerTest.java
  112. +0 −51 src/mantissa/tests-src/org/spaceroots/mantissa/functions/scalar/ScalarValuedPairTest.java
  113. +0 −35 src/mantissa/tests-src/org/spaceroots/mantissa/functions/vectorial/AllTests.java
  114. +0 −162 ...tissa/tests-src/org/spaceroots/mantissa/functions/vectorial/BasicSampledFunctionIteratorTest.java
  115. +0 −229 ...mantissa/tests-src/org/spaceroots/mantissa/functions/vectorial/ComputableFunctionSamplerTest.java
  116. +0 −58 src/mantissa/tests-src/org/spaceroots/mantissa/functions/vectorial/VectorialValuedPairTest.java
  117. +0 −40 src/mantissa/tests-src/org/spaceroots/mantissa/linalg/AllTests.java
  118. +0 −190 src/mantissa/tests-src/org/spaceroots/mantissa/linalg/DiagonalMatrixTest.java
  119. +0 −286 src/mantissa/tests-src/org/spaceroots/mantissa/linalg/GeneralMatrixTest.java
  120. +0 −366 src/mantissa/tests-src/org/spaceroots/mantissa/linalg/GeneralSquareMatrixTest.java
  121. +0 −225 src/mantissa/tests-src/org/spaceroots/mantissa/linalg/LowerTriangularMatrixTest.java
  122. +0 −71 src/mantissa/tests-src/org/spaceroots/mantissa/linalg/MatrixFactoryTest.java
  123. +0 −62 src/mantissa/tests-src/org/spaceroots/mantissa/linalg/NonNullRangeTest.java
  124. +0 −272 src/mantissa/tests-src/org/spaceroots/mantissa/linalg/SymetricalMatrixTest.java
  125. +0 −225 src/mantissa/tests-src/org/spaceroots/mantissa/linalg/UpperTriangularMatrixTest.java
  126. +0 −32 src/mantissa/tests-src/org/spaceroots/mantissa/quadrature/AllTests.java
  127. +0 −33 src/mantissa/tests-src/org/spaceroots/mantissa/quadrature/scalar/AllTests.java
  128. +0 −33 src/mantissa/tests-src/org/spaceroots/mantissa/quadrature/vectorial/AllTests.java
  129. +0 −124 src/mantissa/tests-src/org/spaceroots/mantissa/quadrature/vectorial/GaussLegendreIntegratorTest.java
  130. +0 −37 src/mantissa/tests-src/org/spaceroots/mantissa/random/AllTests.java
  131. +0 −103 src/mantissa/tests-src/org/spaceroots/mantissa/random/ScalarSampleStatisticsTest.java
  132. +0 −33 src/mantissa/tests-src/org/spaceroots/mantissa/roots/AllTests.java
  133. +0 −71 src/mantissa/tests-src/org/spaceroots/mantissa/roots/BrentSolverTest.java
  134. +0 −433 src/mantissa/tests-src/org/spaceroots/mantissa/roots/TestProblem.java
  135. +0 −37 src/mantissa/tests-src/org/spaceroots/mantissa/utilities/AllTests.java
  136. +0 −149 src/mantissa/tests-src/org/spaceroots/mantissa/utilities/ArrayMapperTest.java
  137. +0 −88 src/mantissa/tests-src/org/spaceroots/mantissa/utilities/IntervalTest.java
  138. +0 −120 src/mantissa/tests-src/org/spaceroots/mantissa/utilities/IntervalsListTest.java
  139. +0 −92 src/mantissa/tests-src/org/spaceroots/mantissa/utilities/MappableArrayTest.java
  140. +0 −100 src/mantissa/tests-src/org/spaceroots/mantissa/utilities/MappableScalarTest.java
@@ -1,34 +0,0 @@
-/*
- * 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;
-
-public class DerivativeOperatorFactory {
-
- public static DerivativeOperatorFactory newInstance() {
- return null;
- }
-
- public FunctionOperator getDefaultDerivativeOperator() {
- return null;
- }
-
- public FunctionOperator getCenteredDifferenceDerivativeOperator(){
- return null;
- }
-
- // and so on for other implementations of numerical deriv's
-}
@@ -1,46 +0,0 @@
-/*
- * 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 junit.framework.TestCase;
-
-/**
-
- *
- * To change the template for this generated type comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class DerivativeOperatorFactoryTest extends TestCase {
-
- /**
- * Constructor for DerivativeOperatorFactoryTest.
- * @param arg0
- */
- public DerivativeOperatorFactoryTest(String arg0) {
- super(arg0);
- }
-
- //UnivariateRealFunction f = new SomeUserDefinedFunction();
- //FunctionOperator derivative =
- // DerivativeOperatorFactory.newInstance().getDefaultDerivativeOperator();
-
- //UnivariateRealFunction g = derivative.evaluate( f );
-
- // to obtain the value of f'(0.0) use
- //double fprime_at_0 = g.value( 0.0 );
-
-}
@@ -1,33 +0,0 @@
-/*
- * 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.MathException;
-
-public interface FunctionOperator {
-
-
- /**
- * Evaluate the Function Operator for a given real single variable function.
- *
- * @param f the function which should be evaluated
- * @return the resultant function
- * @throws MathException if the function couldn't be evaluated
- */
- public UnivariateRealFunction evaluate(UnivariateRealFunction f) throws MathException;
-
-}
@@ -1,51 +0,0 @@
-/*
- * 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;
-
-/**
- * @todo add javadoc comment
- * @version $Revision$ $Date$
- */
-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,48 +0,0 @@
-/*
- * 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.derivative.BackwardDifferenceDerivative;
-import org.apache.commons.math.analysis.derivative.CenterDifferenceDerivative;
-import org.apache.commons.math.analysis.derivative.ForwardDifferenceDerivative;
-
-/**
- * @todo add javadoc comment
- * @version $Revision$ $Date$
- */
-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,65 +0,0 @@
-/*
- * 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 junit.framework.TestCase;
-
-/**
- * @todo add javadoc comment
- * @version $Revision$ $Date$
- */
-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,46 +0,0 @@
-/*
- * 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.derivative;
-
-import org.apache.commons.math.analysis.UnivariateRealFunction;
-import org.apache.commons.math.analysis.UnivariateRealFunctionProxy;
-
-/**
- * @todo add javadoc comment
- * @version $Revision$ $Date$
- */
-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,51 +0,0 @@
-/*
- * 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.derivative;
-
-import org.apache.commons.math.MathException;
-import org.apache.commons.math.analysis.UnivariateRealFunction;
-
-/**
- * @todo add javadoc comment
- * @version $Revision$ $Date$
- */
-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);
- }
-}
Oops, something went wrong.

0 comments on commit e3f74ad

Please sign in to comment.