Cpp, Numerical Methods, Programming.
std::vector<double> vec = {1,2,3,4,5,6,7,8}; auto s = std::span<double, 3>(vec.begin(),3); // index s now as auto isTrue = s[1] == 2; But what is more interesting is std::mdspan which allows you to view your data as a multi-dimensional array auto ms = std::mdspan<double, 2, 2, 2>(vec.begin(),