This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

matlab.io.datastore.Shuffleable class

Package: 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 the matlab.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

shuffleReturn a shuffled version of a datastore

Attributes

Abstracttrue
Sealedfalse

For information on class attributes, see Class Attributes.

Copy Semantics

Handle. To learn how handle classes affect copy operations, see Copying Objects.

Introduced in R2018a