Add shuffling support to datastore
matlab.io.datastore.Shuffleable is an abstract mixin class that
adds support for shuffling samples in a datastore in random order.
To use this mixin class, you must inherit from the
matlab.io.datastore.Shuffleable class, in addition to inheriting
matlab.io.Datastore base class. Type the following syntax as the first line
of your class definition file:
classdef MyDatastore < matlab.io.Datastore & ... matlab.io.datastore.Shuffleable ... end
To add support for shuffling to your custom datastore, you must:
Inherit from the additional class
Define this additional method:
For more details and steps to create your custom datastore, see Develop Custom Datastore.
|Return a shuffled version of a datastore|
For information on class attributes, see Class Attributes.
Handle. To learn how handle classes affect copy operations, see Copying Objects.