VecMat.generate constructor
Implementation
factory VecMat.generate(int length, Mat Function(int i) generator, {bool dispose = true}) {
final pp = calloc<ccore.VecMat>()..ref.length = length;
pp.ref.ptr = calloc<ccore.Mat>(length);
for (var i = 0; i < length; i++) {
final v = generator(i);
pp.ref.ptr[i] = v.ref;
if (dispose) v.dispose();
}
return VecMat.fromPointer(pp);
}