本文整理汇总了C++中ModelType::info方法的典型用法代码示例。如果您正苦于以下问题:C++ ModelType::info方法的具体用法?C++ ModelType::info怎么用?C++ ModelType::info使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModelType
的用法示例。
在下文中一共展示了ModelType::info方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: viewmodel
void viewmodel(ModelType & model, ClassDecoder * classdecoder, ClassEncoder * classencoder, bool print, bool report, bool nocoverage, bool histogram , bool query, const string dorelations, bool doinstantiate, bool info, bool printreverseindex, int cooc, double coocthreshold = 0.1) {
cerr << "Generating desired views..." << endl;
if (print) {
if (classdecoder == NULL) {
cerr << "ERROR: Unable to print model, no class file specified (--classfile)" << endl;
} else {
model.print(&cout, *classdecoder, doinstantiate);
}
}
if (printreverseindex) {
model.printreverseindex(&cout, *classdecoder);
}
if (report) {
model.report(&cout, nocoverage);
}
if (histogram) {
model.histogram(&cout);
}
if (cooc == 2) {
model.outputcooc_npmi(&cout, *classdecoder,coocthreshold);
} else if (cooc == 1) {
model.outputcooc(&cout, *classdecoder,coocthreshold);
}
if (query) {
if (classencoder == NULL) {
cerr << "ERROR: Unable to query model, no class encoder specified (--classfile)" << endl;
} else {
querymodel<ModelType>(model, classencoder, classdecoder, dorelations, doinstantiate);
}
} else if (!dorelations.empty()) {
bool first = true;
for (typename ModelType::iterator iter = model.begin(); iter != model.end(); iter++) {
cout << iter->first.tostring(*classdecoder) << endl;
const PatternPointer pp = iter->first;
model.outputrelations(pp, *classdecoder, &cout, dorelations == "all" ? "" : dorelations,first);
first = false;
}
}
if (info) {
model.info(&cout);
}
}