tmp/tmpc4n8h5hm/{from.md → to.md}
RENAMED
|
@@ -100,19 +100,19 @@ elements numbered sequentially from zero. It is a representation of the
|
|
| 100 |
mathematical concept of an ordered set of values. For convenience, an
|
| 101 |
object of type `valarray<T>` is referred to as an “array” throughout the
|
| 102 |
remainder of [[numarray]]. The illusion of higher dimensionality may be
|
| 103 |
produced by the familiar idiom of computed indices, together with the
|
| 104 |
powerful subsetting capabilities provided by the generalized subscript
|
| 105 |
-
operators.[^
|
| 106 |
|
| 107 |
#### Constructors <a id="valarray.cons">[[valarray.cons]]</a>
|
| 108 |
|
| 109 |
``` cpp
|
| 110 |
valarray();
|
| 111 |
```
|
| 112 |
|
| 113 |
-
*Effects:* Constructs a `valarray` that has zero length.[^
|
| 114 |
|
| 115 |
``` cpp
|
| 116 |
explicit valarray(size_t n);
|
| 117 |
```
|
| 118 |
|
|
@@ -132,19 +132,19 @@ valarray(const T* p, size_t n);
|
|
| 132 |
|
| 133 |
*Preconditions:* \[`p`, `p + n`) is a valid range.
|
| 134 |
|
| 135 |
*Effects:* Constructs a `valarray` that has length `n`. The values of
|
| 136 |
the elements of the array are initialized with the first `n` values
|
| 137 |
-
pointed to by the first argument.[^
|
| 138 |
|
| 139 |
``` cpp
|
| 140 |
valarray(const valarray& v);
|
| 141 |
```
|
| 142 |
|
| 143 |
*Effects:* Constructs a `valarray` that has the same length as `v`. The
|
| 144 |
elements are initialized with the values of the corresponding elements
|
| 145 |
-
of `v`.[^
|
| 146 |
|
| 147 |
``` cpp
|
| 148 |
valarray(valarray&& v) noexcept;
|
| 149 |
```
|
| 150 |
|
|
@@ -255,12 +255,12 @@ evaluates to `true` for all `size_t i` and `size_t j` such that
|
|
| 255 |
|
| 256 |
The expression `addressof(a[i]) != addressof(b[j])` evaluates to `true`
|
| 257 |
for any two arrays `a` and `b` and for any `size_t i` and `size_t j`
|
| 258 |
such that `i < a.size()` and `j < b.size()`.
|
| 259 |
|
| 260 |
-
[*Note 2*: This property indicates an absence of aliasing and
|
| 261 |
-
used to advantage by optimizing compilers. Compilers
|
| 262 |
of inlining, constant propagation, loop fusion, tracking of pointers
|
| 263 |
obtained from `operator new`, and other techniques to generate efficient
|
| 264 |
`valarray`s. — *end note*]
|
| 265 |
|
| 266 |
The reference returned by the subscript operator for an array shall be
|
|
@@ -568,12 +568,12 @@ is `(*this)[`*`I`*` + n]` if *`I`*` + n` is non-negative and less than
|
|
| 568 |
value of `n` shifts the elements left `n` places, with zero
|
| 569 |
fill. — *end note*]
|
| 570 |
|
| 571 |
[*Example 1*: If the argument has the value -2, the first two elements
|
| 572 |
of the result will be value-initialized [[dcl.init]]; the third element
|
| 573 |
-
of the result will be assigned the value of the first element of
|
| 574 |
-
|
| 575 |
|
| 576 |
``` cpp
|
| 577 |
valarray cshift(int n) const;
|
| 578 |
```
|
| 579 |
|
|
|
|
| 100 |
mathematical concept of an ordered set of values. For convenience, an
|
| 101 |
object of type `valarray<T>` is referred to as an “array” throughout the
|
| 102 |
remainder of [[numarray]]. The illusion of higher dimensionality may be
|
| 103 |
produced by the familiar idiom of computed indices, together with the
|
| 104 |
powerful subsetting capabilities provided by the generalized subscript
|
| 105 |
+
operators.[^9]
|
| 106 |
|
| 107 |
#### Constructors <a id="valarray.cons">[[valarray.cons]]</a>
|
| 108 |
|
| 109 |
``` cpp
|
| 110 |
valarray();
|
| 111 |
```
|
| 112 |
|
| 113 |
+
*Effects:* Constructs a `valarray` that has zero length.[^10]
|
| 114 |
|
| 115 |
``` cpp
|
| 116 |
explicit valarray(size_t n);
|
| 117 |
```
|
| 118 |
|
|
|
|
| 132 |
|
| 133 |
*Preconditions:* \[`p`, `p + n`) is a valid range.
|
| 134 |
|
| 135 |
*Effects:* Constructs a `valarray` that has length `n`. The values of
|
| 136 |
the elements of the array are initialized with the first `n` values
|
| 137 |
+
pointed to by the first argument.[^11]
|
| 138 |
|
| 139 |
``` cpp
|
| 140 |
valarray(const valarray& v);
|
| 141 |
```
|
| 142 |
|
| 143 |
*Effects:* Constructs a `valarray` that has the same length as `v`. The
|
| 144 |
elements are initialized with the values of the corresponding elements
|
| 145 |
+
of `v`.[^12]
|
| 146 |
|
| 147 |
``` cpp
|
| 148 |
valarray(valarray&& v) noexcept;
|
| 149 |
```
|
| 150 |
|
|
|
|
| 255 |
|
| 256 |
The expression `addressof(a[i]) != addressof(b[j])` evaluates to `true`
|
| 257 |
for any two arrays `a` and `b` and for any `size_t i` and `size_t j`
|
| 258 |
such that `i < a.size()` and `j < b.size()`.
|
| 259 |
|
| 260 |
+
[*Note 2*: This property indicates an absence of aliasing and can be
|
| 261 |
+
used to advantage by optimizing compilers. Compilers can take advantage
|
| 262 |
of inlining, constant propagation, loop fusion, tracking of pointers
|
| 263 |
obtained from `operator new`, and other techniques to generate efficient
|
| 264 |
`valarray`s. — *end note*]
|
| 265 |
|
| 266 |
The reference returned by the subscript operator for an array shall be
|
|
|
|
| 568 |
value of `n` shifts the elements left `n` places, with zero
|
| 569 |
fill. — *end note*]
|
| 570 |
|
| 571 |
[*Example 1*: If the argument has the value -2, the first two elements
|
| 572 |
of the result will be value-initialized [[dcl.init]]; the third element
|
| 573 |
+
of the result will be assigned the value of the first element of
|
| 574 |
+
`*this`; etc. — *end example*]
|
| 575 |
|
| 576 |
``` cpp
|
| 577 |
valarray cshift(int n) const;
|
| 578 |
```
|
| 579 |
|