Difference between revisions of "cpp/numeric/valarray/slice"
From cppreference.com
m (wording ('subset' is a good word here)) |
m (more wording) |
||
Line 5: | Line 5: | ||
}} | }} | ||
− | {{tt|std::slice}} is the class that | + | {{tt|std::slice}} is the selector class that identifies a subset of {{cpp|std::valarray}} similar to [[enwiki:BLAS|BLAS]] slice. An object of type {{tt|std::slice}} holds three values: the starting index, the stride, and the total number of values in the subset. Objects of type {{tt|std::slice}} can be used as indexes with valarray's {{tt|operator[]}}. |
===Member functions=== | ===Member functions=== |
Revision as of 12:26, 24 January 2012
Template:cpp/numeric/valarray/sidebar
Defined in header <valarray>
|
||
class slice; |
||
std::slice
is the selector class that identifies a subset of Template:cpp similar to BLAS slice. An object of type std::slice
holds three values: the starting index, the stride, and the total number of values in the subset. Objects of type std::slice
can be used as indexes with valarray's operator[]
.
Member functions
constructs a slice (public member function) | |
accesses the start of the slice (public member function) | |
accesses the stride of the slice (public member function) | |
accesses the size of the slice (public member function) |