【问题标题】:Some problems understanding pseudo code理解伪代码的一些问题
【发布时间】:2011-03-14 14:44:16
【问题描述】:

最近我的作业遇到了一些问题 有高手能告诉我以下伪代码中的 set tiles={} 是什么意思吗?

这就是我所拥有的:

Greedy-String-Tiling(sToken,tToken)   
{   
  tiles={};   
  do  
  {   
    searchLength=MinML;   
    matches={};   

    ForallunmarkedtokenssTokensinsToken   
    {   
      ForallunmarkedtokensintTokensintToken   
      {   
        j=0;   
        while(sToken+j==tToken+j&&unmarked(sToken+j)&&unmarked(tToken+j))   
        j++;   

        if(j==searchLength)   
          [B]matches=matches?match(s,t,j);[/B]      
        elseif(j>searchLength)   
        {   
          [B]matches={match(s,t,j)};[/B]   
          searchLength=j;   
        }   
      }   
    }   
    Forallmatch(s,t,searchLength)?matches   
    {   
      Forj=0...(searchLength 1)   
      {   
        mark(sFiles+j);   
        mark(tFilet+j);   
      }   

      tiles=tiles?match(s,t,searchLength);   
    }   
  }while(searchLength>MinML);   

  returntiles;   
}   

我希望知道tiles={}matches={}是什么意思。

【问题讨论】:

  • 我将其标记为“家庭作业”,正如您所说的这是一项作业。如果不是这种情况,请删除标签。
  • 我删除了“vba”标签并添加了“伪代码”

标签: pseudocode


【解决方案1】:

伪代码应该易于阅读和理解。这很难被称为 pseudocode,尽管它本来就是这样的。总之,tiles={}matches={} 在这里是 setsarrays

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-06-13
    • 1970-01-01
    • 2011-03-28
    • 1970-01-01
    • 1970-01-01
    • 2015-11-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多