//  -*- C++  -*-
//
//======================================================================
//  File:          randomize.c
//  Author:        Thomas G. Dietterich
//  Description:   This program reads in a probability table and
//                 prompts the user for a variable upon which to randomize.
//                 It then writes the randomized table
//                 onto the output.
//                 
//  Copyright (c) 1995 by Thomas G. Dietterich.  All Rights Reserved.
//       may be reproduced by any non-commercial purpose.
//======================================================================
#include "ptable.h"
#include "clrandom.h"
#include <iostream.h>
#include <fstream.h>

int main(int argc, char * argv[])
{
  probabilityTable table1;
  clrandom rng(23849873);

  {
    ifstream str(argv[1]);
    str >> table1;
  }

  cout << "Enter variable to normalize (int): ";
  int var;
  cin >> var;
  
  table1.randomize(rng, var);

  cout << "Results:" << endl;
  cout << table1;
  return 0;
}
