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


C++ ParseTree::getDeformationSet方法代码示例

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


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

示例1: swap

void ParseTree::swap(ParseTree & pt)
{
    if ( this == &pt ) {
        return;
    }

    clear();

    nodeSet_.swap(pt.getNodeSet());

    edgeSet_.swap(pt.getEdgeSet());

    /*nodeSet_.resize(pt.nodeSet().size(), NULL);
    for ( int i = 0; i < nodeSet_.size(); ++i ) {
    	nodeSet_[i] = new PtNode(*pt.nodeSet()[i]);
    }

    edgeSet_.resize(pt.edgeSet().size(), NULL);
    for ( int i = 0; i < edgeSet_.size(); ++i ) {
    	edgeSet_[i] = new PtEdge(*pt.edgeSet()[i]);
    }*/

    idxRootNode_ = pt.idxRootNode();

    g_ = pt.grammar();

    appearanceSet_.swap(pt.getAppearanceSet());
    biasSet_.swap(pt.getBiasSet());
    deformationSet_.swap(pt.getDeformationSet());
    scalepriorSet_.swap(pt.getScalepriorSet());
    parseInfoSet_.swap(pt.getParseInfoSet());
    appUsage_.swap(pt.getAppUsage());

    /*appearanceSet_.resize(pt.appearanceSet().size(), NULL);
    for ( int i = 0; i < appearanceSet_.size(); ++i ) {
    	appearanceSet_[i] = new Appearance::Param(*pt.appearanceSet()[i]);
    }

    biasSet_ = pt.biasSet();

    deformationSet_.resize(pt.deformationSet().size(), NULL);
    for ( int i = 0; i < deformationSet_.size(); ++i ) {
    	deformationSet_[i] = new Deformation::Param(*pt.deformationSet()[i]);
    }

    scalepriorSet_.resize(pt.scalepriorSet().size(), NULL);
    for ( int i = 0; i < scalepriorSet_.size(); ++i ) {
    	scalepriorSet_[i] = new Scaleprior::Param(*pt.scalepriorSet()[i]);
    }

    parseInfoSet_.resize(pt.parseInfoSet().size(), NULL);
    for ( int i = 0; i < parseInfoSet_.size(); ++i ) {
    	parseInfoSet_[i] = new ParseInfo(*pt.parseInfoSet()[i]);
    }

    appUsage_ = pt.appUsage();*/

    if (pt.states() != NULL ) {
        //states_ = new States(*pt.states());
        std::swap(states_, pt.getStates());
    }

    dataId_ = pt.dataId();

    if ( pt.appearaceX() != NULL ) {
        std::swap(appearanceX_, pt.getAppearaceX());
    }

    imgWd_ = pt.imgWd();
    imgHt_ = pt.imgHt();
}
开发者ID:LHY20,项目名称:AOGDetector,代码行数:71,代码来源:ParseTree.cpp


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