本文整理汇总了C++中Series::size方法的典型用法代码示例。如果您正苦于以下问题:C++ Series::size方法的具体用法?C++ Series::size怎么用?C++ Series::size使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Series
的用法示例。
在下文中一共展示了Series::size方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: readData
void readData()
{
//percorrendo
list<double>::iterator it;
for(int i = 0; i < mySeries.size(); i++)
{
cout <<"serie " << i<<endl;
for(it = mySeries[i].begin(); it != mySeries[i].end(); it++)
{
cout << *it << " ";
}
cout << endl;
}
for(int i = 0; i < templateSeries.size(); i++)
{
cout <<"serie " << i<<endl;
for(it = templateSeries[i].begin(); it != templateSeries[i].end(); it++)
{
cout << *it << " ";
}
cout << endl;
}
}
示例2: DTW
void DTW()
{
int myBestClass;
double myMinDbl, myDbl;
int totalHits, correctClass;
list<double>::iterator it;
totalHits = 0;
//uncoment do get graph data
//cout << " Error at: \n Serie number | Class Estimated | Correct Class " << endl;
//series a serem testadas
for(int k = 0; k < mySeries.size()-1; k++)
{
myMinDbl = INFINITY;
//series templates
for(int i = 0; i < templateSeries.size() -1; i++)
{
myDbl = calcDTW(k, i);
if(myDbl < myMinDbl)
{
it = templateSeries[i].begin();
myBestClass = *it;
myMinDbl = myDbl;
}
}
it = mySeries[k].begin();
correctClass = *it;
if(myBestClass == correctClass)totalHits++;
// else cout << k << " " << myBestClass << " " << correctClass << endl;
}
cout <<"Total de Séries: "<< mySeries.size() -1 <<"\nacertos: " << totalHits <<" -> "
<< std::setprecision(5)<< (totalHits * 100.0)/(mySeries.size() -1) << "%" <<endl;
}