精 彩 论 坛已经更名为百强频道,迁新地址www.bqpd.cn

亲爱的朋友,首先为给您带来的不便深表歉意,现因发展的需要,精彩论坛迁到新的地址http://www.bqpd.cn,还望您一如既往地支持精彩论坛,谢谢
精 彩 论 坛已经更名为百强频道,迁新地址www.bqpd.cn

论坛因发展的需要现已经迁址www.bqpd.cn,等待您的到来。谢谢


    [分享]遗漏层层分解图表

    分享
    avatar
    一品明灯
    Admin

    帖子数 : 292
    积分 : 720
    威望 : 4
    注册日期 : 10-03-02
    年龄 : 8

    普通 [分享]遗漏层层分解图表

    帖子 由 一品明灯 于 2010-03-11, 14:51

    [分享]遗漏层层分解图表

    '==========================================================
    ' 遗 漏 层 层 分 解 图 表
    ' by chinamen668 20061210
    '==========================================================
    CpParam.Add "开奖号码","不排序","{不排序}{排序}{不排末尾号}{显示个位}"'
    CpParam.Add "遗漏", 9,"{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}"
    Function Main
    '===============申明或定义变量=============
    CpRowCount = CpData.RowCount '开奖期数
    CpColCount = CpData.ColCount '开奖号码个数
    CpMaxCode = CpData.MaxCode '最大号码
    CpMinCode = CpData.MinCode '最小号码
    CpCodeCount = CpData.CodeCount '号码数量
    ub_YL = Cint(CpParam.Value("遗漏"))
    '先定义是否按大小来排序基号
    ub_*** = CpParam.Value("开奖号码")
    Redim Hm(CpRowCount,CpCodeCount)
    Redim CpGwStr(CpRowCount)
    if Pub_***="不排末尾号" then Bhmwh=1ub_***="排序"
    if Pub_***="显示个位" then CpMinCode =0: CpMaxCode =9
    For row = 0 to CpRowCount - 1
    GW=""
    For Col=0 to CpColCount-1
    Hm(row,Col)=CpData.Code(Row,Col)
    if Pub_***="显示个位" then
    Hm(row,Col)=CpData.Code(Row,Col) MOD 10
    GW=GW&Hm(row,Col)&" "
    end if
    Next
    if Pub_***="显示个位" then CpGwStr(row)=GW
    If Pub_***="排序" then '大小排序号码
    For i=0 to CpColCount-2
    For j=i+1 to CpColCount-1-Bhmwh
    if Hm(row,i)>Hm(row,j) then
    k=Hm(row,i)
    Hm(row,i)=Hm(row,j)
    HM(row,j)=k
    end if
    Next
    Next
    End If
    Next
    '=================建表=================
    CpAna.AddField "期号", 8
    For i = 1 to CpColCount
    CpAna.AddField "基"&i,3
    Next
    For y = 0 to Pub_YL
    For i = 1 to CpColCount
    CpAna.AddField y&"-"&i,3
    Next
    CpAna.AddField y&"遗漏中",6
    Next
    For y = 0 to Pub_YL
    CpAna.AddField "遗漏"&y,6
    Next
    CpAna.AddField "前"&ub_YL+1&"个数",8
    CpAna.AddField "前"&ub_YL+1&"中合",8
    CpAna.AddField "遗漏>"&ub_YL&"个数",10
    CpAna.AddField "中>"&ub_YL&"数",8
    For c = CpMinCode to CpMaxCode
    CpAna.AddField c,2
    Next
    CpAna.RowCount = CpRowCount+1
    CpAna.CreateTable()
    '==============算法主体============================
    Redim yc(CpColCount)'基位号码是否出过
    Redim code(CpCodeCount,CpRowCount)'判断是否在遗漏期内
    Set CpSec = CreateObject("BoaoHbsActive.CpSec")
    For row =0 to CpRowCount
    if row For col = 0 to CpColCount - 1
    CpAna.Cell(row,col+1) = Hm(row,col)
    yc(col)=0
    Next
    For y = 0 to Pub_YL
    gs=0'各层遗漏的出球个数
    ylgs=0
    if row+y+1>CpRowCount then exit for
    CpSec.Clear()
    'CpSec.Add "aa="&CpData.CodeStr(row+y+1)
    if Pub_***="显示个位" then
    CpSec.Add "aa="&CpGwStr(row+y+1)
    else
    CpSec.Add "aa="&CpData.CodeStr(row+y+1)
    end if
    For col = 0 to CpColCount - 1
    if yc(col)=0 then
    CpAna.Cell(row+y+1,(1+y)*(CpColCount+1)+col) = Hm(row,col)
    code(Hm(row,col)-CpMinCode,row+y+1)=1
    ylgs=ylgs+1
    end if
    If (CpSec.IsMember(0, Hm(row,col))) Then
    if yc(col)=0 and row+y+1 CpAna.BkCOLOR(row+y+1,(1+y)*(CpColCount+1)+col) =CpColor.IndexOf(y)
    yc(col)=1
    gs=gs+1
    '把开奖号码按遗漏颜色填入走势图
    CpAna.BkColor(row+y+1, Hm(row,col)&"")= CpColor.IndexOf(y)
    end if
    end if
    Next
    if gs>0 then CpAna.Color(row+y+1,(1+y)*(CpColCount+1)+col) =CpColor.IndexOf(gs)
    CpAna.Cell(row+y+1,(y+1)*(CpColCount+1)+col) = gs
    For col = 0 to CpColCount - 1
    if ylgs>0 then exit for
    CpAna.BkColor(row+y+1,(1+y)*(CpColCount+1)+col) = vbwhite
    Next
    CpAna.Cell(row+y+1,(2+Pub_YL)*(CpColCount+1)+y) = ylgs
    Next



    DyYLGs=0'大于遗漏号码个数
    Zj_DyYL=0'中大于遗漏个数
    CpSec.Clear()
    if Pub_***="显示个位" then
    CpSec.Add "aa="&CpGwStr(row)
    else
    CpSec.Add "aa="&CpData.CodeStr(row)
    end if
    For c = CpMinCode to CpMaxCode
    if code(C- CpMinCode,row)=0 then
    CpAna.Cell(row,c&"")=c
    DyYLGs=DyYLGs+1
    '中大于遗漏的球数加红色,
    If (CpSec.IsMember(0, c)) Then CpAna.Color(row,c&"")=255: Zj_DyYL=Zj_DyYL+1
    end if
    if Hm(row, CpColCount -1) =c then CpAna.Cell(row,c&"")="★"'开奖号最末球
    Next
    CpAna.Cell(row,"前"&ub_YL+1&"个数") = CpMaxCode- DyYLGs+1-CpMinCode
    CpAna.Cell(row,"前"&ub_YL+1&"中合") =CpColCount - Zj_DyYL
    if row>ub_YL then
    CpAna.Cell(row,"遗漏>"&ub_YL&"个数") =DyYLGs
    CpAna.Cell(row,"中>"&Pub_YL&"数") =Zj_DyYL
    end if
    Next
    End Function


    _________________
    一流的条件 精彩的论坛

      目前的日期/时间是2018-04-25, 02:10