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

    乐透间距全分析
    '==========================================================
    CpParam.Add "位置1",1,"{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}",35
    CpParam.Add "位置2",2,"{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}",35


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

    Pub_FirstCodeIndex = CInt(CpParam.Value("位置1")) '第一个号码的位置
    Pub_SecondCodeIndex = CInt(CpParam.Value("位置2")) '第二个号码的位置

    '=================建表=================
    CpAna.AddField "期号",8
    CpAna.AddField "开奖号码",CpColCount*3
    CpAna.AddField "间距形态",CpColCount*2
    CpAna.AddField "间距和",8
    CpAna.AddField "最小间距",8
    CpAna.AddField "最大间距",8
    CpAna.AddField "平均间距",8
    CpAna.AddField "位置间距",8
    CpAna.AddField "全距(3D跨度)",12
    CpAna.AddField "首距",6
    CpAna.AddField "中距",6
    CpAna.AddField "尾距",6
    CpAna.AddField "平小距",6
    CpAna.AddField "平大距",6
    CpAna.AddField "大小全距",10
    CpAna.AddField "平方差方距",12
    CpAna.RowCount = CpData.RowCount
    CpAna.CreateTable()
    '==============算法主体============================
    For row = 0 to CpRowCount - 1
    JJXT = "" '间距形态
    JJXTH = "" '间距和
    MaxJJ = -99999 '最大间距
    MinJJ = 99999 '最小间距
    MaxCode = -9999 '最大号码
    MinCode = 9999 '最小号码
    MaxCodeWZ = -9999 '两位置间最大号码
    MinCodeWZ = 9999 '两位置间最小号码
    JJSum = 0 '间距和

    CpAna.Cell( row, "期号") = CpData.Seq(row)
    CpAna.Cell( row, "开奖号码") = CpData.CodeStr(row)

    For col = 0 to CpColCount - 1
    NextCol = col + 1
    Code = CpData.Code(row,col)
    If NextCol < CpColCount then
    JJ0 = abs(Code - CpData.Code(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, "间距形态") = JJXT
    CpAna.Cell( row, "间距和") = JJSUM
    CpAna.Cell( row, "最小间距") = MinJJ
    CpAna.Cell( row, "最大间距") = MaxJJ
    CpAna.Cell( row, "平均间距") = JJSum \ (CpColCount-1)
    CpAna.Cell( row, "位置间距") = MaxCodeWZ - MinCodeWZ
    CpAna.Cell( row, "全距(3D跨度)") = MaxCode - MinCode
    CpAna.Cell( row, "首距") =( MaxCode - MinCode)*MinCode
    CpAna.Cell( row, "中距") =( MaxCode - MinCode)*( MaxCode + MinCode)\2
    CpAna.Cell( row, "尾距") =( MaxCode - MinCode)*MaxCode-88
    CpAna.Cell( row, "平小距") = (JJSum \ (CpColCount-1))*Minjj
    CpAna.Cell( row, "平大距") = (JJSum \ (CpColCount-1))*MAXjj
    CpAna.Cell( row, "大小全距") =( MaxCode - MinCode)*(maxjj-minjj)\1
    CpAna.Cell( row, "平方差方距") =sqr( MaxCode^2 - MinCode^2)\1
    Next
    End Function

    '首距=全距与最小号的乘积
    '中距=全距与最小号和最大号的和的二分之一的乘积
    '尾距=全距与最大号的乘积


    _________________
    一流的条件 精彩的论坛

      目前的日期/时间是2018-04-25, 01:56