// file: ngrl_node_3.cc
//

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

// method: get_node_index_cc
//
// arguments:
//  Ngram_node* node: (input) the node to be found in the array
//
// return: an Ngram_node** containing this ngram node
//
// this method gets the position for the ngram node in the array
// position
//
Ngram_node** Ngram_list::get_node_index_cc(Ngram_node* node_a) {

  // make sure the index is within bounds
  //
  if (node_a == (Ngram_node*)NULL) {
    error_handler_cc((char_1*)"get_node_index_cc",
		     (char_1*)"input node is NULL");
  }

  // loop over the list and find the node
  //
  Ngram_node** ngnode = search_node_cc(nodes_d, nodes_d + num_d - 1, node_a);
  
  // get the ngram node point and exit gracefully
  //
  return ngnode;
}
