OscatsAlgStratify

OscatsAlgStratify

Synopsis

gdouble             (*OscatsAlgStratifyCriterion)       (const OscatsAdministrand *item,
                                                         gpointer data);
struct              OscatsAlgStratify;
void                oscats_alg_stratify_stratify        (OscatsAlgStratify *stratify,
                                                         guint n_strata,
                                                         OscatsAlgStratifyCriterion f,
                                                         gpointer f_data,
                                                         guint n_blocks,
                                                         OscatsAlgStratifyCriterion block,
                                                         gpointer b_data);
GBitArray *         oscats_alg_stratify_get_stratum     (const OscatsAlgStratify *stratify,
                                                         guint stratum);
void                oscats_alg_stratify_reset           (OscatsAlgStratify *stratify);
GBitArray *         oscats_alg_stratify_next            (OscatsAlgStratify *stratify);

Object Hierarchy

  GObject
   +----OscatsAlgStratify

Properties

  "itembank"                 OscatsItemBank*       : Read / Write / Construct Only
  "num"                      guint                 : Read

Description

Details

OscatsAlgStratifyCriterion ()

gdouble             (*OscatsAlgStratifyCriterion)       (const OscatsAdministrand *item,
                                                         gpointer data);


struct OscatsAlgStratify

struct OscatsAlgStratify;

Support algorithm (for item selection): Stratify items based on some criterion.


oscats_alg_stratify_stratify ()

void                oscats_alg_stratify_stratify        (OscatsAlgStratify *stratify,
                                                         guint n_strata,
                                                         OscatsAlgStratifyCriterion f,
                                                         gpointer f_data,
                                                         guint n_blocks,
                                                         OscatsAlgStratifyCriterion block,
                                                         gpointer b_data);

Stratify the "itembank" of stratify using the criterion f within blocks specified by block. The bank can be restratified by calling this function multiple times.

stratify :

an OscatsAlgStratify object

n_strata :

the number of strata

f :

the criterion function by which to stratify

f_data :

user data to supply to f. [allow-none]

n_blocks :

the number of blocks

block :

the criterion function by which to block. [allow-none]

b_data :

user data to supply to block. [allow-none]

oscats_alg_stratify_get_stratum ()

GBitArray *         oscats_alg_stratify_get_stratum     (const OscatsAlgStratify *stratify,
                                                         guint stratum);

stratify :

an OscatsAlgStratify object

stratum :

the stratum to fetch (0-based index)

Returns :

the stratum stratum of stratify. [transfer none]

oscats_alg_stratify_reset ()

void                oscats_alg_stratify_reset           (OscatsAlgStratify *stratify);

Reset the internal stratum iterator.

stratify :

an OscatsAlgStratify object

oscats_alg_stratify_next ()

GBitArray *         oscats_alg_stratify_next            (OscatsAlgStratify *stratify);

Returns the next stratum using the internal stratum iterator and increments the iterator. Returns NULL if there are no more strata.

stratify :

an OscatsAlgStratify object

Returns :

the next stratum. [transfer none]

Property Details

The "itembank" property

  "itembank"                 OscatsItemBank*       : Read / Write / Construct Only

The item bank to stratify.


The "num" property

  "num"                      guint                 : Read

Number of strata.

Default value: 1