コード例 #1
0
ファイル: trie_tree.cpp プロジェクト: sunnyss12/algorithm
 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;
 }
コード例 #2
0
ファイル: qgsgcplist.cpp プロジェクト: AlisterH/Quantum-GIS
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++;
    }
  }
}
コード例 #3
0
ファイル: trie_tree.cpp プロジェクト: sunnyss12/algorithm
 /*输出字典树单词的总个数,包含重复字符串*/
 int sizeAll()
 {
     sizeAll(root);
 }