<< pl_lft_llt_2d pl pl_lft_llt_d >>

CCA (Computational Convex Analysis) >> pl > pl_lft_llt_3d

pl_lft_llt_3d

3D Legendre-Fenchel conjugate, LLT algorithm

Calling Sequence

Conj = pl_lft_llt_3d (Xr, Xc, Xt, f, Sr, Sc, St)
Conj = pl_lft_llt_2d (Xr, Xc, Xt, f, Sr, Sc, St, isConvex)

Parameters

Xr

column vector of length n.

Xc

column vector of length m.

Xt

column vector of length k.

f

hypermatrix of size nxmxk. The function f is sampled on a grid Xr x Xc x Xt so f(i,j,k)=ff(Xr(i),Xc(j),Xt(k)) for some function ff.

Sr

column vector of size m1.

Sc

column vector of size m2.

St

column vector of size m3. The Conugate is computed on a grid SrxScxSt.

isConvex

Boolean, optional. Whether or not the given function is known to be true. Defaults to false. It is passed to pl_lft_llt.

Conj

hypermatrix of size m1xm2xm3 containing the Conjugate of the function f.

Description

Numerically compute the discrete Legendre transform on the grid Sr x Sc x St, given a function f(x,y,z) defined on a grid Xr x Xc x Xt, using the LLT1d algorithm to compute the conjugate in one dimension, then to compute it in the other dimension. If n==length(Xr)==length(Xc)==length(Xt)==length(Sr)==length(Sc)==length(St), this function calls LLT1d n times in each of the three dimensions (3*n^3), giving a linear running time with respect to the O(n^3) input size.

The conjugate of a function in R^3 can be factored to several conjugates which are elements of R.

Examples

Xr=(-2:0.25:2)'; 
Xc=(-2:0.25:2)'; 
Xt=(-2:0.25:2)'; 
Sr=(-2:0.25:2)';
Sc=(-2:0.25:2)';
St=(-2:0.25:2)';
deff('[z]=f(Xr,Xc,Xt)',['z= Xr^2 + 2*Xc^2 + 3*Xt^2']);
z=zeros(length(Xr), length(Xc), length(Xt));
for i=1:length(Xr),
    for j=1:length(Xc),
        for k=1:length(Xt),
            z(i,j,k) = f(Xr(i),Xc(j),Xt(k));
        end;
    end;
end;
result_llt = pl_lft_llt_3d (Xr, Xc, Xt, z, Sr, Sc, St, 0);

See Also

Authors

Mike Trienis, University of British Columbia, BC, Canada

Used Functions

pl_lft_llt is called three times, once for each dimension.


Report an issue
<< pl_lft_llt_2d pl pl_lft_llt_d >>