【发布时间】: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