1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Fix compilation problems with XCode 7.1.1 and cmake 3.3.2

This commit is contained in:
Maksim Shabunin
2015-11-16 18:07:24 +03:00
parent 01b5971c94
commit eebd4cad66
16 changed files with 82 additions and 63 deletions
+2 -2
View File
@@ -1880,7 +1880,7 @@ bool CvSVM::train_auto( const CvMat* _train_data, const CvMat* _responses,
qsort(ratios, k_fold, sizeof(ratios[0]), icvCmpIndexedratio);
double old_dist = 0.0;
for (int k=0; k<k_fold; ++k)
old_dist += abs(ratios[k].val-class_ratio);
old_dist += std::abs(ratios[k].val-class_ratio);
double new_dist = 1.0;
// iterate to make the folds more balanced
while (new_dist > 0.0)
@@ -1897,7 +1897,7 @@ bool CvSVM::train_auto( const CvMat* _train_data, const CvMat* _responses,
qsort(ratios, k_fold, sizeof(ratios[0]), icvCmpIndexedratio);
new_dist = 0.0;
for (int k=0; k<k_fold; ++k)
new_dist += abs(ratios[k].val-class_ratio);
new_dist += std::abs(ratios[k].val-class_ratio);
if (new_dist < old_dist)
{
// swapping really improves, so swap the samples