Namespaces
Variants
Actions

std::valarray<T>::cshift

From cppreference.com
< cpp‎ | numeric‎ | valarray
 
 
 
 
valarray<T> cshift( int count ) const;

Returns a new valarray of the same size with elements whose positions are shifted circularly by count elements.

A non-negative value of count shifts the elements circularly left count places and a negative value of count shifts the elements circularly right -count places.

Contents

[edit] Parameters

count - number of positions to shift the elements by

[edit] Return value

The resulting valarray with circularly shifted elements.

[edit] Notes

The function can be implemented with the return type different from std::valarray. In this case, the replacement type has the following properties: