コード例 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="n"></param>
        /// <returns></returns>
#else
        /// <summary>
        ///
        /// </summary>
        /// <param name="n"></param>
        /// <returns></returns>
#endif
        public virtual int GetChildBufIdx(CvDTreeNode n)
        {
            if (disposed)
            {
                throw new ObjectDisposedException("CvDTreeTrainData");
            }
            if (n == null)
            {
                throw new ArgumentNullException(nameof(n));
            }

            return(NativeMethods.ml_CvDTreeTrainData_get_child_buf_idx(ptr, n.CvPtr));
        }
コード例 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="n"></param>
        /// <param name="vi"></param>
        /// <param name="ordValuesBuf"></param>
        /// <param name="sortedIndicesBuf"></param>
        /// <param name="ordValues"></param>
        /// <param name="sortedIndices"></param>
        /// <param name="sampleIndicesBuf"></param>
#else
        /// <summary>
        ///
        /// </summary>
        /// <param name="n"></param>
        /// <param name="vi"></param>
        /// <param name="ordValuesBuf"></param>
        /// <param name="sortedIndicesBuf"></param>
        /// <param name="ordValues"></param>
        /// <param name="sortedIndices"></param>
        /// <param name="sampleIndicesBuf"></param>
#endif
        public virtual void GetOrdVarData(
            CvDTreeNode n, int vi, float[] ordValuesBuf, int[] sortedIndicesBuf,
            float[][] ordValues, int[][] sortedIndices, int[] sampleIndicesBuf)
        {
            if (disposed)
            {
                throw new ObjectDisposedException("CvDTreeTrainData");
            }
            if (n == null)
            {
                throw new ArgumentNullException(nameof(n));
            }

            NativeMethods.ml_CvDTreeTrainData_get_ord_var_data(ptr, n.CvPtr, vi, ordValuesBuf, sortedIndicesBuf, ordValues, sortedIndices, sampleIndicesBuf);
        }
コード例 #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="n"></param>
        /// <param name="vi"></param>
        /// <param name="catValuesBuf"></param>
        /// <returns></returns>
#else
        /// <summary>
        ///
        /// </summary>
        /// <param name="n"></param>
        /// <param name="vi"></param>
        /// <param name="catValuesBuf"></param>
        /// <returns></returns>
#endif
        public virtual PointerAccessor1D_Int32 GetCatVarData(
            CvDTreeNode n, int vi, int[] catValuesBuf)
        {
            if (disposed)
            {
                throw new ObjectDisposedException("CvDTreeTrainData");
            }
            if (n == null)
            {
                throw new ArgumentNullException(nameof(n));
            }

            IntPtr p = NativeMethods.ml_CvDTreeTrainData_get_cat_var_data(ptr, n.CvPtr, vi, catValuesBuf);

            return(new PointerAccessor1D_Int32(p));
        }
コード例 #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="n"></param>
        /// <param name="labelsBuf"></param>
        /// <returns></returns>
#else
        /// <summary>
        ///
        /// </summary>
        /// <param name="n"></param>
        /// <param name="labelsBuf"></param>
        /// <returns></returns>
#endif
        public virtual PointerAccessor1D_Int32 GetLabels(
            CvDTreeNode n, int[] labelsBuf)
        {
            if (disposed)
            {
                throw new ObjectDisposedException("CvDTreeTrainData");
            }
            if (n == null)
            {
                throw new ArgumentNullException(nameof(n));
            }

            IntPtr p = NativeMethods.ml_CvDTreeTrainData_get_cv_labels(ptr, n.CvPtr, labelsBuf);

            return(new PointerAccessor1D_Int32(p));
        }
コード例 #5
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="n"></param>
        /// <param name="valuesBuf"></param>
        /// <param name="sampleIndicesBuf"></param>
        /// <returns></returns>
#else
        /// <summary>
        ///
        /// </summary>
        /// <param name="n"></param>
        /// <param name="valuesBuf"></param>
        /// <param name="sampleIndicesBuf"></param>
        /// <returns></returns>
#endif
        public virtual PointerAccessor1D_Single GetOrdResponses(
            CvDTreeNode n, float[] valuesBuf, int[] sampleIndicesBuf)
        {
            if (disposed)
            {
                throw new ObjectDisposedException("CvDTreeTrainData");
            }
            if (n == null)
            {
                throw new ArgumentNullException(nameof(n));
            }

            IntPtr p = NativeMethods.ml_CvDTreeTrainData_get_ord_responses(ptr, n.CvPtr, valuesBuf, sampleIndicesBuf);

            return(new PointerAccessor1D_Single(p));
        }
コード例 #6
0
        /// <summary>
        /// 
        /// </summary>
		/// <param name="n"></param>
        /// <returns></returns>
#else
		/// <summary>
        /// 
		/// </summary>
		/// <param name="n"></param>
        /// <returns></returns>
#endif
		public virtual int GetChildBufIdx(CvDTreeNode n)
		{
            if (disposed)
                throw new ObjectDisposedException("CvDTreeTrainData"); 
			if (n == null)
			    throw new ArgumentNullException("n");

            return NativeMethods.ml_CvDTreeTrainData_get_child_buf_idx(ptr, n.CvPtr);
		}
コード例 #7
0
        /// <summary>
        /// 
        /// </summary>
		/// <param name="n"></param>
		/// <param name="vi"></param>
        /// <param name="ordValuesBuf"></param>
        /// <param name="sortedIndicesBuf"></param>
        /// <param name="ordValues"></param>
        /// <param name="sortedIndices"></param>
        /// <param name="sampleIndicesBuf"></param>
#else
        /// <summary>
        /// 
		/// </summary>
		/// <param name="n"></param>
		/// <param name="vi"></param>
        /// <param name="ordValuesBuf"></param>
        /// <param name="sortedIndicesBuf"></param>
        /// <param name="ordValues"></param>
        /// <param name="sortedIndices"></param>
        /// <param name="sampleIndicesBuf"></param>
#endif
        public virtual void GetOrdVarData(
            CvDTreeNode n, int vi, float[] ordValuesBuf, int[] sortedIndicesBuf, 
            float[][] ordValues, int[][] sortedIndices, int[] sampleIndicesBuf)
		{
            if (disposed)
                throw new ObjectDisposedException("CvDTreeTrainData");
            if (n == null)
                throw new ArgumentNullException("n");

            NativeMethods.ml_CvDTreeTrainData_get_ord_var_data(ptr, n.CvPtr, vi, ordValuesBuf, sortedIndicesBuf, ordValues, sortedIndices, sampleIndicesBuf);	
		}
コード例 #8
0
        /// <summary>
        /// 
        /// </summary>
		/// <param name="n"></param>
		/// <param name="vi"></param>
        /// <param name="catValuesBuf"></param>
        /// <returns></returns>
#else
        /// <summary>
        /// 
		/// </summary>
		/// <param name="n"></param>
		/// <param name="vi"></param>
        /// <param name="catValuesBuf"></param>
        /// <returns></returns>
#endif
        public virtual PointerAccessor1D_Int32 GetCatVarData(
            CvDTreeNode n, int vi, int[] catValuesBuf)
		{
            if (disposed)
                throw new ObjectDisposedException("CvDTreeTrainData");
            if (n == null)
                throw new ArgumentNullException("n");

            IntPtr p = NativeMethods.ml_CvDTreeTrainData_get_cat_var_data(ptr, n.CvPtr, vi, catValuesBuf);
            return new PointerAccessor1D_Int32(p);

		}
コード例 #9
0
        /// <summary>
        /// 
        /// </summary>
		/// <param name="n"></param>
        /// <param name="labelsBuf"></param>
        /// <returns></returns>
#else
        /// <summary>
        /// 
		/// </summary>
		/// <param name="n"></param>
        /// <param name="labelsBuf"></param>
        /// <returns></returns>
#endif
        public virtual PointerAccessor1D_Int32 GetLabels(
            CvDTreeNode n, int[] labelsBuf)
		{
            if (disposed)
                throw new ObjectDisposedException("CvDTreeTrainData");
            if (n == null)
                throw new ArgumentNullException("n");

            IntPtr p = NativeMethods.ml_CvDTreeTrainData_get_cv_labels(ptr, n.CvPtr, labelsBuf);
            return new PointerAccessor1D_Int32(p);
		}
コード例 #10
0
        /// <summary>
        /// 
        /// </summary>
		/// <param name="n"></param>
        /// <param name="valuesBuf"></param>
        /// <param name="sampleIndicesBuf"></param>
        /// <returns></returns>
#else
        /// <summary>
        /// 
		/// </summary>
		/// <param name="n"></param>
        /// <param name="valuesBuf"></param>
        /// <param name="sampleIndicesBuf"></param>
        /// <returns></returns>
#endif
        public virtual PointerAccessor1D_Single GetOrdResponses(
            CvDTreeNode n, float[] valuesBuf, int[] sampleIndicesBuf)
        {
            if (disposed)
                throw new ObjectDisposedException("CvDTreeTrainData");
            if (n == null)
                throw new ArgumentNullException("n");

            IntPtr p = NativeMethods.ml_CvDTreeTrainData_get_ord_responses(ptr, n.CvPtr, valuesBuf, sampleIndicesBuf);
            return new PointerAccessor1D_Single(p);
        }