| 40 | // -------------------------------------------------------------------------- |
| 41 | |
| 42 | void BowVector::addIfNotExist(WordId id, WordValue v) { |
| 43 | BowVector::iterator vit = this->lower_bound(id); |
| 44 | |
| 45 | if (vit == this->end() || (this->key_comp()(id, vit->first))) { |
| 46 | this->insert(vit, BowVector::value_type(id, v)); |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | // -------------------------------------------------------------------------- |
| 51 |