CorTeX Core ABI 7
ToolTech Software · C++ library reference
Loading...
Searching...
No Matches
ctxIndex.h
Go to the documentation of this file.
1//*****************************************************************************
2// File : ctxIndex.h
3// Description : Index array control
4// Author : Anders Modén
5// Product : CorTeX 2.0.1
6//
7// Copyright © 2015- Anders Modén, Sweden
8//
9// NOTE: CorTeX is a software development kit (SDK)
10// for neural networks and genetic programming.
11// Licensed by Anders Modén.
12//
13//
14// Revision History...
15//
16// Who Date Description
17//
18// AMO 261021 Add atomic group-preserving cycle index orders (2.0.2)
19// AMO 261015 Add opt-in weighted replacement epoch indices (2.0.2)
20// AMO 261015 Expose reproducible local epoch permutation (2.0.2)
21// AMO 150708 Created file (1.0.0)
22//
23//******************************************************************************
24#ifndef __CTX_INDEX_H__
25#define __CTX_INDEX_H__
26
28
29class ctxIndex : public gzArray<gzUInt32>
30{
31public:
32
33 CTX_EXPORT ctxIndex(gzUInt32 size,gzBool randomize=TRUE);
34
35 CTX_EXPORT gzVoid randomize(gzUInt32 iterations = 1);
36
42 CTX_EXPORT gzVoid setEpochOrder(gzUInt32 seed, gzUInt32 epoch);
43
50 CTX_EXPORT gzBool setWeightedEpochOrder(const gzArray<gzFloat>& weights,
51 gzUInt32 seed, gzUInt32 epoch);
52
68 CTX_EXPORT gzBool applyGroupedCycleOrder(const gzArray<gzUInt32>& sampleGroups,
69 gzArray<gzUInt64>& groupPositions, gzUInt32 seed = 0);
70
71
72 CTX_EXPORT ctxIndex sub(gzUInt32 index, gzUInt32 length);
73
75};
76
77
78#endif //__CTX_INDEX_H__
79
80
ctxBuffer * getIndexBuffer()
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)
ctxIndex(gzUInt32 size, gzBool randomize=TRUE)
#define CTX_EXPORT
Definition ctxBase.h:68