| 43 | } |
| 44 | |
| 45 | void DataPositions::increase(const DataPositions& delta) |
| 46 | { |
| 47 | inputs.resize(max(inputs.size(), delta.inputs.size()), {}); |
| 48 | for (unsigned int field_type = 0; field_type < N_DATA_FIELD_TYPE; field_type++) |
| 49 | { |
| 50 | for (unsigned int dtype = 0; dtype < N_DTYPE; dtype++) |
| 51 | files[field_type][dtype] += delta.files[field_type][dtype]; |
| 52 | for (unsigned int j = 0; j < delta.inputs.size(); j++) |
| 53 | inputs[j][field_type] += delta.inputs[j][field_type]; |
| 54 | |
| 55 | map<DataTag, long long>::const_iterator it; |
| 56 | const map<DataTag, long long>& delta_ext = delta.extended[field_type]; |
| 57 | for (it = delta_ext.begin(); it != delta_ext.end(); it++) |
| 58 | extended[field_type][it->first] += it->second; |
| 59 | } |
| 60 | for (auto it = delta.edabits.begin(); it != delta.edabits.end(); it++) |
| 61 | edabits[it->first] += it->second; |
| 62 | } |
| 63 | |
| 64 | DataPositions& DataPositions::operator-=(const DataPositions& delta) |
| 65 | { |