// file: nbest_node.h
//
// this is the header for the nbest node class
//

// make sure definitions are only made once
//
#ifndef __ISIP_NBEST_NODE
#define __ISIP_NBEST_NODE

// isip include files
//
#ifndef __ISIP_INTEGRAL
#include <integral.h>
#endif

// other classes that need to be included
//
#ifndef __ISIP_LATTICE_NODE
#include <lattice_node.h>
#endif

// Nbest_node: a class that is used to store the partial
// path information during the stack search performed for lattice to nbest
// list generation
//
class Nbest_node {
  
  //---------------------------------------------------------------------------
  //
  // protected data
  //
  //---------------------------------------------------------------------------
protected:
  
  // node identity
  //
  Lattice_node* lnode_d;                // lattice node corresp. to this path
  Nbest_node* prev_node_d;              // previous node in the path

  // partial path score
  //
  float_8 path_score_d;
  
  //---------------------------------------------------------------------------
  //
  // public methods
  //
  //---------------------------------------------------------------------------
public:
  
  // required methods
  //
  char_1* name_cc();
  volatile void error_handler_cc(char_1* mname, char_1* msg);
  logical_1 debug_cc(FILE* fp, char_1* message);
  int_4 size_cc();
    
  // destructors/constructors
  //
  ~Nbest_node();                             // destructor
  Nbest_node();                              // default constructor
  Nbest_node(const Nbest_node& nbest_node);  // overloaded
  Nbest_node(Lattice_node* lnode, Nbest_node* prev_node,
	     float_8 score);                 // overloaded
    
  // methods to set/get member data
  //
  logical_1 set_lnode_cc(Lattice_node* lnode);     // lattice node
  Lattice_node* get_lnode_cc();
  logical_1 set_prev_cc(Nbest_node* prev_node);    // previous nbest node
  Nbest_node* get_prev_cc();
  logical_1 set_score_cc(float_8 score);    // path score
  float_8 get_score_cc();

  // method to clear the contents of the nbest node
  //
  logical_1 clear_cc();

  //---------------------------------------------------------------------------
  //
  // private methods
  //
  //---------------------------------------------------------------------------
private:

};

// end of file
// 
#endif
