summaryrefslogtreecommitdiff
blob: 66b2540e55dd43dfef03ad8f0dc9fd305f30e945 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef _JH_CORE_INDEX_H_
#define _JH_CORE_INDEX_H_

#include "index_types.h"

/*
 * Returns a random JH_index.
 */
/*@
   ensures (\result <= JH_INDEX_MAX);
   assigns \result;
@*/
JH_index JH_index_random (void);

/*
 * Returns a random JH_index, included in [0, limit]
 */
/*@
   ensures (\result <= limit);
   assigns \result;
@*/
JH_index JH_index_random_up_to (const JH_index limit);

int JH_index_cmp (const JH_index a, const JH_index b);

#endif