This is a template function with two overwrites:

template<class VectorValues, class VectorPositions> inline VectorValues At(VectorValues const& v, VectorPositions const& positions);

template<class VectorValues> inline VectorValues At(VectorValues const& v, bvec const& mask);

The template argument VectorValues must be an index-able class, such as std::vector; the template argument VectorPositions must have a forward iterator.

Arguments

v

a const& to a VectorValues object.

positions

a const& to VectorPositions object. The elements in positions must be convertible to indices in v.

mask

a bvec const& of the same length as v with elements equal to true at the positions to be returned.

Value

a VectorValues object.

See also