std::gslice(3cxx)
πΈ NAME πΈ
std::gslice β a class that defines a multi-dimensional subset of an array. Welcome to the std::gslice(3cxx) page, bestie; this is libstdc++βs manual entry and weβre gonna get you comfy with it. π
β¨ SYNOPSIS β¨
okay so first, grab the header:
#include <valarray>
π Public Member Functions π
gslice ()β Construct an empty slice. β¨gslice (const gslice &)β Copy constructor. π«Άgslice (size_t __o, const valarray< size_t > &__l, const valarray< size_t > &__s)β Construct a slice. π~gslice ()β Destructor. πgslice & operator= (const gslice &)β Assignment operator. πvalarray< size_t > size () constβ Return array of sizes of slice dimensions. πsize_t start () constβ Return array offset of first slice element. βvalarray< size_t > stride () constβ Return array of array strides for each dimension. π¦
π«Ά Friends π«Ά
template<typename _Tp > class valarrayβ thatβs the friend in the building, no cap. π
π Detailed Description π
okay so std::gslice is a class that defines a multi-dimensional subset of an array. The slice class represents a multi-dimensional subset of an array, and itβs specified by three parameter sets: start offset, size array, and stride array. π«Ά
The start offset is the index of the first element of the array thatβs part of the subset. The size and stride array describe each dimension of the slice. Size is the number of elements in that dimension, and stride is the distance in the array between successive elements in that dimension. Each dimensionβs size and stride is taken to begin at an array element described by the previous dimension. The size array and stride array must be the same size β thatβs a hard requirement, bestie. π
For example, if you have:
offset==3, stride[0]==11, size[1]==3, stride[1]==3
then:
slice[0,0]==array[3], slice[0,1]==array[6], slice[0,2]==array[9], slice[1,0]==array[14], slice[1,1]==array[17], slice[1,2]==array[20].
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. π€β¨
thatβs the whole vibe check, bestie π the footer credits libstdc++ as the source and repeats the std::gslice(3cxx) manual name; thereβs no date listed in this footer, so no birthday info, just source/manual-name energy. π
π¦ 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