#include <iostream>
#include <cstdlib>

#include "libphprng.h"

#include "UtilRandomSourceWrapper.h"
#include "util.h"

using namespace std;


int main (int argc, char * argv[]) {

  UtilRandomSourceWrapper * ursw = new UtilRandomSourceWrapper();

  if (argc < 2) {
    cerr << "Input file in .aph format must be given." << endl;
    exit(EXIT_FAILURE);
  }

  PhGen * prng = new AphGen(argv[1]);
  prng->setUniformRandomSource(ursw);
  
  for (int i = 0; i < 1000000; i++) {
    //    prng->getVariate();
    cout << prng->getVariate() << endl;
    //    cout << aphgen.drawState() << endl;
  }
  

  return 0;
}
