Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
084835ec
Commit
084835ec
authored
Sep 18, 2014
by
Benoit Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing a line where integer data was treated as floating point data.
parent
26fd37b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
gbt.cpp
modules/ml/src/gbt.cpp
+3
-1
No files found.
modules/ml/src/gbt.cpp
View file @
084835ec
...
...
@@ -10,6 +10,8 @@ using namespace std;
#define CV_CMP_FLOAT(a,b) ((a) < (b))
static
CV_IMPLEMENT_QSORT_EX
(
icvSortFloat
,
float
,
CV_CMP_FLOAT
,
float
)
#define CV_CMP_INT(a,b) ((a) < (b))
static
CV_IMPLEMENT_QSORT_EX
(
icvSortInt
,
int
,
CV_CMP_INT
,
int
)
//===========================================================================
static
string
ToString
(
int
i
)
...
...
@@ -282,6 +284,7 @@ CvGBTrees::train( const CvMat* _train_data, int _tflag,
sample_idx
=
cvCreateMat
(
1
,
sample_idx_len
,
CV_32S
);
for
(
int
i
=
0
;
i
<
sample_idx_len
;
++
i
)
sample_idx
->
data
.
i
[
i
]
=
_sample_idx
->
data
.
i
[
i
];
icvSortInt
(
sample_idx
->
data
.
i
,
sample_idx_len
,
0
);
}
break
;
case
CV_8S
:
case
CV_8U
:
...
...
@@ -298,7 +301,6 @@ CvGBTrees::train( const CvMat* _train_data, int _tflag,
}
break
;
default
:
CV_Error
(
CV_StsUnmatchedFormats
,
"_sample_idx should be a 32sC1, 8sC1 or 8uC1 vector."
);
}
icvSortFloat
(
sample_idx
->
data
.
fl
,
sample_idx_len
,
0
);
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment