Template:ClassMatrix: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<noinclude> | |||
{{{1}}} ... IDs to be searched in full digits | |||
{{{2}}} ... starting position for x-axis | |||
{{{3}}} ... ending position for x-axis | |||
{{{4}}} ... starting position for y-axis | |||
{{{5}}} ... ending position for y-axis | |||
Note. assumption {{{3}}} <= {{{4}}} | |||
</noinclude> | |||
{{#def:ALL|{{#SearchTitle:{{{1}}} }}}} | {{#def:ALL|{{#SearchTitle:{{{1}}} }}}} | ||
Line 53: | Line 61: | ||
end | end | ||
end | end | ||
strFst = string.sub(1,{{{2}}}-1); | |||
strNxt = string.sub({{{3}}}+1,{{{4}}}-1); | |||
strLst = string.sub({{{5}}}+1); | |||
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do | for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do | ||
str = x .. " <small>(" .. v .. ")</small>&&"; | str = x .. " <small>(" .. v .. ")</small>&&"; | ||
for y,v in string.gmatch(yaxis, "(%S+) (%S+)") do | for y,v in string.gmatch(yaxis, "(%S+) (%S+)") do | ||
if (M[x][y] == nil) | if (M[x][y] == nil) | ||
then str = str .. " 0"; | then str = str .. " 0 dummy"; | ||
else str = str .. " " .. M[x][y]; | else str = str .. " " .. M[x][y] .. " " .. strFst .. x .. strNxt .. y .. strLst; | ||
end | end | ||
end | end |
Revision as of 13:24, 18 December 2008
{{{1}}} ... IDs to be searched in full digits {{{2}}} ... starting position for x-axis {{{3}}} ... ending position for x-axis {{{4}}} ... starting position for y-axis {{{5}}} ... ending position for y-axis Note. assumption {{{3}}} <= {{{4}}}
{{#lua:}}! ({{{1}}} () | {{{1}}} () | for (id in stdin:gmatch("%w+") do) | {{{1}}} () | {{{1}}} () | {{{1}}} () | {{{1}}} () | end () | end () | table.sort(T); () | {{{1}}} () | {{{1}}} () | print(k (.. " " .. H[k]);) | end () | () | ()) | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{#lua:}}|- | {{{1}}} | |||||||||||||||
{{{1}}} | ||||||||||||||||
{{{1}}} | ||||||||||||||||
for id in string.gmatch(all,"(%S+)") do | ||||||||||||||||
{{{1}}} | ||||||||||||||||
{{{1}}} | ||||||||||||||||
{{{1}}} | ||||||||||||||||
{{{1}}} | ||||||||||||||||
{{{1}}} | ||||||||||||||||
{{{1}}} | ||||||||||||||||
end | ||||||||||||||||
end | ||||||||||||||||
{{{1}}} | ||||||||||||||||
{{{1}}} | ||||||||||||||||
{{{1}}} | ||||||||||||||||
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do | ||||||||||||||||
{{{1}}} | ||||||||||||||||
for y,v in string.gmatch(yaxis, "(%S+) (%S+)") do | ||||||||||||||||
{{{1}}} | ||||||||||||||||
{{{1}}} | ||||||||||||||||
{{{1}}} | ||||||||||||||||
end | ||||||||||||||||
end | ||||||||||||||||
print(str); | ||||||||||||||||
end | ||||||||||||||||
' | ||||||||||||||||
' | ||||||||||||||||
'''' |