14#ifndef OR_TOOLS_MATH_OPT_ELEMENTAL_ELEMENT_DIFF_H_
15#define OR_TOOLS_MATH_OPT_ELEMENTAL_ELEMENT_DIFF_H_
19#include "absl/container/flat_hash_set.h"
42 const absl::flat_hash_set<int64_t>&
deleted()
const {
return deleted_; }
46 if (
id < checkpoint_) {
58 int64_t checkpoint_ = 0;
59 absl::flat_hash_set<int64_t> deleted_;
void Advance(int64_t checkpoint)
Update the checkpoint and clears all tracked deletions.
const absl::flat_hash_set< int64_t > & deleted() const
The elements that have been deleted before the checkpoint.
int64_t checkpoint() const
void Delete(int64_t id)
Tracks the element id as deleted if it is less than the checkpoint.
An object oriented wrapper for quadratic constraints in ModelStorage.