File: randix.h

package info (click to toggle)
argyll 3.3.0%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 33,944 kB
  • sloc: ansic: 402,917; javascript: 36,570; xml: 1,551; sh: 520; makefile: 428
file content (41 lines) | stat: -rw-r--r-- 858 bytes parent folder | download | duplicates (2)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

#ifndef RANDIX_H
/* 
 * Argyll Color Correction System
 *
 * Random array indexing class
 *
 * Author: Graeme W. Gill
 * Date:   16/10/96
 *
 * Copyright 1996, Graeme W. Gill
 * All rights reserved.
 *
 * This material is licenced under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3 :-
 * see the License.txt file for licencing details.
 */

struct _randix {
/* private: */
	int tbit;		/* Top bit mask */
	int mask;		/* Overall mask */
	int xorm;		/* Xor value */
	int length;	/* Length needed */
	int ss;		/* Current value */

/* public: */
	/* return the next in the sequence */
	int (*next)(struct _randix *p);

	/* Destroy ourselves */
	void (*del)(struct _randix *p);

	}; typedef struct _randix randix;

/* Creator */
/* Counts within range 0 to length-1 */
extern randix *new_randix(int length, int start);


#define RANDIX_H
#endif /* RANDIX_H */