meeting some problem in pseudo code
I am converting a pseudo code which call greedy string tilling..and the pseudo code is
Greedy-String-Tiling(sToken,tToken)
{
tiles={};
do
{
searchLength=MinML;
matches={};
开发者_JAVA百科 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;
}
so, may i know what is meant by tiles={} and matches={}?? thanks..
I'm not familiar with that pseudocode "dialect", but I would assume that tiles={} and matches={} means to initialize these variables as new, empty sets/collections.
精彩评论