Skip to main content
. 2022 Oct 24;22(21):8124. doi: 10.3390/s22218124
Algorithm 6  Automatic FHE parameterisation by source and cost discovery over multi-directed graphs.
functionautoHE(g, n, concern)
    for iinndo                        ▹ Label graph sources and costs
        autoHE_discover(g,i,i,concern,0)
    rtuple(dictionary(),list())                  ▹ Group representation
    for iinndo                      ▹ Assign + merge groups from labels
        if r[0].get(i)isNone then
           r[0][i]len(r[1])
           r[1].append(0)
        for jing.nodes() do
           srcj[1][sources]
           if iinsrc then
               for kinsrc do
                   r[0][k]r[0][i]
                   if src[k]>r[1][r[0][i]] then
                       r[1][r[0][i]]=src[k]
    return r