本文整理汇总了C++中DataBase::valid方法的典型用法代码示例。如果您正苦于以下问题:C++ DataBase::valid方法的具体用法?C++ DataBase::valid怎么用?C++ DataBase::valid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataBase
的用法示例。
在下文中一共展示了DataBase::valid方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char *argv[]){
string cycleListFileName,dataDir;
int cycleBegin,cycleEnd;
//checking argv input
if(argc > 6){//too many arguments
cerr<<"Too many arguments.\n";
system("pause");
return -1;
}
else if(argc < 6){//too few arguments
cerr<<"Too few arguments.\n";
system("pause");
return -1;
}
else{
//data DIR
cycleListFileName = argv[1];
dataDir = argv[2];
//Set cycle range
if(atoi(argv[3])!='\0')
cycleBegin = atoi(argv[3]);
else{
cerr << "Cyclr brgin number error!";
system("pause");
return 1;
}
if(atoi(argv[4])!='\0')
cycleEnd = atoi(argv[4]);
else{
cerr << "Cycle end number error!";
system("pause");
return 1;
}
//set Segmentation number
segNum = atoi(argv[5]);
if (segNum == 1)
seg = disable;
else
seg = enable;
}
//Start File IO
// database
DataBase db;
db.init(dataDir, cycleListFileName); // use filtered files directory as working directory
if(!db.valid()){
cerr << "Database initializing failed." << endl;
system("pause");
return 1;
}
cout<<endl;
runFeatureExtraction(db,argv[3],argv[4]);
return 0;
}