- 用語の定義
- 乱数(Random number)
- 乱数とは、サイコロの出目のように規則性がなく予測不能な数値のこと(http://e-words.jp/w/%E4%B9%B1%E6%95%B0.htmlより)
- 乱数列(Random number sequence)
- 乱数からなる数列のこと
- 擬似乱数(Pseudorandom number)
- 擬似乱数とは、確定的な計算によって生成した乱数のように見える数列の乱数のこと
- 一般に「乱数」というと「擬似乱数」を指す
- 乱数列 → 擬似乱数列
- 乱数(Random number)
- 擬似乱数 ⇔ 自然乱数(真の乱数)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ CMakeFiles/CMakeError.log | |
Determining if the pthread_create exist failed with the following output: | |
Change Dir: ~/.vim/bundle/color_coded/CMakeFiles/CMakeTmp | |
Run Build Command:"/usr/bin/gmake" "cmTC_b7387/fast" | |
/usr/bin/gmake -f CMakeFiles/cmTC_b7387.dir/build.make CMakeFiles/cmTC_b7387.dir/build | |
gmake[1]: ディレクトリ `~/.vim/bundle/color_coded/CMakeFiles/CMakeTmp' に入ります | |
Building C object CMakeFiles/cmTC_b7387.dir/CheckSymbolExists.c.o | |
~/local/bin/gcc -o CMakeFiles/cmTC_b7387.dir/CheckSymbolExists.c.o -c ~/.vim/bundle/color_coded/CMakeFiles/CMakeTmp/CheckSymbolExists.c | |
Linking C executable cmTC_b7387 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ vim ~/src/10/main.cpp | |
<作業> | |
clang version 3.8.0 (tags/RELEASE_380/final) | |
Target: x86_64-unknown-linux-gnu | |
Thread model: posix | |
InstalledDir: ~/local/bin | |
Found candidate GCC installation: ~/local/lib/gcc/x86_64-redhat-linux/6.1.0 | |
Selected GCC installation: ~/local/lib/gcc/x86_64-redhat-linux/6.1.0 | |
Candidate multilib: .;@m64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function* gen() { | |
let i = 0; | |
while(true) { | |
yield i++; | |
} | |
} | |
const g1 = gen(); | |
console.log(g1.next()); // { value: 0, done: false } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <iomanip> | |
using namespace std; | |
// 次の乱数を取得 | |
uint32_t next(uint32_t s) { | |
return 0x41C64E6D * s + 0x00006073; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
import {LCG, IndexedLCG} from '../core'; | |
import {GEN4_ARG} from '../constant'; | |
const seed = 0x89070502; | |
const lcg = new LCG(GEN4_ARG, seed); | |
function toHex(dight) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const key = 'VIGENERECODEVIGENERECODEVIGENERECODEVIGENER'; | |
const table = { | |
'A': 'ABCDEFGHIJKLMNOPQRSTUVWXYZ{}', | |
'B': 'BCDEFGHIJKLMNOPQRSTUVWXYZ{}A', | |
'C': 'CDEFGHIJKLMNOPQRSTUVWXYZ{}AB', | |
'D': 'DEFGHIJKLMNOPQRSTUVWXYZ{}ABC', | |
'E': 'EFGHIJKLMNOPQRSTUVWXYZ{}ABCD', | |
'F': 'FGHIJKLMNOPQRSTUVWXYZ{}ABCDE', | |
'G': 'GHIJKLMNOPQRSTUVWXYZ{}ABCDEF', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <iomanip> | |
using namespace std; | |
// 次の乱数を取得 | |
uint32_t next(uint32_t s) { | |
return 0x41C64E6D * s + 0x00006073; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <iomanip> | |
using namespace std; | |
// 次の乱数を取得 | |
uint32_t next(uint32_t s) { | |
return 0x41C64E6D * s + 0x00006073; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"editor.fontFamily": "Ricty for Powerline", | |
"editor.fontSize": 14, | |
"guides.normal.style": "dashed", | |
"git.confirmSync": false, | |
"files.associations": { | |
"*.vue": "html" // .vue で emmet を有効化 | |
}, | |
"editor.wordWrap": "off", | |
"workbench.colorTheme": "Atom One Dark", |