#ifndef _Sequence_h_
#define _Sequence_h_
/* David Weenink, 7 may 1997 */

#define SEQUENCE_NATURALORDER 0
#define SEQUENCE_PERMUTE 1
#define SEQUENCE_RANDOMIZE 2

#ifndef _Data_h_
	#include "Data.h"
#endif

#include "Sequence_def.h"

#define Sequence_methods Data_methods    
oo_CLASS_CREATE (Sequence, Data)

int Sequence_init (Sequence me, long n, int action, int seed);
Sequence Sequence_create (long n, int action, int seed);
/*
	Create the Sequence data structure and a first sequence.
	action == SEQUENCE_NATURALORDER
		create a sequence 1..n.
	action == SEQUENCE_PERMUTE
		create a permutation of the numbers 1..n.
	action == SEQUENCE_RANDOMIZE
		create a sequence from random drawings (some numbers may occur 
		more than once).
*/

void Sequence_restart (Sequence me, long seed);
/*
	restart the random generator with seed
	seed > 0 generates a reproducible sequence
	seed == 0 generates a non-reproducible sequence
*/

void Sequence_newSequence (Sequence me);
/* Generate a new sequence */

long Sequence_ith (Sequence me, long i);
/* return my p[i] */

#endif /* _Sequence_h_ */
