Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
std:random shuffle()C++ とCollections.shuffleJavaのそれぞれの理由を理解しようと何度も試みました。
std:random shuffle()
Collections.shuffle
同じシードを使用しても同じ生成シーケンスは得られませんが、両方が均一に分散されていると想定されています。
同じ値をいつ生成できるかを例を挙げて教えていただければ幸いです。ランダムに生成された値を初期値として使用するアルゴリズムを実装しました。C++ の結果があり、Java で実装されているアルゴリズムを検証したいと考えています。