Esempio n. 1
0
        /// <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());
            }
        }
Esempio n. 2
0
        /// <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());
        }
Esempio n. 3
0
        /// <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();
            }
        }