#include <string>

#include "phgen.h"

//#define DEBUG

using namespace std;

class HerdGen : public PhGen {

 private:
  int n;
  double* initialProbabilities;
  double* rates;
  int* lengths;
  RandomSourceWrapper * rsw;
  void consumeComments(ifstream& file, string& line);
  double drawErlang(int length, double rate);
  int drawBranch();

 public:
  HerdGen(char* filename);
  ~HerdGen();
  double getVariate();
  int drawState();
  void setUniformRandomSource(RandomSourceWrapper * randomSource);

};
