The Complete SPRLIB & ANNLIB

random_order_dataset

- randomize the order of the samples in a dataset

SYNOPSIS

int random_order_dataset (dset)

ARGUMENTS

DATASET *dset A pointer to a DATASET structure.

RETURNS

TRUE if an error occured, FALSE if not.

FUNCTION

This function randomizes the order of the SAMPLE structures in dset 's linked list of samples (FirstSample). This is done by building a new pile of samples from the old one. The old list is traversed, taking a step of random_unif * SamplesLeft, i.e. a step with a size between 0 samples and the size of the list that is left. The next sample encountered is added to the pile, and SampleLeft is decreased by 1. This continues until SamplesLeft = 1. The pile is then attached to dset->FirstSample.

SEE ALSO

random_unif

This document was generated using api2html on Thu Mar 5 09:00:00 MET DST 1998