CorTeX Core ABI 7
ToolTech Software · C++ library reference
Loading...
Searching...
No Matches
ctxIndex Class Reference

#include <ctxIndex.h>

Inheritance diagram for ctxIndex:

Public Member Functions

 ctxIndex (gzUInt32 size, gzBool randomize=TRUE)
gzVoid randomize (gzUInt32 iterations=1)
gzVoid setEpochOrder (gzUInt32 seed, gzUInt32 epoch)
 Reset to identity and apply a reproducible train-epoch-permutation-v1 order.
gzBool setWeightedEpochOrder (const gzArray< gzFloat > &weights, gzUInt32 seed, gzUInt32 epoch)
 Draw this array's size with replacement from nonnegative finite weights.
gzBool applyGroupedCycleOrder (const gzArray< gzUInt32 > &sampleGroups, gzArray< gzUInt64 > &groupPositions, gzUInt32 seed=0)
 Replace each selected sample by the next shuffled member of its group.
ctxIndex sub (gzUInt32 index, gzUInt32 length)
ctxBuffer * getIndexBuffer ()

Detailed Description

Definition at line 29 of file ctxIndex.h.

Constructor & Destructor Documentation

◆ ctxIndex()

ctxIndex::ctxIndex ( gzUInt32 size,
gzBool randomize = TRUE )

References CTX_EXPORT, and randomize().

Referenced by sub().

Member Function Documentation

◆ applyGroupedCycleOrder()

gzBool ctxIndex::applyGroupedCycleOrder ( const gzArray< gzUInt32 > & sampleGroups,
gzArray< gzUInt64 > & groupPositions,
gzUInt32 seed = 0 )

Replace each selected sample by the next shuffled member of its group.

grouped-cycle32-v1 preserves the group at every existing index position. sampleGroups maps eligible sample indices to dense group IDs; use GZ_INVALID_INDEX for excluded samples. Each groupPositions entry counts previously consumed members and must initially be zero. Keep it across epochs and bind/save it together with seed, group membership and order. Each group uses setEpochOrder() and completes a permutation before repeating. This deliberately replaces within-group sample probabilities; it does not preserve arbitrary individual weights. Membership must not alias this destination. Excluded samples may not appear in this index array. Empty groups, invalid indices or exhausted 32-bit cycle numbers fail without changing indices or positions. A valid empty order succeeds without advancing positions. No global RNG is used. The method does not install an order in a trainer or save policy.

References CTX_EXPORT.

◆ getIndexBuffer()

ctxBuffer * ctxIndex::getIndexBuffer ( )

References CTX_EXPORT.

◆ randomize()

gzVoid ctxIndex::randomize ( gzUInt32 iterations = 1)

References CTX_EXPORT.

Referenced by ctxIndex().

◆ setEpochOrder()

gzVoid ctxIndex::setEpochOrder ( gzUInt32 seed,
gzUInt32 epoch )

Reset to identity and apply a reproducible train-epoch-permutation-v1 order.

Uses local unsigned 32-bit state derived from seed/epoch; global RNG state and other index arrays are untouched. An empty index remains empty. This is an explicit alternative to the existing randomize() algorithm.

References CTX_EXPORT.

◆ setWeightedEpochOrder()

gzBool ctxIndex::setWeightedEpochOrder ( const gzArray< gzFloat > & weights,
gzUInt32 seed,
gzUInt32 epoch )

Draw this array's size with replacement from nonnegative finite weights.

Indices address the weight array; zero-weight samples are never drawn. weighted-replacement32-v1 uses local seed/epoch state, not the global RNG. Empty/all-zero or numerically unresolved weights fail without changing this array. Repetition counts are stochastic; weights do not cap actual repeats.

References CTX_EXPORT.

◆ sub()

ctxIndex ctxIndex::sub ( gzUInt32 index,
gzUInt32 length )

References CTX_EXPORT, and ctxIndex().


The documentation for this class was generated from the following file: