Scilab Function
Last update : 12/4/2006

lft_llt - Legendre-Fenchel conjugate, LLT algorithm

Calling Sequence

Conj = lft_llt(X,Y,S,fusionopt)

Parameters

Description

Compute numerically the discrete Legendre transform of a set of planar points (X(i),Y(i)) at slopes S, i.e.,

		Conj(j)=max[S(j)*X(i)-Y(i)].
			 i
It uses the Linear-time Legendre Transform (LLT) algorithm for a linear-time worst-case complexity theta(n+m) with n=length(X)=length(Y) and m=length(S). The LLT algorithm first compute the lower convex envelope of the points (X(i),Y(i)), and then merge two increasing sequences.

Examples

	X=[-5:0.5:5]';
	Y=X.^2;
	S=(Y(2:size(Y,1))-Y(1:size(Y,1)-1))./(X(2:size(X,1))-X(1:size(X,1)-1));
	Conj=lft_llt(X,Y,S);
	Conj2=lft_llt(X,Y,S,1);
  

See Also

lft_direct ,  

Author

Yves Lucet, University of British Columbia, BC, Canada

Bibliography

Y. Lucet, 1997, Faster than the fast Legendre transform, the linear-time Legendre transform, Numerical Algorithms, 16(2):171-185. Code in Netlib.

Used Function

The convex hull computation is performed with the function bb . The core of the algorithm amounts to merging to increasing sequences is performed with the function fusion or fusionsci depending on the value of the parameter fusionopt.