From b51c3a1a0db280d085f176ebd5c360d4913e8797 Mon Sep 17 00:00:00 2001 From: shimat Date: Sat, 30 Sep 2023 08:40:38 +0900 Subject: [PATCH] ActiveVarCount: bool -> int --- src/OpenCvSharp/Modules/ml/RTrees.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OpenCvSharp/Modules/ml/RTrees.cs b/src/OpenCvSharp/Modules/ml/RTrees.cs index af526f3b8..9224f2f82 100644 --- a/src/OpenCvSharp/Modules/ml/RTrees.cs +++ b/src/OpenCvSharp/Modules/ml/RTrees.cs @@ -101,7 +101,7 @@ public bool CalculateVarImportance /// The size of the randomly selected subset of features at each tree node /// and that are used to find the best split(s). /// - public bool ActiveVarCount + public int ActiveVarCount { get { @@ -109,13 +109,13 @@ public bool ActiveVarCount NativeMethods.HandleException( NativeMethods.ml_RTrees_getActiveVarCount(ptr, out var ret)); GC.KeepAlive(this); - return ret != 0; + return ret; } set { ThrowIfDisposed(); NativeMethods.HandleException( - NativeMethods.ml_RTrees_setActiveVarCount(ptr, value ? 1 : 0)); + NativeMethods.ml_RTrees_setActiveVarCount(ptr, value)); GC.KeepAlive(this); } }