Index: 残局文料/残局荐名.lua ================================================================== --- 残局文料/残局荐名.lua +++ 残局文料/残局荐名.lua @@ -64,16 +64,10 @@ end end --~ 卡编 function d.取卡数据(o1) for o1_4 in 数据库:nrows("select * from datas where id = " .. o1) do - --~ if o1_4.setcode > 0xffffffff then - --~ ffi = require("ffi") - --~ print(bit.tohex(o1_4.setcode, 16), o1_4.setcode, o1_4.setcode == 36592129229979791, bit.tohex(bit.rshift(o1_4.setcode, 31)), bit.tohex(bit.band(o1_4.setcode, 0xf)), string.format("%x", 36592129229979791 - 36592129229979791), bit.tohex(math.fmod(36592129229979791, 0xffff + 1)), math.fmod(36592129229979791, 0xffff + 1), ffi.new("uint64_t[1]", 36592129229979791)[0], tostring(36592129229979791) == tostring(o1_4.setcode), tonumber(tostring(o1_4.setcode)) == 36592129229979791, math.modf(36592129229979791 / (0xffff + 1)), bit.tohex(bit.band(o1_4.setcode - 4, ffi.new("uint64_t[1]", 0xffff)[0]))) - --~ print(string.format("%x", 36592129229979791 - 5)) - --~ else - --~ end return o1_4 end end --~ 文 function d.局筛卡编(o1) @@ -95,12 +89,10 @@ return k1 or 3 end --~ 卡对排 function d.荐名(o1_0) local k1 - --~ print(o1_0[1].name) - --~ return o1_0[1] --~ 名 k1 = d.荐字段名(o1_0) if k1 then else k1 = d.荐卡名(o1_0) @@ -181,24 +173,18 @@ function d.荐字段名(o1_0) local k1, k2 local k1_0 --~ 字段对 k1_0 = d.取字段对(o1_0) - --~ f.历对(k1_0, print) --~ 最大的字段名数量 _, k1 = f.历对取一(k1_0, f.筛对中最大值) - --~ print(_, k1) --~ 最高频字段名对 k2_0 = f.历对(k1_0, f.全等筛对中值, k1) - --~ f.历对(k2_0, print) --~ 最短的最高频字段 k2 = f.历对取一(k2_0, f.筛对中最短键) - --~ print(k2) if k2 then return k2 - else - return false end end --~ 目对 function d.残局荐名(o1_0) local k1_0, k2_0, k3_0, k4_0, k5_0, k6_0, k7_0, k8_0