PostgreSQL Source Code
git master
|
Go to the source code of this file.
Functions | |
BlockNumber | BlockSampler_Init (BlockSampler bs, BlockNumber nblocks, int samplesize, long randseed) |
bool | BlockSampler_HasMore (BlockSampler bs) |
BlockNumber | BlockSampler_Next (BlockSampler bs) |
void | reservoir_init_selection_state (ReservoirState rs, int n) |
double | reservoir_get_next_S (ReservoirState rs, double t, int n) |
void | sampler_random_init_state (long seed, SamplerRandomState randstate) |
double | sampler_random_fract (SamplerRandomState randstate) |
double | anl_random_fract (void) |
double | anl_init_selection_state (int n) |
double | anl_get_next_S (double t, int n, double *stateptr) |
Variables | |
static ReservoirStateData | oldrs |
double anl_get_next_S | ( | double | t, |
int | n, | ||
double * | stateptr | ||
) |
Definition at line 288 of file sampling.c.
References reservoir_get_next_S(), and ReservoirStateData::W.
double anl_init_selection_state | ( | int | n | ) |
Definition at line 277 of file sampling.c.
References random(), ReservoirStateData::randstate, sampler_random_fract(), and sampler_random_init_state().
double anl_random_fract | ( | void | ) |
Definition at line 266 of file sampling.c.
References random(), ReservoirStateData::randstate, sampler_random_fract(), and sampler_random_init_state().
bool BlockSampler_HasMore | ( | BlockSampler | bs | ) |
Definition at line 58 of file sampling.c.
References BlockSamplerData::m, BlockSamplerData::N, BlockSamplerData::n, and BlockSamplerData::t.
Referenced by acquire_sample_rows(), and BlockSampler_Next().
BlockNumber BlockSampler_Init | ( | BlockSampler | bs, |
BlockNumber | nblocks, | ||
int | samplesize, | ||
long | randseed | ||
) |
Definition at line 39 of file sampling.c.
References BlockSamplerData::m, Min, BlockSamplerData::N, BlockSamplerData::n, BlockSamplerData::randstate, sampler_random_init_state(), and BlockSamplerData::t.
Referenced by acquire_sample_rows().
BlockNumber BlockSampler_Next | ( | BlockSampler | bs | ) |
Definition at line 64 of file sampling.c.
References Assert, BlockSampler_HasMore(), K, BlockSamplerData::m, BlockSamplerData::N, BlockSamplerData::n, BlockSamplerData::randstate, sampler_random_fract(), and BlockSamplerData::t.
Referenced by acquire_sample_rows().
double reservoir_get_next_S | ( | ReservoirState | rs, |
double | t, | ||
int | n | ||
) |
Definition at line 146 of file sampling.c.
References ReservoirStateData::randstate, S, sampler_random_fract(), ReservoirStateData::W, and W.
Referenced by acquire_sample_rows(), analyze_row_processor(), anl_get_next_S(), and file_acquire_sample_rows().
void reservoir_init_selection_state | ( | ReservoirState | rs, |
int | n | ||
) |
Definition at line 133 of file sampling.c.
References random(), ReservoirStateData::randstate, sampler_random_fract(), sampler_random_init_state(), and ReservoirStateData::W.
Referenced by acquire_sample_rows(), file_acquire_sample_rows(), and postgresAcquireSampleRowsFunc().
double sampler_random_fract | ( | SamplerRandomState | randstate | ) |
Definition at line 242 of file sampling.c.
References pg_erand48().
Referenced by acquire_sample_rows(), analyze_row_processor(), anl_init_selection_state(), anl_random_fract(), BlockSampler_Next(), file_acquire_sample_rows(), random_relative_prime(), reservoir_get_next_S(), reservoir_init_selection_state(), system_rows_nextsampleblock(), and system_time_nextsampleblock().
void sampler_random_init_state | ( | long | seed, |
SamplerRandomState | randstate | ||
) |
Definition at line 233 of file sampling.c.
Referenced by anl_init_selection_state(), anl_random_fract(), BlockSampler_Init(), reservoir_init_selection_state(), system_rows_nextsampleblock(), and system_time_nextsampleblock().
|
static |
Definition at line 263 of file sampling.c.