namespace std { class slice { public: slice(); slice(size_t, size_t, size_t); size_t start() const; size_t size() const; size_t stride() const; }; }
The slice class represents a BLAS-like slice from an array. Such a slice is specified by a starting index, a length, and a stride.288
26.6.4.2 slice constructors [cons.slice] slice(); slice(size_t start, size_t length, size_t stride); slice(const slice&);
The default constructor is equivalent to slice(0, 0, 0). A default constructor is provided only to permit the declaration of arrays of slices. The constructor with arguments for a slice takes a start, length, and stride parameter.
[ Example: slice(3, 8, 2) constructs a slice which selects elements 3, 5, 7, ... 17 from an array. — end example ]
26.6.4.3 slice access functions [slice.access] size_t start() const; size_t size() const; size_t stride() const;
Returns: The start, length, or stride specified by a slice object.
Complexity: Constant time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4