NAME
dsisubset.h - DATASET_METHOD subset type
SYNOPSIS
Given an existing DATASET, one can define a new subset of the first data set. The actual subset is determined by a user specified vector of indices. This is useful for incremental techniques applied to huge amounts of data.
#include <dsisubset.h>
DSM_ISUBSET *dsm_isubset(DATASET *dset,
unsigned *index,
unsigned len);
void dsm_destroy_isubset(DSM_ISUBSET *isubset);
DESCRIPTION
Type Declarations
The following types are defined in the header file dsisubset.h.
DSM_ISUBSET
typedef struct DSM_ISUBSET {
DATASET *dset;
unsigned *index;
unsigned len;
} DSM_ISUBSET;
A DSM_ISUBSET specifies how to reference a subset of the data in dset. If you were to ask for the i'th pattern of the DATASET wrapped by this structure, in reality you would get the index[i] pattern of dset. Also, in the subset, you can only reference len patterns, so the values in these fields should make sense for {dset.}
Function Definitions
The following function prototypes are given in the header file dsisubset.h.
DSM_ISUBSET *dsm_isubset(DATASET *dset,
unsigned *index,
unsigned len);
Allocates a new isubset, and fills up the appropriate fields of the structure.
void dsm_destroy_isubset(DSM_ISUBSET *isubset);
Free up any memory that was allocated with the allocation routine. The original DATASET that is passed to dsm_subset() is left intact; hence, it is your job to free them up.
AUTHOR
Gary William Flake (gary.flake@usa.net).
SEE ALSO
dsmethod(3), and dataset(3).