The Complete SPRLIB & ANNLIB

labelset_to_ioset

- convert a LABELSET to an IOSET

SYNOPSIS

DATASET *labelset_to_ioset (labelset)

ARGUMENTS

DATASET *labelset A pointer to the DATASET structure to be converted.

RETURNS

The set labelset, converted to an IOSET (see DATASET-flags); or NULL if an error occured.

FUNCTION

A new dataset is created using malloc_dataset and the contents of labelset are copied into it, including all descriptions. The SetId field is increased by 1, and to the SetText the string "++ REMADE FROM LABELSET ++" is added. Also, the CreationDate is set using the time_stamp routine and SetFlag is set to IOSET. Finally, all SAMPLE structures are copied (using malloc_sample). An output vector is constructed using place coding - first the minimum and maximum label values are found, and then each output label is replace with an output vector containing values of 0.1 everywhere and 0.9 for the element with index label - minimum_label. Therefore, the set's NumOutputs has to be maximum_label - minimum_label + 1.

NOTE

The original dataset (labelset) is not freed or changed.

SEE ALSO

ioset_to_labelset

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