Description of some of the folders containing macros :

1. gph

gph_version folder loads the functions to manipulate subdifferentials of Piecewise Linear-Quadratic functions, stored as piecewise linear graphs.
All of the main functions in this directory begin with gph_.

gph structure is fi=f(xi) and G = [xi;si;fi] including 2 pts added
for (-infty,x1] and [xn,+infty). xi are not necessarily distincts
to model the vertical parts, though a single xi value should not
be listed more than twice in a row.  x0 should equal x1 iff f0 is
+infty, and likewise for the last two points in gph.  This simplifies
the code (e.g. in gph_eval), and more closely represents the left
and right limits of f at x1 (when x0=x1) and xn (when xn=x(n+1)).

We only store the subdifferential of plq functions so the graph is
always maximal: for the leftmost part either 
 - the domain is left bounded (vertical half-line)
 - the function is affine (horizontal half-line) or 
 - the function is quadratic (nonhorizontal nonvertical half-line)
so [-1 1;0 0 ; 0 0] is the function identically 0
and [-1, -1, 1, 1; -1, 0, 0, 1; %inf, 0, 0, %inf]; is the indicator I_[-1,1]

Examples: [%inf a b c] = [x0 x1;2a*x0+b 2a*x1+b;a*x0^2+b*x0+c a*x1^2+b*x1+c]
while [x0 x1;s0 s1;f0 f1] = [%inf a b c] with a=(s1-s0)/(2(x1-x0)), b=s0-2ax0
and c=f0-a x0^2 -b x0 = f1-a x1^2 -b x1 PROVIDED x0 < x1
[x0 x0;alpha beta;f0 f0] = [x0 0 0 f0] =I{x0}+f0 the indicator function of a point
PROVIDED alpha<>beta. If alpha == beta, we can compress it to [x0;alpha;f0]
which does not give a maximal graph for the subdifferential, so it does not
correspond to a plq function.

2. gph_plot
Contains UTILITY FUNCTIONS FOR plotting gph
compute the display window of a sequence of gph functions
add 10% slack on each side to see boundary points
make sure there is a minimum of 1 between min and max
L: list of gph structures i.e. 3x? matrices
e.g. L=list(g), L=list(g,h)
rect=[xmin,ymin,xmax,ymax]

3. lft
Functions to compute the
Legendre-Fenchel transform. It can be used standalone but is also called from macros in me.


Calling Sequences

All Conjugate Operations use the lft

pl_lft_generic(X,Y,S);
pl_lft_generic(X,Y,S,isConvex);
pl_lft_generic(Xr,Xc,f,Sr,Sc);
pl_lft_generic(Xr,Xc,f,Sr,Sc,isConvex)

4. me
Macros to compute the Moreau Envelope. It uses lft macros for conjugate computation


Calling Sequences

Default Moreau Operations use the lft

1Dimension
[M] = pl_me_generic(X,Y,S); 
[M,p,P] = pl_me_generic(X,Y,S); 

2Dimensions
[M,g,Conjpartial,Conj] = pl_me_generic(Xr,Xc,f,Sr,Sc);

5. plq

Problems solved in the macros : 
PROBLEM 1. (1) f1'(x2) = f2'(x4), 
           (2) m1(x-x2) + f1(x2) = m2(x-x4) + f2(x4), where
           (3) x1 < x2 < x3
           (4) x3 < x4 < x5

PROBLEM 2. (1) m1(x-x2) + f1(x2) = m1(x-x5) + f2(x5), where
           (2) x1 < x2 < x3
           (3) x3 < x4 < x5, and
           (4) m1=f1'(x2)

PROBLEM 3. (1) m2(x-x1) + f1(x1) = m2(x-x4) + f2(x4), where
           (2) x1 < x2 < x3
           (3) x3 < x4 < x5, and
           (4) m2=f2'(x4)

PROBLEM 4. (1) m1(x-x1) + f1(x1) = m1(x-x5) + f2(x5), where
           (2) x1 < x2 < x3
           (3) x3 < x4 < x5


5. opt

Convex operator is computed using optimization algorithms using the macros in this file.
TO DO: reduce everything to ka: pa, me, conj?, infconv: ONE function for all


6.op
Contains macros for computations on finite operators (not necessarily monotone). Currently there are algorithms 
to compute Fitzpatrick functions of given, finite or infinite, orders. All of the main functions in this file begin with op_.

7. plq
Macros to manipulate Piecewise Linear-Quadratic functions.  There are PLQ algorithms for computing
all of the major transforms implemented by this toolbox. See the help files for more information on the functions


8. soqs
Macros relating to Shape preserving osculatory spines