docs/apis/DataBlock_en.md
DataBlock is a base class of data block management and storage; it provides a basic data access interface, suitable for the write once, read multiple times scenario (for example, storing and accessing training data set)
DataBlock can be viewed as an "array" that can grow dynamically, where newly added objects can only be appended to the end of the array; it maintains read/write index information internally. Angel implemented 3 basic interfaces for different data storage media:
registerType
void registerType(Class<VALUE> valueClass)read
VALUE read()loopingRead
VALUE loopingRead()read; if it reaches the end, calls resetIndex and restarts from the beginning position to ensure reading a valueget
VALUE get(int index)MemoryDataBlock; doesn't modify the read indexput
void put(VALUE value)resetReadIndex
void resetReadIndex()read will start from the beginning position of DataBlockclean
void clean()shuffle
void shuffle()MemoryDataBlock interface