// file: $isip_ifc/class/stat/RelevanceVectorModel/rvm_05.cc
// version: $Id: rvm_05.cc 10423 2006-02-09 00:52:30Z raghavan $
//

// system include files
//
#include <typeinfo>

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

// method: assign
//
// arguments:
//  const RelevanceVectorModel& arg: (input) data to copy
//
// return: a boolean value indicating status
//
// copy the input model to current model
//
boolean RelevanceVectorModel::assign(const RelevanceVectorModel& arg_a) {

  // assign the algorithm and implementation
  //
  algorithm_d = arg_a.algorithm_d;
  implementation_d = arg_a.implementation_d;

  // assign the machine parameters
  //
  inv_hessian_d = arg_a.inv_hessian_d;
  weights_d = arg_a.weights_d;
  targets_d = arg_a.targets_d;
  vectors_d = arg_a.vectors_d;
  bias_d = arg_a.bias_d;
  kernels_d = arg_a.kernels_d;

  // exit gracefully
  //
  return true;
}

// method: assign
//
// arguments:
//  const StatisticalModelBase& arg: (input) object to assign
//
// return: a boolean value
//
// this method assigns input argument to current argument
//
boolean RelevanceVectorModel::assign(const StatisticalModelBase& arg_a) {

  if (typeid(arg_a) == typeid(RelevanceVectorModel)) {
    return assign((RelevanceVectorModel&)arg_a);
  }
  else {
    return Error::handle(name(), L"assign", Error::ARG, __FILE__, __LINE__);
  }
}
