SPLITT-colon-colon-Match.Rd
This is a template function optimized for searching integer types (internal use only).
template<class VectorValues, class PosType>
inline std::vector<PosType> Match(VectorValues const& x,
VectorValues const& table, PosType const& NA);
For each element of x
return the index of its first occurence in
table
or NA
if the element is not found in table
or is
equal to NA
. It is assumed that x
does not have duplicated
elements or NA
elements.
The template argument VectorValues
must
be an index-able class, such as
std::vector
<T>
,
where T
must be an integer type.
The template argument PosType
must be an integer type that can be used
as index type in VectorValues
.
x |
|
---|---|
table |
|
NA |
|
an std::vector
<PosType>
.
Other global functions: SPLITT::At
,
SPLITT::IsNA
,
SPLITT::NotIsNA
, SPLITT::Seq
,
SPLITT::SortIndices