src/index/utils.c
// add 'conjunction' to the list of conjunctions whose first conjunct is 'concept'
// note that for performance reasons in saturation, this information is kept twice:
// once in a hash table, once in a usual array. the hash table is for searching
// during saturation, the usual array is for iteration on the elements. the memory
// overhead is worth the performance gain.
add 'conjunction' to the list of conjunctions whose first conjunct is 'concept'
note that for performance reasons in saturation, this information is kept twice:
once in a hash table, once in a usual array. the hash table is for searching
during saturation, the usual array is for iteration on the elements. the memory
overhead is worth the performance gain.
add ' conjunction ' to the list of conjunctions whose first conjunct is ' concept ' note that for performance reasons in saturation this information is kept twice : once in a hash table once in a usual array . the hash table is for searching during saturation the usual array is for iteration on the elements . the memory overhead is worth the performance gain .
void add_to_first_conjunct_of_list(ClassExpression* concept, ClassExpression* conjunction) {
	if (concept->first_conjunct_of == NULL)
		concept->first_conjunct_of = SET_CREATE(DEFAULT_FIRST_CONJUNCT_OF_HASH_SIZE);
	if (SET_ADD(conjunction, concept->first_conjunct_of)) {
		list_add(conjunction, &(concept->first_conjunct_of_list));
	}
}
void add_to_first_conjunct_of_list ( ClassExpression * concept , ClassExpression * conjunction ) { if ( concept -> first_conjunct_of == NULL ) concept -> first_conjunct_of = SET_CREATE ( DEFAULT_FIRST_CONJUNCT_OF_HASH_SIZE ) ; if ( SET_ADD ( conjunction , concept -> first_conjunct_of ) ) { list_add ( conjunction , & ( concept -> first_conjunct_of_list ) ) ; } }
add 'conjunction' to the list of conjunctions whose first conjunct is 'concept'
note that for performance reasons in saturation, this information is kept twice:
once in a hash table, once in a usual array.
add ' conjunction ' to the list of conjunctions whose first conjunct is ' concept ' note that for performance reasons in saturation this information is kept twice : once in a hash table once in a usual array .
// create the hash if we are adding it for the first time