// file: ngrl_get_2.cc
//

// isip include files
//
#include "ngram_list.h"
#include "ngram_list_constants.h"

// method: get_node_cc
//
// arguments:
//  int_4 index: (input) the position of the node in the array
//
// return: an Ngram_node* with the ngram node placed there
//
// this method gets the ngram node in the array at the specified
// position
//
Ngram_node* Ngram_list::get_node_cc(int_4 index_a) {

  // make sure the index is within bounds
  //
  if ((index_a >= num_d) || (index_a < NGRAM_LIST_DEFAULT_NUM)) {
    error_handler_cc((char_1*)"get_nodes_cc",
		     (char_1*)"input index is out of range for array size");
  }
  
  // get the ngram node at this point and exit gracefully
  //
  return nodes_d[index_a];
}
