find_all
C++ Function Reference
1 Signature
std::vector< _InputIterator > BigDataStatMeth::find_all(_InputIterator begin, _InputIterator end, const T &val)2 Description
Finds all occurrences of a value in a range.
3 Parameters
begin(_InputIterator): Iterator to the start of the rangeend(_InputIterator): Iterator to the end of the rangeval(const T &): Value to search for
4 Returns
std::vector<_InputIterator> Vector of iterators pointing to matches
5 Details
Template function that searches for all occurrences of a value in a range defined by iterators and returns their positions.
6 Caller Graph
7 Source Code
NoteImplementation
File: inst/include/hdf5Utilities/hdf5SortDataset.hpp • Lines 47-58
find_all(_InputIterator begin, _InputIterator end, const T& val)
{
std::vector<_InputIterator> matches;
while(begin != end)
{
if((*begin) == val)
matches.push_back(begin);
++begin;
}
return matches;
}8 Usage Example
#include "BigDataStatMeth.hpp"
// Example usage
auto result = find_all(...);