matlab.io.datastore.Shuffleable - Add shuffling support to datastore - MATLAB (original) (raw)
Main Content
Namespace: matlab.io.datastore
Add shuffling support to datastore
Description
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 thematlab.io.datastore.Shuffleable
class, in addition to inheriting from the 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
matlab.io.datastore.Shuffleable
. - Define this additional method: shuffle.
For more details and steps to create your custom datastore, see Develop Custom Datastore.
Methods
shuffle | Return a shuffled version of a datastore |
---|
Copy Semantics
Handle. To learn how handle classes affect copy operations, see Copying Objects.
Version History
Introduced in R2018a