Function vector_rotate (o2scl)¶
-
template<class vec_t, class data_t>
void o2scl::vector_rotate(size_t n, vec_t &data, size_t k)¶ “Rotate” a vector so that the kth element is now the beginning
This is a generic template function which will work for any types
data_t
andvec_t
for whichdata_t
has anoperator=
vec_t::operator[]
returns a reference to an object of typedata_t
This function is used, for example, in o2scl::pinside.
Note
This function is not the same as a Givens rotation, which is typically referred to in BLAS routines as
drot()
.