kennen:lib:random_shuffle
no way to compare when less than two revisions
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
— | kennen:lib:random_shuffle [2019-11-20 14:42] (aktuell) – angelegt - Externe Bearbeitung 127.0.0.1 | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | ====== random_shuffle() ====== | ||
+ | ''# | ||
+ | |||
+ | <code cpp> | ||
+ | void random_shuffle (Ran first, Ran last) | ||
+ | void random_shuffle (Ran first, Ran last, Func& zufallsgenerator) | ||
+ | </ | ||
+ | | ||
+ | |||
+ | ==== Parameter ==== | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | Der Ausdruck '' | ||
+ | möglichst zufällige Werte im Bereich [0,n) liefern. | ||
+ | |||
+ | ==== Ergebnis ==== | ||
+ | Rückgabewert: | ||
+ | |||
+ | ==== Siehe auch ==== | ||
+ | [[next_permutation]], | ||
+ | [[prev_permutation]], | ||
+ | [[shuffle]], | ||
+ | [[sort]]. | ||
+ | |||
+ | ==== Beispiel ==== | ||
+ | <code cpp random_shuffle.cpp> | ||
+ | #include < | ||
+ | #include < | ||
+ | #include < | ||
+ | |||
+ | int main() | ||
+ | { | ||
+ | std::string s = "Hallo Welt"; | ||
+ | |||
+ | std:: | ||
+ | |||
+ | std::cout << s << ' | ||
+ | } | ||
+ | </ | ||
kennen/lib/random_shuffle.txt · Zuletzt geändert: 2019-11-20 14:42 von 127.0.0.1