// file: ngrl_srch_1.cc
//

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

// method: search_node_cc
//
// arguments:
//  Ngram_node** start: (input) the start point for search
//  Ngram_node** end: (input) the end point for search
//  Ngram_node* node: (input) the desired ngram node
//
// return: an Ngram_node** with the result of the search
//
// this method searches for the ngram node position containing the
// given node in the specified range of the list
//
Ngram_node** Ngram_list::search_node_cc(Ngram_node** start_a,
					Ngram_node** end_a,
					Ngram_node* node_a) {

  // output ngram node
  //
  Ngram_node** ngnode = (Ngram_node**)NULL;

  // get the word in this node
  //
  Word* word = node_a->get_word_cc();
  
  // run a binary search
  //
  ngnode = search_node_cc(start_a, end_a, word);
  
  // return ngram node and exit gracefully
  //
  return ngnode;
}
