Fud decomposition inducers

Code commentary on the implementation of Tractable and Practicable Inducers/Python Implementation/Fud decomposition inducers

Sections

Highest-layer excluded-self maximum-roll-by-derived-dimension fud decomper

Highest-layer excluded-self maximum-roll-by-derived-dimension fud decomper

The practicable highest-layer excluded-self maximum-roll-by-derived-dimension summed shuffle content alignment valency-density fud decomposition inducer, $I_{z,\mathrm{Scsd,D,F,\infty,q},P,\mathrm{mm,xs,d}}^{‘}$, is implemented in the highest-layer excluded-self maximum-roll-by-derived-dimension fud decomper $I_{P,U,\mathrm{D,F,mm,xs,d}} \in \mathrm{computers}$ (Text) exactly as in the highest-layer fud decomper $I_{P,U,\mathrm{D,F,d}}$, above, except that the highest-layer maximum-roll-by-derived-dimension excluded-self fud induction computer, $I_{P,U,\mathrm{Z,F,mm,xs,d}}$, replaces the highest-layer fud induction computer, $I_{P,U,\mathrm{Z,F,d}}$.

The decomper is defined in module AlignmentPracticable,

parametersSystemsDecomperMaxRollByMExcludedSelfHighest :: 
  Integer -> Integer -> Integer -> Integer -> Integer -> Integer -> Integer -> Integer -> 
  Integer -> Integer ->
  System -> Set.Set Variable -> Histogram -> 
  Maybe (System, DecompFud)

as

def parametersSystemsDecomperMaxRollByMExcludedSelfHighest(wmax,lmax,xmax,omax,bmax,mmax,umax,pmax,mult,seed,uu,vv,aa):
    ...
    def layerer(uu,aa,aarr,f):
        return parametersSystemsLayererMaxRollByMExcludedSelfHighest(wmax,lmax,xmax,omax,bmax,mmax,umax,pmax,uu,vv,aa,aarr,f)
    def decomp(uu,zz,f,s):
        if len(zz) == 0:
            aarr = ashuffle(aa,s,mult)
            (uur,ffr,nnr) = layerer(uu,aa,aarr,f)
            (ar,kkr) = maxd(nnr)
            if len(ffr) == 0 or len(nnr) == 0 or ar <= 0:
                return (uu, decompFudEmpty())
            ffr1 = depends(ffr,kkr)
            zzr = tsgl((stateEmpty(),ffr1))
            return decomp(uur,zzr,f+1,s+mult)
        mm = []
        for (nn,yy) in treesPlaces(zz):
            rrc = sset([unit(ss) for (ss,_) in nn])
            hhc = sset([bb for (_,gg) in nn for bb in ffqq(gg)])
            (_,ff) = nn[-1]
            if len(ff) > 0:
                for ss in cart(uu,fder(ff)) - dom(treesRoots(yy)):
                    xx = hhc | rrc | sset([unit(ss)])
                    bb = apply(vv,vv,xx,aa)
                    if size(bb) > 0:
                        mm.append((size(bb),nn,ss,bb))
        if len(mm) == 0:
            return (uu,zzdf(zztrim(zz)))
        mm.sort(key = lambda x: x[0])
        (_,nn,ss,bb) = mm[-1]
        bbrr = ashuffle(bb,s,mult)
        (uuc,ffc,nnc) = layerer(uu,bb,bbrr,f)
        (ac,kkc) = maxd(nnc)
        ffc1 = fudEmpty()
        if ac > 0:
             ffc1 = depends(ffc,kkc)
        zzc = pathsTree(treesPaths(zz) + [nn+[(ss,ffc1)]])
        return decomp(uuc,zzc,f+1,s+mult)
    if wmax < 0 or lmax < 0 or xmax < 0 or omax < 0 or bmax < 0 or mmax < 1 or umax < 0 or pmax < 0:
        return None
    if (not isint(aa)) or mult < 1:
        return None
    if not (vars(aa).issubset(uvars(uu)) and vv.issubset(vars(aa))):
        return None
    return decomp(uu,emptyTree(),1,seed)

top