sample method

Future<List<List<num>>> sample({
  1. int sampleSize = 100,
})

Returns an object of type List<List<num>> with length sampleSize. Each entry is obtained by listing the current position and energy.

Implementation

Future<List<List<num>>> sample({
  int sampleSize = 100,
}) async =>
    List<List<num>>.generate(sampleSize, (_) {
      next();
      return [..._position, _value];
    });