Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
Functions | |
template<typename T > | |
void | Truncate (RepeatedPtrField< T > *array, int new_size) |
RepeatedPtrField version. | |
template<typename T > | |
void | Truncate (RepeatedField< T > *array, int new_size) |
RepeatedField version. | |
template<typename RepeatedType , typename IndexContainer = std::vector<int>> | |
int | RemoveAt (RepeatedType *array, const IndexContainer &indices) |
template<typename T > | |
T | ParseTextOrDie (const std::string &input) |
T google::protobuf::util::ParseTextOrDie | ( | const std::string & | input | ) |
Definition at line 77 of file protobuf_util.h.
int google::protobuf::util::RemoveAt | ( | RepeatedType * | array, |
const IndexContainer & | indices ) |
Removes the elements at the indices specified by 'indices' from 'array' in time linear in the size of 'array' (on average, even when 'indices' is a singleton) while preserving the relative order of the remaining elements. The indices must be a container of ints in strictly increasing order, such as vector<int>, set<int> or initializer_list<int>, and in the range [0, N - 1] where N is the number of elements in 'array', and RepeatedType must be RepeatedField or RepeatedPtrField. Returns number of elements erased.
Assumes that 'indices' consists of [0 ... N-1].
Definition at line 50 of file protobuf_util.h.
|
inline |
RepeatedField version.
RepeatedField::Truncate performs size validity checks.
Definition at line 36 of file protobuf_util.h.
|
inline |
RepeatedPtrField version.
Definition at line 28 of file protobuf_util.h.