Skip to main content
. 2016 Nov 2;10:496. doi: 10.3389/fnins.2016.00496

Algorithm 1 FoCal, redundancy correction

   procedure Correction(coeffs C, correlations Q)
        N ← ∅                                     ⊳ Corrected coefficients
        repeat
              mmax(C)                   ⊳ Obtain maximum from C
              MMm                           ⊳ Add maximum to M
              CC \ m                      ⊳ Remove maximum from C
              for all cC do                    ⊳ Adjust all remaining c
                    if Q(m, c) ≠ 0 then      ⊳ Adjust only spatially near
                                                        coefficients
                        ccm × Q(m, c)
                    end if
              end for
        until C = ∅
        return M
    end procedure