This commit is contained in:
2025-10-25 03:02:53 +03:00
commit 043225d523
3416 changed files with 681196 additions and 0 deletions

29
cppdraft/slice/access.md Normal file
View File

@@ -0,0 +1,29 @@
[slice.access]
# 29 Numerics library [[numerics]](./#numerics)
## 29.6 Numeric arrays [[numarray]](numarray#slice.access)
### 29.6.4 Class slice [[class.slice]](class.slice#slice.access)
#### 29.6.4.3 Access functions [slice.access]
[🔗](#lib:start,slice)
`size_t start() const;
size_t size() const;
size_t stride() const;
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L8444)
*Returns*: The start, length, or stride specified
by a slice object[.](#1.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L8449)
*Complexity*: Constant time[.](#2.sentence-1)

View File

@@ -0,0 +1,23 @@
[slice.arr.assign]
# 29 Numerics library [[numerics]](./#numerics)
## 29.6 Numeric arrays [[numarray]](numarray#slice.arr.assign)
### 29.6.5 Class template slice_array [[template.slice.array]](template.slice.array#slice.arr.assign)
#### 29.6.5.2 Assignment [slice.arr.assign]
[🔗](#lib:operator=,slice_array)
`void operator=(const valarray<T>&) const;
const slice_array& operator=(const slice_array&) const;
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L8537)
These assignment operators have reference semantics,
assigning the values of the argument array elements to selected
elements of thevalarray<T> object to which theslice_array object refers[.](#1.sentence-1)

View File

@@ -0,0 +1,31 @@
[slice.arr.comp.assign]
# 29 Numerics library [[numerics]](./#numerics)
## 29.6 Numeric arrays [[numarray]](numarray#slice.arr.comp.assign)
### 29.6.5 Class template slice_array [[template.slice.array]](template.slice.array#slice.arr.comp.assign)
#### 29.6.5.3 Compound assignment [slice.arr.comp.assign]
[🔗](#lib:operator*=,slice_array)
`void operator*= (const valarray<T>&) const;
void operator/= (const valarray<T>&) const;
void operator%= (const valarray<T>&) const;
void operator+= (const valarray<T>&) const;
void operator-= (const valarray<T>&) const;
void operator^= (const valarray<T>&) const;
void operator&= (const valarray<T>&) const;
void operator|= (const valarray<T>&) const;
void operator<<=(const valarray<T>&) const;
void operator>>=(const valarray<T>&) const;
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L8573)
These compound assignments have reference semantics, applying the
indicated operation to the elements of the argument array
and selected elements of thevalarray<T> object to which theslice_array object refers[.](#1.sentence-1)

View File

@@ -0,0 +1,21 @@
[slice.arr.fill]
# 29 Numerics library [[numerics]](./#numerics)
## 29.6 Numeric arrays [[numarray]](numarray#slice.arr.fill)
### 29.6.5 Class template slice_array [[template.slice.array]](template.slice.array#slice.arr.fill)
#### 29.6.5.4 Fill function [slice.arr.fill]
[🔗](#lib:operator=,slice_array)
`void operator=(const T&) const;
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L8591)
This function has reference semantics, assigning the value of its argument
to the elements of thevalarray<T> object to which theslice_array object refers[.](#1.sentence-1)

20
cppdraft/slice/ops.md Normal file
View File

@@ -0,0 +1,20 @@
[slice.ops]
# 29 Numerics library [[numerics]](./#numerics)
## 29.6 Numeric arrays [[numarray]](numarray#slice.ops)
### 29.6.4 Class slice [[class.slice]](class.slice#slice.ops)
#### 29.6.4.4 Operators [slice.ops]
[🔗](#lib:stride,slice)
`friend bool operator==(const slice& x, const slice& y);
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L8462)
*Effects*: Equivalent to:return x.start() == y.start() && x.size() == y.size() && x.stride() == y.stride();