我正在转换一个伪代码,它调用greedy string tilling ..而伪代码是
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)
matches=matches?match(s,t,j);
elseif(j>searchLength)
{
matches={match(s,t,j)};
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 = {}的含义吗?感谢..
答案 0 :(得分:1)
我不熟悉那种伪代码“方言”,但我认为tiles = {}和matches = {}意味着将这些变量初始化为新的空集/集合。