// Noel Belcourt
// April 26, 1999

#ifndef normal_hpp
#define normal_hpp

#include <string>

#include "distribution.hpp"

class normal : public distribution
{
private:

  double mu, sigma;
  double c0, c1, c2, d1, d2, d3, epsilon, pi;

  // Use the cumulative distribution function inverse to return
  // an observation for the input scaled probability.
  double solve(double inScaledProbability);

protected:

  // Input an observation, return the probability via the density function
  virtual double density(double inObservation);

  // Input a scaled probability, return the corresponding observation
  virtual double inverse(double inScaledProbability);

public:

  virtual void write_distribution(std::ofstream& ofp) {
    ofp << desc << " normal mu = " << mu << " stdev = " <<  sigma << std::endl;
  }

  normal(std::string s, double mean, double variance);
};

#endif

