| 25 | // --------------------------------------------------------------------------- |
| 26 | |
| 27 | void FeatureVector::addFeature(NodeId id, unsigned int i_feature) { |
| 28 | FeatureVector::iterator vit = this->lower_bound(id); |
| 29 | |
| 30 | if (vit != this->end() && vit->first == id) { |
| 31 | vit->second.push_back(i_feature); |
| 32 | } else { |
| 33 | vit = this->insert(vit, FeatureVector::value_type(id, std::vector<unsigned int>())); |
| 34 | vit->second.push_back(i_feature); |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | // --------------------------------------------------------------------------- |
| 39 | |