// file: tr_lxn_set_3.cc
//

// isip include files
//
#include "train_lex_node.h"
#include "train_lex_node_constants.h"

// method: set_score_list_cc
//
// arguments:
//  int_4 num : (input) number of words
//  float_8* scores : (input) the score list
//
// return: a logical_1 to indicate success
//
// this method sets the LM score list for all words at this node
//
logical_1 Train_Lex_node::set_score_list_cc(int_4 num_a, float_8* scores_a) {

  // set the number of words
  //
  num_words_d = num_a;

  // copy the scores
  //
  if (score_list_d != (float_8*)NULL) {
    delete [] score_list_d;
    score_list_d = (float_8*)NULL;
  }
  score_list_d = new float_8[num_words_d];
  memcpy(score_list_d, scores_a, num_words_d * sizeof(float_8));
  
  // exit gracefully
  //
  return ISIP_TRUE;
}


