Template Function Pennylane::Util::isElementInVector¶
Defined in File Util.hpp
Function Documentation¶
-
template<typename T>
inline bool Pennylane::Util::isElementInVector(const std::vector<T> &vec, const T &element)¶ Check if an element is in a vector.
- Template Parameters:
T – Data type.
- Parameters:
vec – Vector to check.
element – Element to check for.
- Returns:
bool True if the element is in the vector, false otherwise.