Skip to main content
. 2019 Jun 29;21(7):645. doi: 10.3390/e21070645
Algorithm 1 Context-based predictive information: pseudocode.
  •   1:

    Input: xN, yN, c, ϵ

  •   2:

    Implement on xN, yN the first stage of the I/O CT algorithm to obtain a full I/O context tree

  •   3:

    fori in 1 to |c|1 do

  •   4:

     Implement the following stages of the I/O CT algorithm

  •   5:

     with ci1, ci, ci+1, and obtain Sci1, Sci, Sci+1

  •   6:

     Calculate PI^ci1,PI^ci,PI^ci+1

  •   7:

    if |Sci1| = |Sci+1| then

  •   8:

      dv20

  •   9:

    else

  • 10:

      dv2|2PI^ci|Sci|2|

  • 11:

    end if

  • 12:

    if dv2>ϵ then

  • 13:

      return ci, PI^ci

  • 14:

    end if

  • 15:

    end for

  • 16:

    return c|c|,0