std::slice(3cxx)
πΈ std::slice β libstdc++ manual page, section 3cxx πΈ
Okay bestie, this is the libstdc++ manual page for std::slice, filed under section 3cxx. Itβs giving one-dimensional-subset-of-an-array energy, and weβre covering every last detail. π
β¨
π NAME π
std::slice β Class defining one-dimensional subset of an array. π¦
π§ SYNOPSIS π§
#include <valarray>
π Public Member Functions π
slice ()β Construct an empty slice. Empty-slice era, zero elements, no cap. β¨slice (size_t __o, size_t __d, size_t __s)β Construct a slice from those three parameters. The signature is exactly that, so donβt come for the underscores. πsize_t size () constβ Return size of slice. It tells you how many elements are in the subset. πsize_t start () constβ Return array offset of first slice element. Thatβs where the slice starts in the array. πΈsize_t stride () constβ Return array stride of slice. Thatβs the step distance between included array elements. π¦
π Friends π
bool operator== (const slice &, const slice &)=defaultβ Equality comparison. Friend behavior, defaulted, iconic. π
π Detailed Description π
Class defining one-dimensional subset of an array. Yes, thatβs the whole concept, and it ate. π
The slice class represents a one-dimensional subset of an array, specified by three parameters: start offset, size, and stride. The start offset is the index of the first element of the array that is part of the subset. The size is the total number of elements in the subset. Stride is the distance between each successive array element to include in the subset. Periodt. β¨
For example, with an array of size 10, and a slice with offset 1, size 3 and stride 2, the subset consists of array elements 1, 3, and 5. Thatβs the example, verbatim numbers and all, bestie. π
π Friends And Related Symbol Documentation π
π bool operator== (const slice &, const slice &) [friend] π
bool operator== (const slice &, const slice &) [friend]β Equality comparison. This is the friend version, documented right here. π«Ά
π§ Author π§
Generated automatically by Doxygen for libstdc++ from the source code. So it wasnβt hand-written by a mysterious author; Doxygen did its little autogen thing. π€π
Sign-off: the source/version is libstdc++, the manual page is std::slice(3cxx), and the original footer doesnβt list a date β so no fake date energy from me, bestie. π«Άπ
π¦ where this page comes from
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms