本文整理汇总了C++中ParseTree::getAppearaceX方法的典型用法代码示例。如果您正苦于以下问题:C++ ParseTree::getAppearaceX方法的具体用法?C++ ParseTree::getAppearaceX怎么用?C++ ParseTree::getAppearaceX使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParseTree
的用法示例。
在下文中一共展示了ParseTree::getAppearaceX方法的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();
}