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

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

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

// method: eq
//
// arguments:
//  const RelevanceVectorModel& arg: (input) dat ato copy
//
// return: a boolean value - true if objects are equivalent, false otherwise
//
// check whether the svm models are equal.
//
boolean RelevanceVectorModel::eq(const RelevanceVectorModel& arg_a) const {

  // check all the data members
  //
  if ((algorithm_d != arg_a.algorithm_d) ||
      (implementation_d != arg_a.implementation_d) ||
      (bias_d != arg_a.bias_d)) {
    return false;
  }
  
  else {
    return true;
  }
}

// method: eq
//
// arguments:
//  const StatisticalModelBase& arg: (input) object to test
//
// return: a boolean value indicating equality
//
// this method is part of the StatisticalModelBase interface contract
// which compares two virtual model types
//
boolean RelevanceVectorModel::eq(const StatisticalModelBase& arg_a) const {

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