Research Article

Effective Application of Improved Profit-Mining Algorithm for the Interday Trading Model

Pseudocode 1

The pseudocode of genBP.
(1) genBP
(2) Parameters:
(3)  prefix         : Pattern
(4)  index, interval     : int
(5) Begin
(6)  if interval > maxspan then
(7)   return
(8)  end if
(9)  if index < then
(10)   for = index to
(11)    BP = oneItemList[ ]
(12)    BP = shift(BP, interval)
(13)    BP = join(prefix, BP)
(14)
(15)    if sup(BP) ≥ minsup
(16)     genSP(BP, null, 0, 0 )
(17)     genBP(BP, , interval)
(18)    end if
(19)   end for
(20)  end if
(21)
(22)  if prefix.length > 0 then
(23)   genBP(prefix, 0, interval + 1)
(24)  end if