// file: latn_add_0.cc
//

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

// method: add_prev_node_cc
//
// arguments:
//  Lattice_node* lat_node_a: (input) node to be added to prev node list
//
// return: logical_1 indicating status
//
// this method adds a node to the list of the prev nodes
//
logical_1 Lattice_node::add_prev_node_cc(Lattice_node* lat_node_a) {

  // allocate if necessary, and initialize the link list
  //
  if (prev_nodes_d == (Link_list*)NULL) {
    prev_nodes_d = new Link_list();
  }
  prev_nodes_d->insert_cc((void_p)lat_node_a);

  // increment the number of incoming arcs
  //
  num_arcs_in_d++;

  // exit gracefully
  //
  return ISIP_TRUE;
}
