\newpage
{\bf \Huge optVector}
\leavevmode\leaders\hrule height 1mm \hfill
%\rule{2in}{1mm}
\vspace{0.25in}

{\bf Purpose}

\begin{quote}
Optimized vector constructor.
\end{quote}

{\bf Syntax}

\begin{quote}
{\tt [opt] = optVector(n, pool)  }
{\tt [opt] = optVector(svec) }
{\tt [opt] = optVector(otheropt) }
{\tt [opt] = optVector(h, pool, xoff) }
{\tt [opt] = optVector }
\end{quote}

{\bf Description}

\begin{quote}
{\tt [opt] = optVector(n, pool)  } creates a vector of {\tt n} new
optimization variables in optSpace {\tt pool}.

{\tt [opt] = optVector(svec) } creates a constant (non-optimized) vector
from {\tt svec}.

{\tt [opt] = optVector(otheropt) } creates a copy of {\tt otheropt}.

{\tt [opt] = optVector(h, pool, xoff) } assembles an \optvec\: from its
parts in one step. Assumes that the variables are already
allocated. {\tt h} is the kernel matrix, {\tt pool} is the number of the
desired optSpace, and {\tt xoff} is the index into space {\tt pool} of
the first variable in the {\tt optVector}.

{\tt [opt] = optVector } creates an empty constant vector.
\end{quote}

%-----------------

\newpage
{\bf \Huge optVector/abs}
\leavevmode\leaders\hrule height 1mm \hfill
%\rule{2in}{1mm}
\vspace{0.25in}

{\bf Purpose}

\begin{quote}
Elementwise absolute value.
\end{quote}

{\bf Syntax}

\begin{quote}
{\tt aquad = abs(opt)  }
\end{quote}

{\bf Description}

\begin{quote}
Returns an {\tt optQuadVector} which is the elementwise absolute value
of {\tt opt}.
\end{quote}

%-----------------


\newpage
{\bf \Huge optVector/char, display}
\leavevmode\leaders\hrule height 1mm \hfill
%\rule{2in}{1mm}
\vspace{0.25in}

{\bf Purpose}

\begin{quote}
Output functions for class \optvec.
\end{quote}

{\bf Syntax}

\begin{quote}
{\tt c = char(opt)} \\
{\tt display(opt)}
\end{quote}

{\bf Descripition}

\begin{quote}
{\tt char} converts class \optvec\: to character for output.
{\tt display} is command window display of class \optvec.

Displays the kernel, offset into variable pool and pool number.
\end{quote}

%---------div

\newpage
{\bf \Huge optVector/energy}
\leavevmode\leaders\hrule height 1mm \hfill
%\rule{2in}{1mm}
\vspace{0.25in}

{\bf Purpose}

\begin{quote}
Energy (sum of squares).
\end{quote}

{\bf Syntax}

\begin{quote}
{\tt [q] = energy(opt)  }
\end{quote}

{\bf Description}

\begin{quote}
Returns quadratic form ({\tt optQuad}) representing energy, or a scalar
if {\tt opt} does not depend on optimization variables.
\end{quote}

%-----------------

\newpage
{\bf \Huge optVector/eq}
\leavevmode\leaders\hrule height 1mm \hfill
%\rule{2in}{1mm}
\vspace{0.25in}

{\bf Purpose}

\begin{quote}
Linear equality constraint.
\end{quote}

{\bf Syntax}

\begin{quote}
{\tt [eqconstr] = eq(vect1, vect2)  }
\end{quote}

{\bf Description}

\begin{quote}
Creates a linear equality constraint of type {\tt LinConstr}. At least
one of {\tt vect1} and {\tt vect2} is an \optvec.

{\tt [eqconstr] = eq(vect1, vect2)} is called for the syntax {\tt vect1
== vect2}.
\end{quote}

%-----------------

\newpage
{\bf \Huge optVector/get\_h, get\_pool, get\_xoff}
\leavevmode\leaders\hrule height 1mm \hfill
%\rule{2in}{1mm}
\vspace{0.25in}

{\bf Purpose}

\begin{quote}
Kernel matrix, pool and offset extraction functions.
\end{quote}

{\bf Syntax}

\begin{quote}
{\tt h = get\_h(opt, format)  } \\
{\tt pool = get\_pool(opt)  } \\
{\tt xoff = get\_xoff(opt)  }
\end{quote}

{\bf Description}

\begin{quote}
{\tt h = get\_h(opt, format)  } returns kernel matrix of {\tt opt}. 

{\tt format} can be {\tt 'sparse'}, {\tt 'full'}, {\tt 'linear'} or {\tt
'const'}. \\
{\tt 'sparse'} returns the nonzero portion as a sparse matrix. \\
{\tt 'full'} returns the entire kernel matrix as a sparse matrix. \\
{\tt 'linear'} and {\tt 'const'} return just the pure linear and the
constant portions, respectively, of the kernel matrix.

{\tt pool = get\_pool(opt)  } returns the number of the pool (optSpace) used by {\tt opt}.

{\tt xoff = get\_xoff(opt)  } returns {\tt xoff}, offset of {\tt opt}'s first variable into its
variable pool.
\end{quote}

%-----------------

\newpage
{\bf \Huge optVector/imag}
\leavevmode\leaders\hrule height 1mm \hfill
%\rule{2in}{1mm}
\vspace{0.25in}

{\bf Purpose}

\begin{quote}
Complex imaginary part.
\end{quote}

{\bf Syntax}

\begin{quote}
{\tt [iopt] = imag(opt)  }
\end{quote}

{\bf Description}

\begin{quote}
Returns an \optvec\: which is the imaginary part of {\tt opt}.
\end{quote}

%-----------------

\newpage
{\bf \Huge optVector/isconst}
\leavevmode\leaders\hrule height 1mm \hfill
%\rule{2in}{1mm}
\vspace{0.25in}

{\bf Purpose}

\begin{quote}
True for constant.
\end{quote}

{\bf Syntax}

\begin{quote}
{\tt [cn] = isconst(opt)  }
\end{quote}

{\bf Description}

\begin{quote}
Returns 1 if {\tt opt} is constant (does not depend on optimization
variables) and 0 otherwise.
\end{quote}

%-----------------

\newpage
{\bf \Huge optVector/islinear}
\leavevmode\leaders\hrule height 1mm \hfill
%\rule{2in}{1mm}
\vspace{0.25in}

{\bf Purpose}

\begin{quote}
True if no constant terms.
\end{quote}

{\bf Syntax}

\begin{quote}
{\tt [lin] = islinear(opt)  }
\end{quote}

{\bf Description}

\begin{quote}
Returns 1 if {\tt opt} is linear in the optimization variables (no
constant terms) and 0 otherwise.
\end{quote}

%-----------------

\newpage
{\bf \Huge optVector/isscalar}
\leavevmode\leaders\hrule height 1mm \hfill
%\rule{2in}{1mm}
\vspace{0.25in}

{\bf Purpose}

\begin{quote}
True for scalar.
\end{quote}

{\bf Syntax}

\begin{quote}
{\tt [sc] = isscalar(opt)  }
\end{quote}

{\bf Description}

\begin{quote}
Returns 1 if {\tt opt} is a length-1 \optvec\: (scalar), and 0 otherwise.
\end{quote}

%-----------------

\newpage
{\bf \Huge optVector/length}
\leavevmode\leaders\hrule height 1mm \hfill
%\rule{2in}{1mm}
\vspace{0.25in}

{\bf Purpose}

\begin{quote}
Length of vector.
\end{quote}

{\bf Syntax}

\begin{quote}
{\tt [len] = length(opt)  }
\end{quote}

{\bf Description}

\begin{quote}
Returns the length of {\tt opt}.
\end{quote}

%-----------------


\newpage
{\bf \Huge optVector/lt}
\leavevmode\leaders\hrule height 1mm \hfill
%\rule{2in}{1mm}
\vspace{0.25in}

{\bf Purpose}

\begin{quote}
Linear inequality constraint.
\end{quote}

{\bf Syntax}

\begin{quote}
{\tt [lconstr] = lt(vect1, vect2)  }
\end{quote}

{\bf Description}

\begin{quote}
Creates a linear inequality constraint of type {\tt LinConstr}. At least
one of {\tt vect1} and {\tt vect2} must be an \optvec.

{\tt [lconstr] = eq(vect1, vect2)} is called for the syntax {\tt vect1
< vect2}.
\end{quote}

%-----------------

\newpage
{\bf \Huge optVector/minus}
\leavevmode\leaders\hrule height 1mm \hfill
%\rule{2in}{1mm}
\vspace{0.25in}

{\bf Purpose}

\begin{quote}
Affine subtraction.
\end{quote}

{\bf Syntax}

\begin{quote}
{\tt [maff] = minus(a, b)  }
\end{quote}

{\bf Description}

\begin{quote}
Returns an \optvec\: which is the difference of {\tt a} and {\tt
b}. Both {\tt a} and {\tt b} must be of type \optvec.

{\tt [maff] = minus(a, b)} is called for the syntax {\tt a - b}.
\end{quote}

%-----------------

\newpage
{\bf \Huge optVector/mrdivide}
\leavevmode\leaders\hrule height 1mm \hfill
%\rule{2in}{1mm}
\vspace{0.25in}

{\bf Purpose}

\begin{quote}
Scalar division.
\end{quote}

{\bf Syntax}

\begin{quote}
{\tt [dopt] = mrdivide(a, b)  }
\end{quote}

{\bf Description}

\begin{quote}
Divides {\tt a} by {\tt b}. {\tt a} must be an \optvec, and {\tt b} must
be a scalar.

{\tt [dopt] = mrdivide(a, b)} is called for the syntax {\tt a / b}.
\end{quote}

%-----------------

\newpage
{\bf \Huge optVector/mtimes}
\leavevmode\leaders\hrule height 1mm \hfill
%\rule{2in}{1mm}
\vspace{0.25in}

{\bf Purpose}

\begin{quote}
Matrix-vector multiplication.
\end{quote}

{\bf Syntax}

\begin{quote}
{\tt [mopt] = mtimes(a, b)  }
\end{quote}

{\bf Description}

\begin{quote}
Multiplies {\tt a} by {\tt b}. Only one of {\tt a} and {\tt b} can
depend on the optimization variables. {\tt a} and {\tt b} must be of the
same length.

{\tt [mopt] = mtimes(a, b)} is called for the syntax {\tt a * b}.
\end{quote}

%-----------------

\newpage
{\bf \Huge optVector/numvars}
\leavevmode\leaders\hrule height 1mm \hfill
%\rule{2in}{1mm}
\vspace{0.25in}

{\bf Purpose}

\begin{quote}
Number of optimization variables.
\end{quote}

{\bf Syntax}

\begin{quote}
{\tt nn = numvars(opt)  }
\end{quote}

{\bf Description}

\begin{quote}
Returns the number of optimization variables upon which {\tt opt}
depends (that is, the number of rows of {\tt opt}'s kernel matrix).
\end{quote}

%-----------------

\newpage
{\bf \Huge optVector/optimal}
\leavevmode\leaders\hrule height 1mm \hfill
%\rule{2in}{1mm}
\vspace{0.25in}

{\bf Purpose}

\begin{quote}
Optimal constant sequence.
\end{quote}

{\bf Syntax}

\begin{quote}
{\tt optvec = optimal(opt, soln)  }
\end{quote}

{\bf Description}

\begin{quote}
Returns optimal constant sequence based on {\tt soln} furnished by {\tt
minimize}. 
\end{quote}

{\bf See Also}

\begin{quote}
\begin{tabbing}
\hspace*{1.5in} \= \kill 
{\tt minimize} \> Interface to optimization engines.
\end{tabbing}
\end{quote}

%-----------------

\newpage
{\bf \Huge optVector/plus}
\leavevmode\leaders\hrule height 1mm \hfill
%\rule{2in}{1mm}
\vspace{0.25in}

{\bf Purpose}

\begin{quote}
Affine addition.
\end{quote}

{\bf Syntax}

\begin{quote}
{\tt [paff] = plus(a, b)  }
\end{quote}

{\bf Description}

\begin{quote}
Returns an \optvec\: which is the sum of {\tt a} and {\tt
b}. Both {\tt a} and {\tt b} must be of type \optvec.

{\tt [paff] = plus(a, b)} is called for the syntax {\tt a + b}.
\end{quote}

%-----------------

\newpage
{\bf \Huge optVector/power}
\leavevmode\leaders\hrule height 1mm \hfill
%\rule{2in}{1mm}
\vspace{0.25in}

{\bf Purpose}

\begin{quote}
Elementwise power.
\end{quote}

{\bf Syntax}

\begin{quote}
{\tt [aquad] = power(a, b)  }
\end{quote}

{\bf Description}

\begin{quote}
Returns {\tt a} raised to the power {\tt b} as an \optquad\:. {\tt b}
must be 2.

{\tt [aquad] = power(a, b)} is called for the syntax \verb|a .^ b|.
\end{quote}

%-----------------

\newpage
{\bf \Huge optVector/real}
\leavevmode\leaders\hrule height 1mm \hfill
%\rule{2in}{1mm}
\vspace{0.25in}

{\bf Purpose}

\begin{quote}
Complex real part.
\end{quote}

{\bf Syntax}

\begin{quote}
{\tt [ropt] = real(opt)  }
\end{quote}

{\bf Description}

\begin{quote}
Returns an \optvec\: which is the real part of {\tt opt}.
\end{quote}

%-----------------

\newpage
{\bf \Huge optVector/set\_h, set\_pool, set\_xoff}
\leavevmode\leaders\hrule height 1mm \hfill
%\rule{2in}{1mm}
\vspace{0.25in}

{\bf Purpose}

\begin{quote}
Kernel matrix, pool and offset insertion functions.
\end{quote}

{\bf Syntax}

\begin{quote}
{\tt optout = set\_h(opt, h)  } \\
{\tt optout = set\_pool(opt, pool)  } \\
{\tt optout = set\_xoff(opt, xoff)  }
\end{quote}

{\bf Description}

\begin{quote}
{\tt optout = set\_h(opt, h)  } replaces kernel matrix of {\tt opt} with {\tt h}.

{\tt optout = set\_pool(opt, pool)  } replaces variable pool number of {\tt opt} with {\tt pool}.

{\tt optout = set\_xoff(opt, xoff)  } replaces index of {\tt opt}'s first variable into variable pool with
{\tt xoff}. Does not check range of {\tt xoff} or allocate additional
variables. 
\end{quote}

%-----------------

\newpage
{\bf \Huge optVector/subsref}
\leavevmode\leaders\hrule height 1mm \hfill
%\rule{2in}{1mm}
\vspace{0.25in}

{\bf Purpose}

\begin{quote}
Vector subscripted reference.
\end{quote}

{\bf Syntax}

\begin{quote}
{\tt subvec = vec(s)  }
\end{quote}

{\bf Description}

\begin{quote}
Returns subvector with indices {\tt s}. 
\end{quote}
%-----------------

\newpage
{\bf \Huge optVector/sum}
\leavevmode\leaders\hrule height 1mm \hfill
%\rule{2in}{1mm}
\vspace{0.25in}

{\bf Purpose}

\begin{quote}
Affine sum.
\end{quote}

{\bf Syntax}

\begin{quote}
{\tt [saff] = sum(aff)  }
\end{quote}

{\bf Description}

\begin{quote}
Returns sum of {\tt aff} as type \optvec.
\end{quote}

%-----------------

\newpage
{\bf \Huge optVector/times}
\leavevmode\leaders\hrule height 1mm \hfill
%\rule{2in}{1mm}
\vspace{0.25in}

{\bf Purpose}

\begin{quote}
Element-wise multiplication.
\end{quote}

{\bf Syntax}

\begin{quote}
{\tt [mopt] = times(a, b)  }
\end{quote}

{\bf Description}

\begin{quote}
Returns element-wise product of {\tt a} and {\tt b} as an \optvec. Only
one of {\tt a} and {\tt b} can depend on the optimization variables.

{\tt [mopt] = times(a, b)} is called for the syntax {\tt a .* b}.
\end{quote}

%-----------------

\newpage
{\bf \Huge optVector/uminus}
\leavevmode\leaders\hrule height 1mm \hfill
%\rule{2in}{1mm}
\vspace{0.25in}

{\bf Purpose}

\begin{quote}
Unary minus.
\end{quote}

{\bf Syntax}

\begin{quote}
{\tt [mopt] = uminus(opt)  }
\end{quote}

{\bf Description}

\begin{quote}
Negates the elements of {\tt opt.}

{\tt [mopt] = uminus(opt)} is called for the syntax {\tt -opt}.
\end{quote}

%-----------------
