#include <eckit/testing/Test.h>
template<typename T>
ArrayView class
A helper class which wraps c-style arrays and implements comparison operators to compare with other views and STL vectors. Does not copy or modify the original array. Does not work on non-contiguous data sets. Note that STL containers can (and should) use the built-in comparison operators (==, !=, >=, etc.) instead.
Constructors, destructors, conversion operators
- ArrayView(const T* data, size_t size)
- ArrayView(const T* begin, const T* end)
-
ArrayView(const std::
vector<T>& vec) explicit
Public functions
- auto operator[](int i) const -> const T&
- auto at(int i) const -> const T&
- auto size() const -> size_t
- auto data() const -> const T*
-
template<typename U>auto operator==(const ArrayView<U>& other) const -> bool
-
template<typename U>auto operator==(const std::
vector<U>& other) const -> bool -
template<typename U>auto operator!=(const ArrayView<U>& other) const -> bool
-
template<typename U>auto operator!=(const std::
vector<U>& other) const -> bool -
template<typename U>auto isApproximatelyEqual(const ArrayView<U>& other, const U tolerance) const -> bool
-
template<typename U>auto isApproximatelyEqual(const std::
vector<U>& other, const U tolerance) const -> bool