22{
25
26 size_t N;
27 size_t k;
28 size_t start;
29 size_t M;
30 Int_t seed;
32
33 try {
34
36
43
44 zap(argc, argv);
45 }
46 catch(const exception& error) {
47 FATAL(error.what() << endl);
48 }
49
50
51 gRandom->SetSeed(seed);
52
53
54
55
56
57
58
59
60
62
63 for (size_t i = 0; i != N; ++i) {
64 buffer.push_back(start + i);
65 }
66
71 };
72
73 for (size_t counter = 0; counter != M; ++counter) {
74
75 size_t m = 0;
76
77 for (size_t i = 0; i != k; ++i) {
78
79 const size_t l = gRandom->Integer(N - i);
80
81 if (buffer[l] > m) {
82 m = buffer[l];
83 }
84
85 swap(buffer[l], buffer[N - i - 1]);
86 }
87
91 }
92
93 if (
debug >= debug_t) {
94
95 for (size_t i = 0; i != sizeof(Q)/sizeof(Q[0]); ++i) {
96
98
101 }
102
103 cout << endl;
104 }
105 }
106}
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
const std::string & getTitle() const
Get title.
Utility class to parse command line options.
size_t getCount(const array_type< T > &buffer, const JCompare_t &compare)
Count number of unique values.
size_t getBayesianMean(const size_t m, const size_t k)
Get estimate of maximum number.
size_t getBayesianMedian(const size_t m, const size_t k)
Get estimate of maximum number.
size_t getMinimumVarianceUnbiasedEstimator(const size_t m, const size_t k)
Get estimate of maximum number.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.