Skip to content

Commit

Permalink
Merge pull request #1612 from shimat/fix_RTreesActiveVarCount
Browse files Browse the repository at this point in the history
RTrees.ActiveVarCount: bool -> int
  • Loading branch information
shimat authored Sep 30, 2023
2 parents b53a92e + b51c3a1 commit 1b75869
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/OpenCvSharp/Modules/ml/RTrees.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,21 +101,21 @@ 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).
/// </summary>
public bool ActiveVarCount
public int ActiveVarCount
{
get
{
ThrowIfDisposed();
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);
}
}
Expand Down

0 comments on commit 1b75869

Please sign in to comment.