You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by md...@apache.org on 2003/11/20 05:22:17 UTC

cvs commit: jakarta-commons/math/src/experimental/org/apache/commons/math/analysis DerivativeOperatorFactoryTest.java DerivativeOperatorFactory.java FunctionOperator.java

mdiggory    2003/11/19 20:22:17

  Added:       math/src/experimental/org/apache/commons/math/linear
                        Decomposition.java Decomposer.java RealVector.java
                        DecompositionFactory.java
               math/src/experimental/org/apache/commons/math/function
                        Evaluation.java EvaluationContext.java
                        EvaluationException.java Compilable.java
                        DefaultContext.java Variable.java
               math/src/experimental/org/apache/commons/math/function/simple
                        Subtract.java Sqrt.java Divide.java Equals.java
                        Add.java Power.java Multiply.java
               math/src/experimental/org/apache/commons/math/analysis
                        DerivativeOperatorFactoryTest.java
                        DerivativeOperatorFactory.java
                        FunctionOperator.java
  Log:
  I've thought about this and I like the idea of getting some of this code available in the cvs for experimentation, I'm going ahead and adding it for others to look at and consider.
  
  This directory will not get compiled into the regular build process or future distributions. We can work on an ant script to provide easy build of this if others think it neccessary.
  
  Revision  Changes    Path
  1.1                  jakarta-commons/math/src/experimental/org/apache/commons/math/linear/Decomposition.java
  
  Index: Decomposition.java
  ===================================================================
  /*
   * Created on Nov 19, 2003
   *
   * To change the template for this generated file go to
   * Window>Preferences>Java>Code Generation>Code and Comments
   */
  package org.apache.commons.math.linear;
  
  /**
   * @author Administrator
   *
   * To change the template for this generated type comment go to
   * Window>Preferences>Java>Code Generation>Code and Comments
   */
  public interface Decomposition {
  
        // solve A*x=b
        RealVector solve(RealVector b);
  
  
        // solve matrix equation
        RealMatrix solve(RealMatrix b);
  
  
        RealMatrix invert();
      
  }
  
  
  
  1.1                  jakarta-commons/math/src/experimental/org/apache/commons/math/linear/Decomposer.java
  
  Index: Decomposer.java
  ===================================================================
  /*
   * Created on Nov 19, 2003
   *
   * To change the template for this generated file go to
   * Window>Preferences>Java>Code Generation>Code and Comments
   */
  package org.apache.commons.math.linear;
  
  /**
   * @author Administrator
   *
   * To change the template for this generated type comment go to
   * Window>Preferences>Java>Code Generation>Code and Comments
   */
  public interface Decomposer {
  
      Decomposition decompose(RealMatrix);
      
  }
  
  
  
  1.1                  jakarta-commons/math/src/experimental/org/apache/commons/math/linear/RealVector.java
  
  Index: RealVector.java
  ===================================================================
  /*
   * Created on Nov 19, 2003
   *
   * To change the template for this generated file go to
   * Window>Preferences>Java>Code Generation>Code and Comments
   */
  package org.apache.commons.math.linear;
  
  
  public class RealVector {
  
  
  }
  
  
  
  1.1                  jakarta-commons/math/src/experimental/org/apache/commons/math/linear/DecompositionFactory.java
  
  Index: DecompositionFactory.java
  ===================================================================
  /*
   * Created on Nov 19, 2003
   *
   * To change the template for this generated file go to
   * Window>Preferences>Java>Code Generation>Code and Comments
   */
  package org.apache.commons.math.linear;
  
  /**
   * @author Administrator
   *
   * To change the template for this generated type comment go to
   * Window>Preferences>Java>Code Generation>Code and Comments
   */
  public abstract  class DecompositionFactory {
  
      /*
       * get a matrix specific decomposer factory
       * class RealMatrix {
       *     DecompositionFactory getDecompositionFactory();
       *  }
       */
       
      // get overall default factory
      public static DecompositionFactory newInstance(){
          return null;
      }
  
      // construct a new default decomposer
      public abstract Decomposer newDecomposer();
  
      // example for a specific decomposer (Householder or QR)
      public abstract Decomposer newQRDecopmposer();
  }
  
  
  
  1.1                  jakarta-commons/math/src/experimental/org/apache/commons/math/function/Evaluation.java
  
  Index: Evaluation.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 apache@apache.org.
   *
   * 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.function;
  
  /**
   * @author Administrator
   *
   * To change the template for this generated type comment go to
   * Window>Preferences>Java>Code Generation>Code and Comments
   */
  public interface Evaluation {
      
      public abstract Evaluation evaluate(EvaluationContext context)
          throws EvaluationException;
         
  }
  
  
  1.1                  jakarta-commons/math/src/experimental/org/apache/commons/math/function/EvaluationContext.java
  
  Index: EvaluationContext.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 apache@apache.org.
   *
   * 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.function;
  
  /**
   * @author Administrator
   *
   * To change the template for this generated type comment go to
   * Window>Preferences>Java>Code Generation>Code and Comments
   */
  public interface EvaluationContext {
      
      public abstract double doubleValue(Evaluation argument) throws EvaluationException ;
      
      public abstract float floatValue(Evaluation argument) throws EvaluationException ;
      
      public abstract int intValue(Evaluation argument) throws EvaluationException ;
      
      public abstract long longValue(Evaluation argument) throws EvaluationException ;
      
      public abstract short shortValue(Evaluation argument) throws EvaluationException ;
      
      public abstract byte byteValue(Evaluation argument) throws EvaluationException ;
      
      public abstract Evaluation evaluate(double d);
      
      public abstract Evaluation evaluate(float f);
      
      public abstract Evaluation evaluate(int i);
      
      public abstract Evaluation evaluate(long l);
      
      public abstract Evaluation evaluate(short s);
      
      public abstract Evaluation evaluate(byte b);
  
  }
  
  
  1.1                  jakarta-commons/math/src/experimental/org/apache/commons/math/function/EvaluationException.java
  
  Index: EvaluationException.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 apache@apache.org.
   *
   * 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.function;
  
  /**
   * @author Administrator
   *
   * To change the template for this generated type comment go to
   * Window>Preferences>Java>Code Generation>Code and Comments
   */
  public class EvaluationException extends Exception {
  
      /**
       * 
       */
      public EvaluationException() {
          super();
          // TODO Auto-generated constructor stub
      }
  
      /**
       * @param message
       */
      public EvaluationException(String message) {
          super(message);
          // TODO Auto-generated constructor stub
      }
  
      /**
       * @param message
       * @param cause
       */
      public EvaluationException(String message, Throwable cause) {
          super(message, cause);
          // TODO Auto-generated constructor stub
      }
  
      /**
       * @param cause
       */
      public EvaluationException(Throwable cause) {
          super(cause);
          // TODO Auto-generated constructor stub
      }
  
  }
  
  
  
  1.1                  jakarta-commons/math/src/experimental/org/apache/commons/math/function/Compilable.java
  
  Index: Compilable.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 apache@apache.org.
   *
   * 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.function;
  
  /**
   * @author Administrator
   *
   * To change the template for this generated type comment go to
   * Window>Preferences>Java>Code Generation>Code and Comments
   */
  public interface Compilable {
      
      public abstract Evaluation compile(EvaluationContext context)
          throws EvaluationException;
                 
  }
  
  
  1.1                  jakarta-commons/math/src/experimental/org/apache/commons/math/function/DefaultContext.java
  
  Index: DefaultContext.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 apache@apache.org.
   *
   * 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.function;
  
  /**
   * @author Administrator
   *
   * To change the template for this generated type comment go to
   * Window>Preferences>Java>Code Generation>Code and Comments
   */
  public class DefaultContext implements EvaluationContext {
  
      /**
       * 
       */
      public DefaultContext() {
          super();
          // TODO Auto-generated constructor stub
      }
  
      /* (non-Javadoc)
       * @see org.apache.archimedes.EvaluationContext#doubleValue(org.apache.archimedes.Evaluation)
       */
      public double doubleValue(Evaluation argument) throws EvaluationException {
          // TODO Auto-generated method stub
          return ((DefaultValue)argument.evaluate(this)).doubleValue();
      }
  
      /* (non-Javadoc)
       * @see org.apache.archimedes.EvaluationContext#floatValue(org.apache.archimedes.Evaluation)
       */
      public float floatValue(Evaluation argument) throws EvaluationException {
          // TODO Auto-generated method stub
          return ((DefaultValue)argument.evaluate(this)).floatValue();
      }
  
      /* (non-Javadoc)
       * @see org.apache.archimedes.EvaluationContext#intValue(org.apache.archimedes.Evaluation)
       */
      public int intValue(Evaluation argument) throws EvaluationException {
          // TODO Auto-generated method stub
          return ((DefaultValue)argument.evaluate(this)).intValue();
      }
  
      /* (non-Javadoc)
       * @see org.apache.archimedes.EvaluationContext#longValue(org.apache.archimedes.Evaluation)
       */
      public long longValue(Evaluation argument) throws EvaluationException {
          // TODO Auto-generated method stub
          return ((DefaultValue)argument.evaluate(this)).longValue();
      }
  
      /* (non-Javadoc)
       * @see org.apache.archimedes.EvaluationContext#shortValue(org.apache.archimedes.Evaluation)
       */
      public short shortValue(Evaluation argument) throws EvaluationException {
          // TODO Auto-generated method stub
          return ((DefaultValue)argument.evaluate(this)).shortValue();
      }
  
      /* (non-Javadoc)
       * @see org.apache.archimedes.EvaluationContext#byteValue(org.apache.archimedes.Evaluation)
       */
      public byte byteValue(Evaluation argument) throws EvaluationException {
          // TODO Auto-generated method stub
          return ((DefaultValue)argument.evaluate(this)).byteValue();
      }
  
      /* (non-Javadoc)
       * @see org.apache.archimedes.EvaluationContext#evaluate(double)
       */
      public Evaluation evaluate(double d) {
          // TODO Auto-generated method stub
          return new DefaultValue(d);
      }
  
      /* (non-Javadoc)
       * @see org.apache.archimedes.EvaluationContext#evaluate(float)
       */
      public Evaluation evaluate(float f) {
          // TODO Auto-generated method stub
          return new DefaultValue(f);
      }
  
      /* (non-Javadoc)
       * @see org.apache.archimedes.EvaluationContext#evaluate(int)
       */
      public Evaluation evaluate(int i) {
          // TODO Auto-generated method stub
          return new DefaultValue(i);
      }
  
      /* (non-Javadoc)
       * @see org.apache.archimedes.EvaluationContext#evaluate(long)
       */
      public Evaluation evaluate(long l) {
          // TODO Auto-generated method stub
          return new DefaultValue(l);
      }
  
      /* (non-Javadoc)
       * @see org.apache.archimedes.EvaluationContext#evaluate(short)
       */
      public Evaluation evaluate(short s) {
          // TODO Auto-generated method stub
          return new DefaultValue(s);
      }
  
      /* (non-Javadoc)
       * @see org.apache.archimedes.EvaluationContext#evaluate(byte)
       */
      public Evaluation evaluate(byte b) {
          // TODO Auto-generated method stub
          return new DefaultValue(b);
      }
  
      public class DefaultValue extends Number implements Evaluation {
  
          Number value;
  
          /**
           * 
           */
          DefaultValue() {
              super();
              // TODO Auto-generated constructor stub
          }
  
          DefaultValue(Number n) {
              value = n;
          }
                  
          DefaultValue(double d) {
              value = new Double(d);
          }
  
          DefaultValue(float f) {
              value = new Float(f);
          }
  
          DefaultValue(int i) {
              value = new Integer(i);
          }
  
          DefaultValue(long l) {
              value = new Long(l);
          }
          
          /* (non-Javadoc)
           * @see org.apache.archimedes.Evaluation#evaluate(org.apache.archimedes.EvaluationContext)
           */
          public Evaluation evaluate(EvaluationContext context)
              throws EvaluationException {
              return this;
          }
  
          /* (non-Javadoc)
           * @see java.lang.Number#intValue()
           */
          public int intValue() {
              // TODO Auto-generated method stub
              return value.intValue();
          }
  
          /* (non-Javadoc)
           * @see java.lang.Number#longValue()
           */
          public long longValue() {
              // TODO Auto-generated method stub
              return value.longValue();
          }
  
          /* (non-Javadoc)
           * @see java.lang.Number#floatValue()
           */
          public float floatValue() {
              // TODO Auto-generated method stub
              return value.floatValue();
          }
  
          /* (non-Javadoc)
           * @see java.lang.Number#doubleValue()
           */
          public double doubleValue() {
              // TODO Auto-generated method stub
              return value.doubleValue();
          }
  
          /* (non-Javadoc)
           * @see java.lang.Number#byteValue()
           */
          public byte byteValue() {
              // TODO Auto-generated method stub
              return value.byteValue();
          }
  
          /* (non-Javadoc)
           * @see java.lang.Number#shortValue()
           */
          public short shortValue() {
              // TODO Auto-generated method stub
              return value.shortValue();
          }
  
      }
  }
  
  
  
  1.1                  jakarta-commons/math/src/experimental/org/apache/commons/math/function/Variable.java
  
  Index: Variable.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 apache@apache.org.
   *
   * 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.function;
  
  import java.io.Serializable;
  
  /**
   * @author Administrator
   *
   * To change the template for this generated type comment go to
   * Window - Preferences - Java - Code Generation - Code and Comments
   */
  public class Variable implements Evaluation, Serializable {
  
      public Evaluation evaluate(EvaluationContext context)
          throws EvaluationException {
  		return null;
          
          //context.evaluate(value.doubleValue());
  	}
      
      public String toString() {
      	return "Variable";
  	}	
  }
  
  
  1.1                  jakarta-commons/math/src/experimental/org/apache/commons/math/function/simple/Subtract.java
  
  Index: Subtract.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 apache@apache.org.
   *
   * 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.function.simple;
  
  import java.io.Serializable;
  
  import org.apache.commons.math.function.EvaluationContext;
  import org.apache.commons.math.function.Evaluation;
  import org.apache.commons.math.function.EvaluationException;
  
  /**
   * @author Administrator
   *
   * To change the template for this generated type comment go to
   * Window - Preferences - Java - Code Generation - Code and Comments
   */
  public class Subtract implements Evaluation, Serializable {
  
  	private Evaluation left;
  
  	private Evaluation right;
  
  	public void setLeftOperand(Evaluation left) {
  		this.left = left;
  	}
  
  	public void setRightOperand(Evaluation right) {
  		this.right = right;
  	}
  
      public Evaluation evaluate(EvaluationContext context) throws EvaluationException {
          return context.evaluate(
              context.doubleValue(left) - context.doubleValue(right)
          );
      }
      
      public String toString() {
          return "Subtract";
      }
  }
  
  
  1.1                  jakarta-commons/math/src/experimental/org/apache/commons/math/function/simple/Sqrt.java
  
  Index: Sqrt.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 apache@apache.org.
   *
   * 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.function.simple;
  
  import java.io.Serializable;
  
  import org.apache.commons.math.function.Evaluation;
  import org.apache.commons.math.function.EvaluationContext;
  import org.apache.commons.math.function.EvaluationException;
  
  
  /**
   * @author Administrator
   *
   * To change the template for this generated type comment go to
   * Window - Preferences - Java - Code Generation - Code and Comments
   */
  public class Sqrt implements Evaluation, Serializable {
  
      private Evaluation argument;
  
      public void setOperand(Evaluation argument) {
          this.argument = argument;
      }
  
      /* (non-Javadoc)
       * @see org.apache.archimedes.NumericFunction#evaluate(org.apache.archimedes.EvaluationContext)
       */
      public Evaluation evaluate(EvaluationContext context) throws EvaluationException {
          return context.evaluate(
              Math.sqrt(context.doubleValue(argument)));
  
      }
  
      public String toString() {
          return "Square Root";
      }
  
  }
  
  
  1.1                  jakarta-commons/math/src/experimental/org/apache/commons/math/function/simple/Divide.java
  
  Index: Divide.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 apache@apache.org.
   *
   * 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.function.simple;
  
  import java.io.Serializable;
  
  import org.apache.commons.math.function.EvaluationContext;
  import org.apache.commons.math.function.Evaluation;
  import org.apache.commons.math.function.EvaluationException;
  
  /**
   * @author Administrator
   *
   * To change the template for this generated type comment go to
   * Window - Preferences - Java - Code Generation - Code and Comments
   */
  public class Divide implements Evaluation, Serializable {
  
      private Evaluation left;
  
      private Evaluation right;
  
      public void setLeftOperand(Evaluation left) {
          this.left = left;
      }
  
      public void setRightOperand(Evaluation right) {
          this.right = right;
      }
  
      public Evaluation evaluate(EvaluationContext context) throws EvaluationException {
          return context.evaluate(
              context.doubleValue(left) / context.doubleValue(right)
          );
      }
  
      public String toString() {
          return "Divide";
      }
  
      
  }
  
  
  1.1                  jakarta-commons/math/src/experimental/org/apache/commons/math/function/simple/Equals.java
  
  Index: Equals.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 apache@apache.org.
   *
   * 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.function.simple;
  
  import java.io.Serializable;
  
  import org.apache.commons.math.function.Evaluation;
  import org.apache.commons.math.function.EvaluationContext;
  
  
  /**
   * @author Administrator
   *
   * To change the template for this generated type comment go to
   * Window - Preferences - Java - Code Generation - Code and Comments
   */
  public class Equals implements Evaluation, Serializable {
  
  	private Evaluation left;
  
  	private Evaluation right;
  
  	public void setLeftOperand(Evaluation left) {
  		this.left = left;
  	}
  
  	public void setRightOperand(Evaluation right) {
  		this.right = right;
  	}
      
  	public Evaluation evaluate(EvaluationContext context) {
  
  		return null;
  	}
      
      public String toString() {
          return "Equals";
      }
      
  }
  
  
  1.1                  jakarta-commons/math/src/experimental/org/apache/commons/math/function/simple/Add.java
  
  Index: Add.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 apache@apache.org.
   *
   * 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.function.simple;
  
  import java.io.Serializable;
  
  import org.apache.commons.math.function.Compilable;
  import org.apache.commons.math.function.Evaluation;
  import org.apache.commons.math.function.EvaluationContext;
  import org.apache.commons.math.function.EvaluationException;
  
  /**
   * @author Administrator
   *
   * To change the template for this generated type comment go to
   * Window - Preferences - Java - Code Generation - Code and Comments
   */
  public class Add implements Evaluation, Serializable {
  
  	private Evaluation left;
  
  	private Evaluation right;
  
  	public void setLeftOperand(Evaluation left) {
  		this.left = left;
  	}
  
  	public void setRightOperand(Evaluation right) {
  		this.right = right;
  	}
  
      public Evaluation evaluate(EvaluationContext context) throws EvaluationException {
          return context.evaluate(
              context.doubleValue(left) + context.doubleValue(right)
          );
      }
      
      
      public String toString() {
          return "Add";
      }
      
  }
  
  
  1.1                  jakarta-commons/math/src/experimental/org/apache/commons/math/function/simple/Power.java
  
  Index: Power.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 apache@apache.org.
   *
   * 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.function.simple;
  
  import java.io.Serializable;
  
  import org.apache.commons.math.function.Evaluation;
  import org.apache.commons.math.function.EvaluationContext;
  import org.apache.commons.math.function.EvaluationException;
  
  
  /**
   * @author Administrator
   *
   * To change the template for this generated type comment go to
   * Window - Preferences - Java - Code Generation - Code and Comments
   */
  public class Power implements Evaluation, Serializable {
  
  	private Evaluation argument;
  
  	private Evaluation power;
  	
  	public void setOperand(Evaluation argument) {
  		this.argument = argument;
  	}
  
  	public void setPower(Evaluation power) {
  		this.power = power;
  	}
  		
  	public Evaluation evaluate(EvaluationContext context) throws EvaluationException {
          return context.evaluate(
              Math.pow(
                  context.doubleValue(argument),
                  context.doubleValue(power)
              )
          );
  	}
      
      public String toString() {
          return "Power";
      }
  }
  
  
  1.1                  jakarta-commons/math/src/experimental/org/apache/commons/math/function/simple/Multiply.java
  
  Index: Multiply.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 apache@apache.org.
   *
   * 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.function.simple;
  
  import java.io.Serializable;
  
  import org.apache.commons.math.function.EvaluationContext;
  import org.apache.commons.math.function.Evaluation;
  import org.apache.commons.math.function.EvaluationException;
  
  /**
   * @author Administrator
   *
   * To change the template for this generated type comment go to
   * Window - Preferences - Java - Code Generation - Code and Comments
   */
  public class Multiply implements Evaluation, Serializable {
  
  	private Evaluation left;
  
  	private Evaluation right;
  
  	public void setLeftOperand(Evaluation left) {
  		this.left = left;
  	}
  
  	public void setRightOperand(Evaluation right) {
  		this.right = right;
  	}
  
      public Evaluation evaluate(EvaluationContext context) throws EvaluationException {
          return context.evaluate(
              context.doubleValue(left) * context.doubleValue(right)
          );
      }
      
      public String toString() {
          return "Multiply";
      }
  }
  
  
  1.1                  jakarta-commons/math/src/experimental/org/apache/commons/math/analysis/DerivativeOperatorFactoryTest.java
  
  Index: DerivativeOperatorFactoryTest.java
  ===================================================================
  /*
   * Created on Nov 19, 2003
   *
   * To change the template for this generated file go to
   * Window>Preferences>Java>Code Generation>Code and Comments
   */
  package org.apache.commons.math.analysis;
  
  import junit.framework.TestCase;
  
  /**
   * @author Administrator
   *
   * 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.1                  jakarta-commons/math/src/experimental/org/apache/commons/math/analysis/DerivativeOperatorFactory.java
  
  Index: DerivativeOperatorFactory.java
  ===================================================================
  /*
   * Created on Nov 19, 2003
   *
   * To change the template for this generated file go to
   * Window>Preferences>Java>Code Generation>Code and Comments
   */
  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.1                  jakarta-commons/math/src/experimental/org/apache/commons/math/analysis/FunctionOperator.java
  
  Index: FunctionOperator.java
  ===================================================================
  /*
   * Created on Nov 19, 2003
   *
   * To change the template for this generated file go to
   * Window>Preferences>Java>Code Generation>Code and Comments
   */
  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;
  
  }
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org