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

Remove all using directives for STL namespace and members

Made all STL usages explicit to be able automatically find all usages of
particular class or function.
This commit is contained in:
Andrey Kamaev
2013-02-24 20:14:01 +04:00
parent f783f34e0b
commit 2a6fb2867e
310 changed files with 5744 additions and 5964 deletions
+3 -3
View File
@@ -99,7 +99,7 @@ bool EM::trainE(InputArray samples,
OutputArray probs)
{
Mat samplesMat = samples.getMat();
vector<Mat> covs0;
std::vector<Mat> covs0;
_covs0.getMatVector(covs0);
Mat means0 = _means0.getMat(), weights0 = _weights0.getMat();
@@ -156,7 +156,7 @@ bool EM::isTrained() const
static
void checkTrainData(int startStep, const Mat& samples,
int nclusters, int covMatType, const Mat* probs, const Mat* means,
const vector<Mat>* covs, const Mat* weights)
const std::vector<Mat>* covs, const Mat* weights)
{
// Check samples.
CV_Assert(!samples.empty());
@@ -244,7 +244,7 @@ void preprocessProbability(Mat& probs)
void EM::setTrainData(int startStep, const Mat& samples,
const Mat* probs0,
const Mat* means0,
const vector<Mat>* covs0,
const std::vector<Mat>* covs0,
const Mat* weights0)
{
clear();
+2 -17
View File
@@ -1,26 +1,13 @@
#include "precomp.hpp"
#include <string>
#include <time.h>
using namespace std;
#define pCvSeq CvSeq*
#define pCvDTreeNode CvDTreeNode*
#define CV_CMP_FLOAT(a,b) ((a) < (b))
static CV_IMPLEMENT_QSORT_EX( icvSortFloat, float, CV_CMP_FLOAT, float)
//===========================================================================
static string ToString(int i)
{
stringstream tmp;
tmp << i;
return tmp.str();
}
//===========================================================================
//----------------------------- CvGBTreesParams -----------------------------
//===========================================================================
@@ -1143,8 +1130,7 @@ void CvGBTrees::write( CvFileStorage* fs, const char* name ) const
for ( int j=0; j < class_count; ++j )
{
s = "trees_";
s += ToString(j);
s = cv::format("trees_%d", j);
cvStartWriteStruct( fs, s.c_str(), CV_NODE_SEQ );
cvStartReadSeq( weak[j], &reader );
@@ -1197,8 +1183,7 @@ void CvGBTrees::read( CvFileStorage* fs, CvFileNode* node )
for (int j=0; j<class_count; ++j)
{
s = "trees_";
s += ToString(j);
s = cv::format("trees_%d", j);
trees_fnode = cvGetFileNodeByName( fs, node, s.c_str() );
if( !trees_fnode || !CV_NODE_IS_SEQ(trees_fnode->tag) )
+2 -2
View File
@@ -2181,7 +2181,7 @@ CvDTreeSplit* CvDTree::find_split_cat_class( CvDTreeNode* node, int vi, float in
int base_size = m*(3 + mi)*sizeof(int) + (mi+1)*sizeof(double);
if( m > 2 && mi > data->params.max_categories )
base_size += (m*min(data->params.max_categories, n) + mi)*sizeof(int);
base_size += (m*std::min(data->params.max_categories, n) + mi)*sizeof(int);
else
base_size += mi*sizeof(int*);
cv::AutoBuffer<uchar> inn_buf(base_size);
@@ -3300,7 +3300,7 @@ void CvDTree::split_node_data( CvDTreeNode* node )
data->free_node_data(node);
}
float CvDTree::calc_error( CvMLData* _data, int type, vector<float> *resp )
float CvDTree::calc_error( CvMLData* _data, int type, std::vector<float> *resp )
{
float err = 0;
const CvMat* values = _data->get_values();