foundationdb/fdbclient/zipf.h

26 lines
381 B
C
Raw Normal View History

2019-05-31 00:01:22 +08:00
/*
* zipfian distribution copied from YCSB
* https://github.com/brianfrankcooper/YCSB
*/
#ifndef ZIPF_H
#define ZIPF_H
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
2019-05-31 00:01:22 +08:00
#define ZIPFIAN_CONSTANT 0.99
void zipfian_generator3(int min, int max, double zipfianconstant);
2019-05-31 00:01:22 +08:00
void zipfian_generator(int items);
int zipfian_next();
#ifdef __cplusplus
}
#endif
2019-05-31 00:01:22 +08:00
#endif /* ZIPF_H */