src/index/utils.c
// add 'composition' to the list of compositions whose first component is 'role'
// 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 'composition' to the list of compositions whose first component is 'role'
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 ' composition ' to the list of compositions whose first component is ' role ' 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_role_to_first_component_of_list(ObjectPropertyExpression* role, ObjectPropertyExpression* composition) {
	ObjectPropertyExpression** tmp;
	if (SET_ADD(composition, &(role->first_component_of))) {
		tmp = realloc(role->first_component_of_list, (role->first_component_of_count + 1) * sizeof(ObjectPropertyExpression*));
		assert(tmp != NULL);
		role->first_component_of_list = tmp;
		role->first_component_of_list[role->first_component_of_count] = composition;
		role->first_component_of_count++;
	}
}
void add_role_to_first_component_of_list ( ObjectPropertyExpression * role , ObjectPropertyExpression * composition ) { ObjectPropertyExpression * * tmp ; if ( SET_ADD ( composition , & ( role -> first_component_of ) ) ) { tmp = realloc ( role -> first_component_of_list , ( role -> first_component_of_count + 1 ) * sizeof ( ObjectPropertyExpression * ) ) ; assert ( tmp != NULL ) ; role -> first_component_of_list = tmp ; role -> first_component_of_list [ role -> first_component_of_count ] = composition ; role -> first_component_of_count ++ ; } }
add 'composition' to the list of compositions whose first component is 'role'
note that for performance reasons in saturation, this information is kept twice:
once in a hash table, once in a usual array.
add ' composition ' to the list of compositions whose first component is ' role ' note that for performance reasons in saturation this information is kept twice : once in a hash table once in a usual array .