Skip to main content
. 2020 Dec 30;13(1):42. doi: 10.3390/pharmaceutics13010042
Algorithm 2 EXPAND. Input: ϕ = (ϕ1,,ϕK), ΔG, Θ=[a1,b1]×[a2,b2]×...×[aQ,bQ], a=[a1,,aQ], b=[b1,,bQ], ΔD. Output: ϕ=(ϕ1,,ϕM), where MK(1+2Q). Note: In this algorithm, ϕ = (ϕ1,,ϕK) is a Q×K matrix, with Q=dimΘ
functionExpand(ϕ, ΔG, a, b, ΔD)
2:     Initialize: [Q,K]=size(ϕ), I=Q×Q Identity matrix, newϕϕ
    for k=1,,K do K=numberofofinputsupportpoints
4:         for d=1,,Q do Q=dimΘ
           T(d)=ΔG(b(d)a(d))
6:            if ϕ(d,k)+T(d)b(d) then ▹ Check upper boundary
               ϕ+=ϕ(:,k)+T(d)I(:,d)
8:                dist=1030
           end if
10:            for kin=1:length(newϕ) do
               newdist=abs(ϕ+newϕ(:,kin))./(ba) ▹ x ./y done
component-wise
12:                dist=min(dist,newdist)
           end for
14:            if distΔD then ▹ Check distance to new support point
               newϕnewϕ,ϕ+
16:            end if
           if ϕ(d,k)T(d)a(d) then ▹ Check lower boundary
18:                ϕ=ϕ(:,k)T(d)I(:,d)
               dist=1030
20:            end if
           for kin=1:length(newϕ(1,:)) do
22:                newdist=(abs(ϕnewϕ(:,kin))./(ba)) ▹ x./y done
component-wise
               dist=min(dist,newdist)
24:            end for
           if distΔD then ▹ Check distance to new support point
26:                newϕ[newϕ,ϕ]
           end if
28:         end for
    end for
30:     ϕnewϕ
end function