int sizeAll(node_type& cur) { int size = cur.freq; for(int i=0;i < Size; ++i) { if(cur.child[i] == 0) continue; size += sizeAll(*cur.child[i]); } return size; }
void QgsGCPList::createGCPVectors( QVector<QgsPointXY> &mapCoords, QVector<QgsPointXY> &pixelCoords ) { mapCoords = QVector<QgsPointXY>( size() ); pixelCoords = QVector<QgsPointXY>( size() ); for ( int i = 0, j = 0; i < sizeAll(); i++ ) { QgsGeorefDataPoint *pt = at( i ); if ( pt->isEnabled() ) { mapCoords[j] = pt->mapCoords(); pixelCoords[j] = pt->pixelCoords(); j++; } } }
/*输出字典树单词的总个数,包含重复字符串*/ int sizeAll() { sizeAll(root); }