/* itgchart.cpp
 *
 * $Id: itgchart.cpp,v 1.6 2008/05/19 01:22:35 zhanghao Exp $
 */

#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <iostream>
#include <sys/time.h>
#include <cassert>

#include <math.h>
#include "itgchart.h"
#include "array.h"
#include "globals.h"

using namespace std;


/** training ****************************************************/

void ITGChart::clean(int T, int V){
  if (Globals::Get<int>("verbosity") >= 1)
    cout << "ITGChart::clean(): cleaning " << sizeof(ITGCell) * MAXN * totalDimen
         << " bytes (sizeof(ITGCell)=" << sizeof(ITGCell) << ", MAXN=" << MAXN 
         << ", totalDimen=" << totalDimen << ")\n";

  // MP: whoa, DEFAULTMAX[TV]=100 gives a 2G table for viterbi
  memset(cells, 0, sizeof(ITGCell)*MAXN*totalDimen);
  memset(clones, 0, sizeof(double)*cloneDimen);
}
