/// <summary> /// Returns all the nodes. /// all the node indices are indices in the returned vector /// </summary> public Node[] GetNodes() { if (ptr == IntPtr.Zero) { throw new ObjectDisposedException(GetType().Name); } using (var vector = new VectorOfDTreesNode()) { NativeMethods.ml_DTrees_getNodes(ptr, vector.CvPtr); return(vector.ToArray()); } }
/// <summary> /// Returns all the nodes. /// all the node indices are indices in the returned vector /// </summary> public Node[] GetNodes() { if (ptr == IntPtr.Zero) { throw new ObjectDisposedException(GetType().Name); } using var vector = new VectorOfDTreesNode(); NativeMethods.HandleException( NativeMethods.ml_DTrees_getNodes(ptr, vector.CvPtr)); GC.KeepAlive(this); return(vector.ToArray()); }
/// <summary> /// Returns all the nodes. /// all the node indices are indices in the returned vector /// </summary> public Node[] GetNodes() { if (ptr == IntPtr.Zero) throw new ObjectDisposedException(GetType().Name); using (var vector = new VectorOfDTreesNode()) { NativeMethods.ml_DTrees_getNodes(ptr, vector.CvPtr); return vector.ToArray(); } }