2
2
<feed xmlns =" http://www.w3.org/2005/Atom" >
3
3
<title >cpprefjp - C++日本語リファレンス</title >
4
4
<link href =" https://cpprefjp.github.io" />
5
- <updated >2024-07-26T14:38:38.562999 </updated >
6
- <id >f23c5c0a-6dd2-4ca8-9b5d-14590e1062c3 </id >
5
+ <updated >2024-07-27T09:02:32.236777 </updated >
6
+ <id >d0c68718-47a9-4839-9e87-1d8d6837a0ca </id >
7
7
8
8
9
+ <entry >
10
+ <title >コンストラクタ -- fix description about constructor complexity in map and set</title >
11
+ <link href =" https://cpprefjp.github.io/reference/map/map/op_constructor.html" />
12
+ <id >75e450d08d80a5cdbf2ca0648edd0172436062e9:reference/map/map/op_constructor.md</id >
13
+ <updated >2024-07-27T17:57:30+09:00</updated >
14
+
15
+ <summary type =" html" >< pre>< code> diff --git a/reference/map/map/op_constructor.md b/reference/map/map/op_constructor.md
16
+ index 044525df9..de6950de8 100644
17
+ --- a/reference/map/map/op_constructor.md
18
+ +++ b/reference/map/map/op_constructor.md
19
+ @@ -67,8 +67,8 @@ map(initializer_list& lt;value_type& gt; init,
20
+ - (4)、(5) `N =` [`distance`](../../iterator/distance.md)`(first, last)` とすると、範囲 `[first, last)` が比較オブジェクト `comp` によって既にソート済みである場合は `N` に比例、そうでなければ `N log N` に比例
21
+ - (6)、(7) `x.`[`size`](size.md)`()` に対して線形時間
22
+ - (8) 定数時間
23
+ -- (9) 定数時間。但し、`alloc == y.`[`get_allocator`](/reference/map/map/get_allocator.md)`()` でなければ `y.`[`size`](size.md)`()` に対して線形時間。
24
+ -- (10)、(11) `init.`[`size`](size.md)`()` に対して線形時間。
25
+ +- (9) 定数時間。但し、`alloc == y.`[`get_allocator`](/reference/map/map/get_allocator.md)`()` でなければ `y.`[`size`](size.md)`()` に対して線形時間
26
+ +- (10)、(11) `N = init.`[`size`](../../initializer_list/initializer_list/size.md)`()` とすると、範囲 `[init.`[`begin`](../../initializer_list/initializer_list/begin.md)`(), init.`[`end`](../../initializer_list/initializer_list/end.md)`())` が比較オブジェクト `comp` によって既にソート済みである場合は `N` に比例、そうでなければ `N log N` に比例
27
+
28
+
29
+ ## 備考
30
+ < /code>< /pre> </summary >
31
+
32
+ <author >
33
+ <name >suomesta</name >
34
+
35
+ </author >
36
+ </entry >
37
+
38
+ <entry >
39
+ <title >コンストラクタ -- fix description about constructor complexity in map and set</title >
40
+ <link href =" https://cpprefjp.github.io/reference/map/multimap/op_constructor.html" />
41
+ <id >75e450d08d80a5cdbf2ca0648edd0172436062e9:reference/map/multimap/op_constructor.md</id >
42
+ <updated >2024-07-27T17:57:30+09:00</updated >
43
+
44
+ <summary type =" html" >< pre>< code> diff --git a/reference/map/multimap/op_constructor.md b/reference/map/multimap/op_constructor.md
45
+ index 399f10e85..ac4fc9f3d 100644
46
+ --- a/reference/map/multimap/op_constructor.md
47
+ +++ b/reference/map/multimap/op_constructor.md
48
+ @@ -71,7 +71,7 @@ multimap(initializer_list& lt;value_type& gt; init,
49
+ - (6)、(7) `x.`[`size`](size.md)`()` に対して線形時間
50
+ - (8) 定数時間
51
+ - (9) 定数時間。ただし、`alloc == y.`[`get_allocator`](get_allocator.md)`()` でなければ `y.`[`size`](size.md)`()` に対して線形時間
52
+ -- (10)、(11) `init.`[`size`](size.md)`()` に対して線形時間
53
+ +- (10)、(11) `N = init.`[`size`](../../initializer_list/initializer_list/size.md)`()` とすると、範囲 `[init.`[`begin`](../../initializer_list/initializer_list/begin.md)`(), init.`[`end`](../../initializer_list/initializer_list/end.md)`())` が比較オブジェクト `comp` によって既にソート済みである場合は `N` に比例、そうでなければ `N log N` に比例
54
+
55
+
56
+ ## 備考
57
+ < /code>< /pre> </summary >
58
+
59
+ <author >
60
+ <name >suomesta</name >
61
+
62
+ </author >
63
+ </entry >
64
+
65
+ <entry >
66
+ <title >コンストラクタ -- fix description about constructor complexity in map and set</title >
67
+ <link href =" https://cpprefjp.github.io/reference/set/multiset/op_constructor.html" />
68
+ <id >75e450d08d80a5cdbf2ca0648edd0172436062e9:reference/set/multiset/op_constructor.md</id >
69
+ <updated >2024-07-27T17:57:30+09:00</updated >
70
+
71
+ <summary type =" html" >< pre>< code> diff --git a/reference/set/multiset/op_constructor.md b/reference/set/multiset/op_constructor.md
72
+ index ff871be24..2d547bfe5 100644
73
+ --- a/reference/set/multiset/op_constructor.md
74
+ +++ b/reference/set/multiset/op_constructor.md
75
+ @@ -62,7 +62,7 @@ multiset(initializer_list& lt;value_type& gt; init,
76
+ - (4), (5) : `comp` によって既にソート済みである場合は、イテレータ間の距離(コピーコンストラクト)。未ソートのシーケンスの場合は、それらの距離について N * logN (ソート、コピーコンストラクト)。
77
+ - (6), (8) : `x` の [`size`](size.md) に対して線形時間(全要素をコピー構築する)。
78
+ - (7), (9) : 定数時間。ただし、`alloc` が与えられてかつ `alloc != y.`[`get_allocator`](get_allocator.md)`()` の場合は線形時間。
79
+ -- (10), (11) : `init` の要素数に対して線形時間。
80
+ +- (10), (11) : `comp` によって既にソート済みである場合は、`init` のサイズ(コピーコンストラクト)。未ソートの `init` の場合は、`init` のサイズについて N * logN (ソート、コピーコンストラクト)。
81
+
82
+
83
+ ## 備考
84
+ < /code>< /pre> </summary >
85
+
86
+ <author >
87
+ <name >suomesta</name >
88
+
89
+ </author >
90
+ </entry >
91
+
92
+ <entry >
93
+ <title >コンストラクタ -- fix description about constructor complexity in map and set</title >
94
+ <link href =" https://cpprefjp.github.io/reference/set/set/op_constructor.html" />
95
+ <id >75e450d08d80a5cdbf2ca0648edd0172436062e9:reference/set/set/op_constructor.md</id >
96
+ <updated >2024-07-27T17:57:30+09:00</updated >
97
+
98
+ <summary type =" html" >< pre>< code> diff --git a/reference/set/set/op_constructor.md b/reference/set/set/op_constructor.md
99
+ index d87fbf344..22e8e1e44 100644
100
+ --- a/reference/set/set/op_constructor.md
101
+ +++ b/reference/set/set/op_constructor.md
102
+ @@ -62,7 +62,7 @@ set(initializer_list& lt;value_type& gt; init,
103
+ - (4), (5) : `comp` によって既にソート済みである場合は、イテレータ間の距離(コピーコンストラクト)。未ソートのシーケンスの場合は、それらの距離について N * logN (ソート、コピーコンストラクト)。
104
+ - (6), (8) : `x` の [`size`](size.md) に対して線形時間(全要素をコピー構築する)。
105
+ - (7), (9) : 定数時間。ただし、`alloc` が与えられてかつ `alloc != y.`[`get_allocator`](get_allocator.md)`()` の場合は線形時間。
106
+ -- (10), (11) : `init` の要素数に対して線形時間。
107
+ +- (10), (11) : `comp` によって既にソート済みである場合は、`init` のサイズ(コピーコンストラクト)。未ソートの `init` の場合は、`init` のサイズについて N * logN (ソート、コピーコンストラクト)。
108
+
109
+
110
+ ## 備考
111
+ < /code>< /pre> </summary >
112
+
113
+ <author >
114
+ <name >suomesta</name >
115
+
116
+ </author >
117
+ </entry >
118
+
9
119
<entry >
10
120
<title >exclusive_scan -- partial_sum, inclusive_scan, exclusive_scanを相互に関連項目として記載</title >
11
121
<link href =" https://cpprefjp.github.io/reference/numeric/exclusive_scan.html" />
@@ -219,130 +329,4 @@ index d983554ab..07100b6ad 100644
219
329
</author >
220
330
</entry >
221
331
222
- <entry >
223
- <title >apply_givens_rotation -- linalg : apply_givens_rotationに例を追加 (#1233)</title >
224
- <link href =" https://cpprefjp.github.io/reference/linalg/apply_givens_rotation.html" />
225
- <id >271535ed9d6e4e0041c66866fa0a3290122ac8f6:reference/linalg/apply_givens_rotation.md</id >
226
- <updated >2024-07-25T21:07:33+09:00</updated >
227
-
228
- <summary type =" html" >< pre>< code> diff --git a/reference/linalg/apply_givens_rotation.md b/reference/linalg/apply_givens_rotation.md
229
- index 1e8d4ed20..409f6a594 100644
230
- --- a/reference/linalg/apply_givens_rotation.md
231
- +++ b/reference/linalg/apply_givens_rotation.md
232
- @@ -98,9 +98,107 @@ $$
233
-
234
-
235
- ## 例
236
- +**[注意] 処理系にあるコンパイラで確認していないため、間違っているかもしれません。**
237
- +
238
- +```cpp example
239
- +#include & lt;cmath& gt;
240
- +#include & lt;complex& gt;
241
- +#include & lt;initializer_list& gt;
242
- +#include & lt;execution& gt;
243
- +#include & lt;iostream& gt;
244
- +#include & lt;linalg& gt;
245
- +#include & lt;mdspan& gt;
246
- +#include & lt;vector& gt;
247
- +
248
- +template & lt;class Vector& gt;
249
- +void print(Vector v) {
250
- + for (int i = 0; i & lt; v.extent(0) - 1; ++i) {
251
- + std::cout & lt;& lt; v[i] & lt;& lt; & #34;, & #34;;
252
- + }
253
- + std::cout & lt;& lt; v[v.extent(0) - 1] & lt;& lt; std::endl;
254
- +}
255
- +
256
- +int main()
257
- +{
258
- + constexpr size_t N = 2;
259
- +
260
- + using Complex = std::complex& lt;double& gt;;
261
- +
262
- + {
263
- + std::initializer_list& lt;double& gt; a_coeff = {1, std::sqrt(3.0)};
264
- + std::initializer_list& lt;double& gt; b_coeff = {std::sqrt(3.0), -0.5};
265
- +
266
- + std::vector& lt;double& gt; a_vec(a_coeff);
267
- + std::mdspan a(a_vec.data(), N);
268
- +
269
- + std::vector& lt;double& gt; b_vec(b_coeff);
270
- + std::mdspan b(b_vec.data(), N);
271
- +
272
- + double c = 0.5;
273
- + double s = -std::sqrt(3.0) / 2;
274
- +
275
- + // (1)
276
- + std::linalg::apply_givens_rotation(a, b, c, s);
277
- + print(a);
278
- + print(b);
279
- +
280
- + // (2)
281
- + // aとbを初期化
282
- + a_vec = a_coeff;
283
- + b_vec = b_coeff;
284
- + std::linalg::apply_givens_rotation(std::execution::par, a, b, c, s);
285
- + print(a);
286
- + print(b);
287
- + }
288
- +
289
- + {
290
- + std::initializer_list& lt;Complex& gt; a_coeff = {Complex{1, 0}, Complex{std::sqrt(3.0), 0}};
291
- + std::initializer_list& lt;Complex& gt; b_coeff = {Complex{0, std::sqrt(3.0)}, Complex{0, -0.5}};
292
- +
293
- + std::vector& lt;Complex& gt; a_vec(a_coeff);
294
- + std::mdspan a(a_vec.data(), N);
295
- +
296
- + std::vector& lt;Complex& gt; b_vec(b_coeff);
297
- + std::mdspan b(b_vec.data(), N);
298
- +
299
- + double c = 0.5;
300
- + Complex s = Complex{0, -std::sqrt(3.0) / 2};
301
- +
302
- + // (3)
303
- + std::linalg::apply_givens_rotation(a, b, c, s);
304
- + print(a);
305
- + print(b);
306
- +
307
- + // (4)
308
- + // aとbを初期化
309
- + a_vec = a_coeff;
310
- + b_vec = b_coeff;
311
- + std::linalg::apply_givens_rotation(std::execution::par, a, b, c, s);
312
- + print(a);
313
- + print(b);
314
- + }
315
- +
316
- + return 0;
317
- +}
318
- +```
319
- +* std::linalg::apply_givens_rotation[color ff0000]
320
-
321
-
322
- ### 出力
323
- +```
324
- +(1)
325
- +1, 0
326
- +0, -1
327
- +(2)
328
- +1, 0
329
- +0, -1
330
- +(3)
331
- +(1,0), (0,0)
332
- +(0,0), (0,-1)
333
- +(4)
334
- +(1,0), (0,0)
335
- +(0,0), (0,-1)
336
- +```
337
-
338
-
339
- ## バージョン
340
- < /code>< /pre> </summary >
341
-
342
- <author >
343
- <name >Yuya Asano</name >
344
-
345
- </author >
346
- </entry >
347
-
348
332
</feed >
0 commit comments