blog

  • 홈
  • 태그

Programming/C++ 1

[A tour of C++] Ch 14. Numerics

14.5 Random Numbers 난수 생성기는 크게 두 부분으로 구성된다. - engine: 난수 또는 psuedo-난수의 시퀀스를 생성함 - distribution: 이러한 값을 어떤 범위 안의 수학적 분포로 매핑함 #include #include #include #include using namespace std; class Rand_int { public: Rand_int(int low = numeric_limits::min(), int high = numeric_limits::max()) : rd{}, rnd{rd()}, dist{low, high} {} int operator()() { return dist(rnd); } private: random_device rd; mt19937 rnd;..

Programming/C++ 2020.01.15
1
더보기
  • 분류 전체보기
    • Computer Science
      • Computer System
      • OS
      • Network
      • Database
      • Algorithms
      • ETC
    • Programming
      • C++
      • JavaScript
      • Note
    • DevOps
      • Container
    • Problem Solving
    • Note
      • Projects
    • Clipping

Tag

C, 컴퓨터구조, c++, Algorithms, 컴구논, BOJ, 순열, kmp, ps, 멘토링, 책정리,

최근글과 인기글

  • 최근글
  • 인기글

Archives

Calendar

«   2025/08   »
일 월 화 수 목 금 토
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바