PostgreSQL Source Code git master
Loading...
Searching...
No Matches
geqo_random.h
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2 *
3 * geqo_random.h
4 * random number generator
5 *
6 * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
8 *
9 * src/include/optimizer/geqo_random.h
10 *
11 *-------------------------------------------------------------------------
12 */
13
14/*
15 * contributed by:
16 * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
17 * * Martin Utesch * Institute of Automatic Control *
18 * = = University of Mining and Technology =
19 * * utesch@aut.tu-freiberg.de * Freiberg, Germany *
20 * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
21 */
22
23/* -- parts of this are adapted from D. Whitley's Genitor algorithm -- */
24
25#ifndef GEQO_RANDOM_H
26#define GEQO_RANDOM_H
27
28#include "optimizer/geqo.h"
29
30
31extern void geqo_set_seed(PlannerInfo *root, double seed);
32
33/* geqo_rand returns a random float value in the range [0.0, 1.0) */
34extern double geqo_rand(PlannerInfo *root);
35
36/* geqo_randint returns integer value between lower and upper inclusive */
37extern int geqo_randint(PlannerInfo *root, int upper, int lower);
38
39#endif /* GEQO_RANDOM_H */
void geqo_set_seed(PlannerInfo *root, double seed)
Definition geqo_random.c:19
int geqo_randint(PlannerInfo *root, int upper, int lower)
Definition geqo_random.c:35
double geqo_rand(PlannerInfo *root)
Definition geqo_random.c:27
Datum lower(PG_FUNCTION_ARGS)
Datum upper(PG_FUNCTION_ARGS)
tree ctl root
Definition radixtree.h:1857