Module:MOS genchain: Difference between revisions
No edit summary |
No edit summary |
||
| Line 17: | Line 17: | ||
p.cell_color_sm_altered_size = "#F8CBAD" | p.cell_color_sm_altered_size = "#F8CBAD" | ||
function p.preprocess_genchain(input_mos) | function p.preprocess_genchain(input_mos) | ||
local input_mos = input_mos or mos.new(5,2) | local input_mos = input_mos or mos.new(5,2) | ||
| Line 56: | Line 37: | ||
local num_gens = mos.period_step_count(input_mos) | local num_gens = mos.period_step_count(input_mos) | ||
local genchain = p. | local genchain = p.preprocess_genchain(input_mos) | ||
-- Begin table | -- Begin table | ||
| Line 64: | Line 44: | ||
-- Generators header cell | -- Generators header cell | ||
result = result .. "! | result = result .. "! Number of bright gens\n" | ||
-- Add a row for the generator counts | -- Add a row for the generator counts | ||
for i = 1, #genchain do | |||
for i = | result = result .. string.format("%s %s", (i == 1 and "|" or " ||"), i - num_gens) | ||
end | end | ||
result = result .. "\n" | result = result .. "\n" | ||
| Line 85: | Line 56: | ||
if period_count == 1 then | if period_count == 1 then | ||
result = result .. "! Degree quality\n" | result = result .. "! Degree quality\n" | ||
for i = | for i = 1, #genchain do | ||
result = result .. string.format("%s %s", (i == 1 and "|" or " ||"), tamnams.degree_quality(genchain[i], input_mos, "abbrev")) | |||
end | end | ||
else | else | ||
for i = 1, period_count do | for i = 1, period_count do | ||