本文整理汇总了C++中Params::check方法的典型用法代码示例。如果您正苦于以下问题:C++ Params::check方法的具体用法?C++ Params::check怎么用?C++ Params::check使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Params
的用法示例。
在下文中一共展示了Params::check方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, const char **argv){
if( argc<5 ){
usage(cerr);
return 1;
}
try{
Params params;
set_params( argc, argv, params );
params.check();
K_Clust c( ¶ms );
if (params.profile_query){
std::cerr << "Preprocessing...\n";
c.prepare();
std::cerr << "done.\n";
}
Chronometer chron;
chron.start();
c.cluster();
// c.kDP_benchmark_scop_tpfp();
float cl_seconds = chron.getSnapShotSeconds();
cerr << "Runtime for representatives: " << cl_seconds << " seconds" << endl;
c.write_representatives_db();
float wrep_seconds = chron.getSnapShotSeconds();
cerr << "Runtime for write representatives: " << wrep_seconds - cl_seconds << " seconds" << endl;
c.write_dmp_files();
float wdmp_seconds = chron.getSnapShotSeconds();
cerr << "Runtime for write dmp files: " << wdmp_seconds - wrep_seconds << " seconds" << endl;
// c.write_debug_files((params.get_working_dir() +"debug.dat").c_str());
// float wdebug_seconds = chron.getSnapShotSeconds();
// cerr << "Runtime for write debug files: " << wdebug_seconds - wdmp_seconds << " seconds" << endl;
if( params.refinement ){
cerr << "Perform refinement" << endl;
c.refine();
cerr << "Runtime for refinement: " << chron.getSnapShotSeconds()-wdmp_seconds << " seconds" << endl;
}
//cerr << "After refinement - before free tables" << endl;
c.free_tables_seedlists_kmeraln();
if( params.refinement ){
//cerr << "Write refined nodes" << endl;
c.write_refined_nodes_dmp();
}
//cerr << "write debug files" << endl;
// c.write_debug_files( (params.get_working_dir() +"debug_refined.dat").c_str() );
//cerr << "cleanup tmp-files" << endl;
c.cleanup_tmp_files();
//cerr << "Print time" << endl;
chron.stop();
chron.print_time( std::cerr );
}catch(const std::exception &e){
std::cerr << std::endl << ">" << std::endl;
std::cerr << "ERROR: " << e.what() << std::endl;
std::cerr << ">" << std::endl;
return 3;
}
return 0;
}