MCPcopy Create free account
hub / github.com/apache/arrow / FilterVector

Function FilterVector

cpp/src/arrow/util/vector.h:80–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78
79template <typename T, typename Predicate>
80std::vector<T> FilterVector(std::vector<T> values, Predicate&& predicate) {
81 auto new_end = std::remove_if(values.begin(), values.end(),
82 [&](const T& value) { return !predicate(value); });
83 values.erase(new_end, values.end());
84 return values;
85}
86
87template <typename Fn, typename From,
88 typename To = decltype(std::declval<Fn>()(std::declval<From>()))>

Callers 2

TESTFunction · 0.85
ExtractKnownFieldValuesFunction · 0.85

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by 1

TESTFunction · 0.68