link-grammar-5.8.0/link-grammar/parse/count.c
/**
 * Stores the value in the table.  Assumes it's not already there.
 */
Stores the value in the table.  Assumes it's not already there.
Stores the value in the table . Assumes it ' s not already there .
static Table_connector * table_store(count_context_t *ctxt,
                                     int lw, int rw,
                                     const Connector *le, const Connector *re,
                                     unsigned int null_count)
{
	int l_id = (NULL != le) ? le->tracon_id : lw;
	int r_id = (NULL != re) ? re->tracon_id : rw;
	unsigned int h = pair_hash(ctxt->table_size, lw, rw, l_id, r_id, null_count);
	Table_connector *t = ctxt->table[h];
	Table_connector *n = pool_alloc(ctxt->sent->Table_connector_pool);
	n->l_id = l_id;
	n->r_id = r_id;
	n->null_count = null_count;
	n->next = t;
	ctxt->table[h] = n;
	return n;
}
static Table_connector * table_store ( count_context_t * ctxt , int lw , int rw , const Connector * le , const Connector * re , unsigned int null_count ) { int l_id = ( NULL != le ) ? le -> tracon_id : lw ; int r_id = ( NULL != re ) ? re -> tracon_id : rw ; unsigned int h = pair_hash ( ctxt -> table_size , lw , rw , l_id , r_id , null_count ) ; Table_connector * t = ctxt -> table [ h ] ; Table_connector * n = pool_alloc ( ctxt -> sent -> Table_connector_pool ) ; n -> l_id = l_id ; n -> r_id = r_id ; n -> null_count = null_count ; n -> next = t ; ctxt -> table [ h ] = n ; return n ; }
Stores the value in the table.
Stores the value in the table .