当前位置: 首页>>代码示例>>C++>>正文


C++ Cone::deactivateChangeOfPrecision方法代码示例

本文整理汇总了C++中Cone::deactivateChangeOfPrecision方法的典型用法代码示例。如果您正苦于以下问题:C++ Cone::deactivateChangeOfPrecision方法的具体用法?C++ Cone::deactivateChangeOfPrecision怎么用?C++ Cone::deactivateChangeOfPrecision使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Cone的用法示例。


在下文中一共展示了Cone::deactivateChangeOfPrecision方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: exit

template<typename Integer> int process_data(OptionsHandler& options) {

#ifndef NCATCH
    try {
#endif

    Output<Integer> Out;    //all the information relevant for output is collected in this object

    options.applyOutputOptions(Out);

    string name_in=options.getOutputName()+".in";
    const char* file_in=name_in.c_str();
    ifstream in;
    in.open(file_in,ifstream::in);
    if ( !in.is_open() ) {
        cerr << "error: Failed to open file "<<name_in<<"."<<endl;
        exit(1);
    }

    //read the file
    map <Type::InputType, vector< vector<Integer> > > input = readNormalizInput<Integer>(in, options);

    options.activateDefaultMode(); // only if no real cone property is given!

    Out.set_lattice_ideal_input(input.count(Type::lattice_ideal)>0);

    in.close();

    if (verbose) {
        cout << "************************************************************" << endl;
        cout << "Compute: " << options.getToCompute() << endl;
    }

    Cone<Integer> MyCone = Cone<Integer>(input);
    if (options.isUseBigInteger()) {
        MyCone.deactivateChangeOfPrecision();
    }
//    MyCone.compute(ConeProperty::HilbertBasis,ConeProperty::HilbertSeries));
    try {
        MyCone.compute(options.getToCompute());
    } catch(const NotComputableException& ) {
        std::cout << "Not all desired properties could be computed." << endl;
        std::cout << "Writing only available data." << endl;
    }
    Out.setCone(MyCone);
    Out.write_files();

#ifndef NCATCH
    } catch(const BadInputException& ) {
        cerr << "BadInputException caught... exiting." << endl;
        exit(1);
    } catch(const FatalException& e) {
        cerr << e.what() << endl;
        cerr << "FatalException caught... exiting." << endl;
        exit(2);
    } catch(const NormalizException& ) {
        cerr << "NormalizException caught... exiting." << endl;
        exit(3);
    } catch(const std::exception& e) {
        cerr << "std::exception caught... \""<< e.what()<<"\" ...  exiting." << endl;
        exit(4);
    }
#endif

    return 0;
}
开发者ID:fingolfin,项目名称:Normaliz,代码行数:66,代码来源:Normaliz.cpp


注:本文中的Cone::deactivateChangeOfPrecision方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。