Changeset 5233 for icGREP/icgrepdevel/icgrep/UCD/PropertyObjects.cpp
 Timestamp:
 Dec 21, 2016, 3:53:58 PM (3 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

icGREP/icgrepdevel/icgrep/UCD/PropertyObjects.cpp
r5206 r5233 58 58 std::vector<UnicodeSet> & EnumeratedPropertyObject::GetEnumerationBasisSets() { 59 59 // Return the previously computed vector of basis sets, if it exists. 60 if ( enumeration_basis_sets.size() > 0) return enumeration_basis_sets;61 62 // Otherwise compute and return.63 // Basis set i is the set of all codepoints whose numerical enumeration code e64 // has bit i set, i.e., (e >> i) & 1 == 1.65 unsigned basis_count = 1;66 while ((1 << basis_count) < independent_enum_count) basis_count++;67 for (unsigned i = 0; i < basis_count; i++) {68 enumeration_basis_sets.push_back(UnicodeSet());69 for (unsigned e = 0; e < independent_enum_count; e++) {70 if (((e >> i) & 1) == 0) {71 enumeration_basis_sets[i] = enumeration_basis_sets[i] + *property_value_sets[e];60 if (LLVM_UNLIKELY(enumeration_basis_sets.empty())) { 61 // Otherwise compute and return. 62 // Basis set i is the set of all codepoints whose numerical enumeration code e 63 // has bit i set, i.e., (e >> i) & 1 == 1. 64 unsigned basis_count = 1; 65 while ((1 << basis_count) < independent_enum_count) basis_count++; 66 for (unsigned i = 0; i < basis_count; i++) { 67 enumeration_basis_sets.push_back(UnicodeSet()); 68 for (unsigned e = 0; e < independent_enum_count; e++) { 69 if (((e >> i) & 1) == 0) { 70 enumeration_basis_sets[i] = enumeration_basis_sets[i] + *property_value_sets[e]; 71 } 72 72 } 73 73 }
Note: See TracChangeset
for help on using the changeset viewer.