// file: $isip/class/pr/StatisticalModelAdaptation/smadp_00.cc
// version: $Id: smadp_00.cc 9453 2004-04-13 19:28:26Z gao $
//

// isip include files
//
#include "StatisticalModelAdaptation.h"

//------------------------------------------------------------------------
//
// required public methods
//
//-----------------------------------------------------------------------

// method: assign
//
// arguments:
//  const StatisticalModelAdaptation& arg: (input) object to be assigned
//
// return: a boolean value indicating status
//
// this method assigns the input object to the current object
//
boolean StatisticalModelAdaptation::assign(const StatisticalModelAdaptation& arg_a) {

  // assign data from the input StatisticalModelAdaptation object
  //
  algorithm_d = arg_a.algorithm_d;
  implementation_d = arg_a.implementation_d;
  
  // exit gracefully
  //
  return true;
}

// method: eq
//
// arguments:
//  const StatisticalModelAdaptation& arg: (input) object to be compared
//
// return: a boolean value indicating status
//
// this method checks whether the current object is identical to the
// input object
//
boolean StatisticalModelAdaptation::eq(const StatisticalModelAdaptation& arg_a) const {
  
  // compare the data members
  //
  if ((algorithm_d != arg_a.algorithm_d) ||
      (implementation_d != arg_a.implementation_d)) {
    return false;
  }
  
  // exit gracefully
  //
  return true;
}

// method: clear
//
// arguments:
//  Integral::CMODE ctype: (input) clear mode
//
// return: a boolean value indicating status
//
// this method resets the data members to the default values
//
boolean StatisticalModelAdaptation::clear(Integral::CMODE ctype_a) {
  
  // reset the data members unless the mode is RETAIN
  //
  if (ctype_a != Integral::RETAIN) {
    
    // clear the design parameters
    //
    algorithm_d = DEF_ALGORITHM;
    implementation_d = DEF_IMPLEMENTATION;

  }
  
  // exit gracefully
  //
  return true;
}

//-----------------------------------------------------------------------------
//
// we define non-integral constants in the default constructor
//      
//-----------------------------------------------------------------------------

// constants: class name
//
const String StatisticalModelAdaptation::CLASS_NAME(L"StatisticalModelAdaptation");

// constants: i/o related constants
//
const String StatisticalModelAdaptation::DEF_PARAM(L"");
const String StatisticalModelAdaptation::PARAM_ALGORITHM(L"algorithm");
const String StatisticalModelAdaptation::PARAM_IMPLEMENTATION(L"implementation");
const String StatisticalModelAdaptation::PARAM_DBGL(L"debug_level");

// constants: name map(s) for the enumerated values
//
const NameMap StatisticalModelAdaptation::ALGO_MAP(L"MLLR, MAP");
const NameMap StatisticalModelAdaptation::IMPL_MAP(L"MEAN, VARIANCE");

// static instantiations: memory manager
//
MemoryManager StatisticalModelAdaptation::mgr_d(sizeof(StatisticalModelAdaptation), StatisticalModelAdaptation::name());
