/// <summary> /// Returns all the splits. /// all the split indices are indices in the returned vector /// </summary> /// <returns></returns> public Split[] GetSplits() { if (ptr == IntPtr.Zero) { throw new ObjectDisposedException(GetType().Name); } using var vector = new VectorOfDTreesSplit(); NativeMethods.HandleException( NativeMethods.ml_DTrees_getSplits(ptr, vector.CvPtr)); GC.KeepAlive(this); return(vector.ToArray()); }
/// <summary> /// Returns all the splits. /// all the split indices are indices in the returned vector /// </summary> /// <returns></returns> public Split[] GetSplits() { if (ptr == IntPtr.Zero) throw new ObjectDisposedException(GetType().Name); using (var vector = new VectorOfDTreesSplit()) { NativeMethods.ml_DTrees_getSplits(ptr, vector.CvPtr); return vector.ToArray(); } }