Scilab Function
Last update : 1/5/2008

cca_fenchel - Generic Legendre Fenchel Transform (LFT)

Calling Sequence

[Conj]=cca_fenchel(X,Y,S)
[Conj]=cca_fenchel(X,Y,S,isConvex)
[Conj]=cca_fenchel(Xr,Xc,f,Sr,Sc)
[Conj]=cca_fenchel(Xr,Xc,f,Sr,Sc,isConvex)

Parameters

Description

The fenchel function is a wrapper for two different conjugate computations depending on the calling sequence. The first calling sequence [Conj]=cca_fenchel(X,Y,S) uses lft_llt function for the 1D lft computation. The third calling sequence [Conj]=cca_fenchel(Xr,Xc,f,Sr,Sc) uses the lft_llt2d function for the 2D lft computation. The second and fourth calling sequence have an additional boolean parameter isConvex to speed up computational time for each dimension. For a more detailed description see links below.

Examples

//Example 1. First Calling Sequence
X = [1:1:10]'
Y = 0.5.*(X.^2)
[Conjw] = cca_fenchel(X, Y, X);

//Example 2. Second Calling Sequence
X = [1:1:10]'
Y = 0.5.*(X.^2)
[Conjw] = cca_fenchel(X, Y, X, %t);

//Example 3. Third Calling Sequence
//xr and xc is the grid which f is evaluated on
Xr=(-2:1:2)'; //x
Xc=(-2:1:2)'; //y
//sr and sc is the grid which f* is evaluated on
Sr=(-2:1:2)';
Sc=(-2:1:2)';
f = rand(size(Xr,1),size(Xc,1));
[Conj] = cca_fenchel(Xr,Xc,f,Sr,Sc);

//Example 4. Fourth Calling Sequence
Xr=(-2:1:2)'; //x
Xc=(-2:1:2)'; //y
//sr and sc is the grid which f* is evaluated on
Sr=(-2:1:2)';
Sc=(-2:1:2)';
f = rand(size(Xr,1),size(Xc,1));
[Conj] = cca_fenchel(Xr,Xc,f,Sr,Sc,%f);
  

See Also

lft_llt,  lft_2d,  

Author

Mike Trienis, University of British Columbia, BC, Canada