⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 showlm.cpp

📁 C++编写的机器学习算法 Lemga is a C++ package which consists of classes for several learning models and gener
💻 CPP
字号:
#include <iostream>#include <fstream>#include <lemga/object.h>// Though we don't need other LEMGA header files here, we do// need to link all modules.bool show_lm (std::istream& is) {    /* load the model */    Object *p = Object::create(is);    if (p == 0) return false;    std::cout << "File loaded:\n" << *p;    delete p;    return true;}int main (unsigned int argc, char* argv[]) {    bool ok;    if (argc < 2) ok = show_lm(std::cin);    else {        std::ifstream fr(argv[1]);        ok = show_lm(fr);        fr.close();    }    if (!ok)        std::cerr << argv[0] << ": model load error\n";    return !ok;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -