splits property
List<DTreesSplit>
get
splits
All the splits of the trees, referenced by DTreesNode.split and DTreesSplit.next.
Implementation
List<DTreesSplit> get splits {
final count = calloc<ffi.Int>();
try {
cvRun(() => cml.cv_ml_RTrees_getSplits(ref, ffi.nullptr, 0, count));
final n = count.value;
final buf = calloc<cml.MlDTreesSplit>(n);
try {
cvRun(() => cml.cv_ml_RTrees_getSplits(ref, buf, n, count));
return List.generate(n, (i) {
final e = buf[i];
return DTreesSplit(
varIdx: e.varIdx,
inversed: e.inversed,
quality: e.quality,
next: e.next,
c: e.c,
subsetOfs: e.subsetOfs,
);
});
} finally {
calloc.free(buf);
}
} finally {
calloc.free(count);
}
}