The Complete SPRLIB & ANNLIB

fscanf_sample

- read one sample from a stream (LOCAL)

SYNOPSIS

SAMPLE *fscanf_sample (stream, dset)

ARGUMENTS

FILE *stream A valid filepointer.
DATASET *dset A pointer to the DATASET structure to which this sample belongs.

RETURNS

A pointer to a SAMPLE structure if all went well, NULL if an error occured.

FUNCTION

This routine reads a sample from an opened stream. See DATASET-IO-format for the layout. The function malloc_sample is used to allocate the DATASET structure. First, the SAMPLE structure's Input vector is allocated and read. Then, if the dataset is an IOSET (see DATASET-flags), an output vector is allocated and read using fscanf_io_pattern. If the dataset is a LABELSET, the function fscanf_pattern is called; the class return value is stored in sample->Output.Label, pattern in sample->Input.

NOTE

This function is used by the fscanf_dataset function. The dset argument is necessary to know how long the input and output vectors are (dset->NumInputs and dset->NumOutputs) and if the dataset is an IOSET or a LABELSET.

SEE ALSO

fscanf_pattern, fscanf_io_pattern, fscanf_header, fscanf_dataset, fscanf_compressed_dataset

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