package JSci.maths.analysis;

import JSci.maths.Mapping;

/**
* The exponential function.
* @version 1.0
* @author Mark Hale
*/
public class Exponential extends RealFunction {
        private final double A, w, k;
        /**
        * Constructs an exponential function of the form <code>A exp(wx+k)</code>.
        */
        public Exponential(double A, double w, double k) {
                this.A = A;
                this.w = w;
                this.k = k;
        }
        public double map(double x) {
                return A*Math.exp(w*x+k);
        }
        public RealFunction differentiate() {
                return new Exponential(A*w, w, k);
        }
}

