// file: latn_add_6.cc
//

// isip include files
//
#include "lattice_node.h"
#include "lattice_node_constants.h"

// method: replace_lm_score_cc
//
// arguments:
//  float_4 lm_score: (input) new lm score which replaces old lm score
//  int_4 index: position of the lm score in the array
//
// return: logical_1 indicating status
//
// this method replaces the existing lm score with a new lm score
//
logical_1 Lattice_node:: replace_lm_score_cc(float_4 lm_score_a,
					     int_4 index_a) {
  
  // replace the old value by the new value
  //
  for (int_4 i = 0; i < num_arcs_out_d; i++) {
    
    if (i == index_a) {
      lm_scores_d[i] = lm_score_a;
    }
  }
  
  // exit gracefully
  //
  return ISIP_TRUE;
}
