randShuffleAsync function

Future<Mat> randShuffleAsync(
  1. InputOutputArray dst, {
  2. double iterFactor = 1,
  3. Rng? rng,
})

RandShuffle Shuffles the array elements randomly.

For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga6a789c8a5cb56c6dd62506179808f763

Implementation

Future<Mat> randShuffleAsync(
  InputOutputArray dst, {
  double iterFactor = 1,
  Rng? rng,
}) async {
  if (rng == null) {
    return cvRunAsync0(
      (callback) => ccore.cv_randShuffle(dst.ref, callback),
      (c) {
        return c.complete(dst);
      },
    );
  } else {
    return cvRunAsync0(
      (callback) => ccore.cv_randShuffle_1(dst.ref, iterFactor, rng.ref, callback),
      (c) {
        return c.complete(dst);
      },
    );
  }
}