精 彩 论 坛已经更名为百强频道,迁新地址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:48

    隔 期 混 合 间 距 分 析
    ' chinamen668 by20060927
    '==========================================================
    CpParam.Add "开奖号码","不排序","{不排序}{排序}{不排最末基号}"'



    Function Main
    '===============申明或定义变量=============
    CpRowCount = CpData.RowCount '开奖期数
    CpColCount = CpData.ColCount '开奖号码个数
    CpMaxCode = CpData.MaxCode '最大号码
    CpMinCode = CpData.MinCode '最小号码
    CpCodeCount = CpData.CodeCount '号码数量




    ub_FirstCodeIndex = 1 '第一个号码的位置
    ub_SecondCodeIndex = CpColCount '第二个号码的位置
    ub_*** = CpParam.Value("开奖号码")




    Redim Hm(CpRowCount,CpCodeCount)
    if Pub_***="不排最末基号" then Bhmwh=1
    For row = 0 to CpRowCount - 1
    For Col=0 to CpColCount-1
    Hm(row,Col)=CpData.Code(Row,Col)
    Next
    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
    CpAna.AddField "开奖号码 "&ub_***,CpColCount*3
    CpAna.AddField "间距形态",CpColCount*3
    CpAna.AddField "最小间距",8
    CpAna.AddField "最大间距",8
    CpAna.AddField "平均间距",8
    CpAna.AddField "位置间距",8
    CpAna.AddField "全距",8
    CpAna.AddField "混合间距形态",CpColCount*3
    CpAna.AddField "混合值",6
    CpAna.RowCount = CpData.RowCount
    CpAna.CreateTable()
    '==============算法主体============================
    For row = 0 to CpRowCount - 1
    JJXT = "" '间距形态
    MaxJJ = -99999 '最大间距
    MinJJ = 99999 '最小间距
    MaxCode = -9999 '最大号码
    MinCode = 9999 '最小号码
    MaxCodeWZ = -9999 '两位置间最大号码
    MinCodeWZ = 9999 '两位置间最小号码
    JJSum = 0 '间距和
    kjhm=""
    jjminstr=""
    jjminhz=0




    For col = 0 to CpColCount - 1
    NextCol = col + 1
    Code = Hm(row,Col)




    j0=""
    if Code<10 and CpCodeCount>10 then j0="0"
    kjhm=kjhm&j0& Code&" "
    jjmin=9999
    For col1 = 0 to CpColCount - 1
    if row>0 then
    jj= abs(Code - Hm(row-1,col1))
    if jj end if
    Next




    jjminhz=jjminhz+jjmin
    jjminstr=jjminstr&jjmin&" "




    If NextCol < CpColCount then
    JJ0 = abs(Code - Hm(row,NextCol))
    JJSum = JJSum + JJ0
    JJXT = JJXT & JJ0 & " "




    '找最大最小间距
    If JJ0 > MaxJJ then
    MaxJJ = JJ0
    End If
    If JJ0 < MinJJ then
    MinJJ = JJ0
    End If
    End If




    '找最大最小号码
    If Code > MaxCode then
    MaxCode = Code
    End If
    If Code < MinCode then
    MinCode = Code
    End If

    If col >= Pub_FirstCodeIndex-1 And col < Pub_SecondCodeIndex then
    If Code > MaxCodeWZ then
    MaxCodeWZ = Code
    End If
    If Code < MinCodeWZ then
    MinCodeWZ = Code
    End If
    End If
    Next

    CpAna.Cell( row, "期号") = CpData.Seq(row)
    CpAna.Cell( row, 1) = kjhm
    CpAna.Cell( row, "间距形态") = JJXT
    CpAna.Cell( row, "最小间距") = MinJJ
    CpAna.Cell( row, "最大间距") = MaxJJ
    CpAna.Cell( row, "平均间距") = JJSum \ (CpColCount-1)
    CpAna.Cell( row, "位置间距") = MaxCodeWZ - MinCodeWZ
    CpAna.Cell( row, "全距") = MaxCode - MinCode
    if row>0 then CpAna.Cell( row, "混合间距形态") = jjminstr
    if row>0 then CpAna.Cell( row, "混合值") =jjminhz




    Next




    End Function


    _________________
    一流的条件 精彩的论坛

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