Пример #1
0
 static void load_inst_constrain(Instance * inst,Bitset *  original_bitset) {
     if(original_bitset){
       inst->external_lexicon_match_state.push_back((*original_bitset));
     }
     else{
       Bitset bitset;
       bitset.allsetones();
       inst->external_lexicon_match_state.push_back(bitset);
     }
 }//end func load_inst_constrain
Пример #2
0
TEST(tinybitset_unittest, test_bitset_allsetones) {
  Bitset bitset;
  bitset.allsetones();
  bool res = bitset.empty();
  EXPECT_EQ(true, res);
  vector<int> bitones = bitset.getbitones();
  EXPECT_EQ(128,bitones.size());
  for(int i=0;i<bitones.size();i++){
    EXPECT_EQ(i,bitones[i]);
  }
}