\subsection{Methods}
This section decribes all the functions in the file ``ptwXY\_method.c''.

\subsubsection{ptwXY\_clip}
This function clips the y-values of \highlight{ptwXY} to be within the range \highlight{rangeMin} and \highlight{rangeMax}.
Points will be added to insure that the curve within the \highlight{rangeMin} and \highlight{rangeMax} is not altered.
\setargumentNameLengths{allocatedSize}
\CallingC{fnu\_status ptwXY\_clip(}{statusMessageReporting *smr,
    \addArgument{ptwXYPoints *ptwXY,}
    \addArgument{double rangeMin,}
    \addArgument{double rangeMax );}}
    \argumentBox{smr}{The \highlight{statusMessageReporting} instance to record errors.}
    \argumentBox{ptwXY}{A pointer to the \highlight{ptwXYPoints} object.}
    \argumentBox{rangeMin}{All y-values in \highlight{ptwXY} will be greater than or equal to this value.}
    \argumentBox{rangeMax}{All y-values in \highlight{ptwXY} will be less than or equal to this value.}

\subsubsection{ptwXY\_thicken}
This function thicken the points in \highlight{ptwXY} by adding points as determined by the input parameters.
\setargumentNameLengths{sectionSubdivideMax}
\CallingC{fnu\_status ptwXY\_thicken(}{statusMessageReporting *smr,
    \addArgument{ptwXYPoints *ptwXY,}
    \addArgument{int sectionSubdivideMax,}
    \addArgument{double dDomainMax,}
    \addArgument{double fDomainMax );}}
    \argumentBox{smr}{The \highlight{statusMessageReporting} instance to record errors.}
    \argumentBox{ptwXY}{A pointer to the \highlight{ptwXYPoints} object.}
    \argumentBox{sectionSubdivideMax}{The maximum number of points to add between two initial consecutive points.}
    \argumentBox{dDomainMax}{The desired maximum absolute x step between consecutive points.}
    \argumentBox{fDomainMax}{The desired maximum relative x step between consecutive points.}
This function adds points so that $x_{j+1} - x_j \le \highlight{dDoaminMax}$ and $x_{j+1} / x_j \le \highlight{fDomainMax}$ but will never add
more then \highlight{sectionSubdivideMax} points between any of the orginal points. If \highlight{sectionSubdivideMax} $<$ 1
or \highlight{dDomainMax} $<$ 0 or \highlight{fDomainMax} $<$ 1, the error \highlight{nfu\_badInput} is return.

\subsubsection{ptwXY\_thin}
This function returns a clone of \highlight{ptwXY} with its points thinned (i.e., removed) while maintaining interpolation 
\highlight{accuracy} with \highlight{ptwXY}.
\setargumentNameLengths{accuracy}
\CallingC{ptwXPoints *ptwXY\_thin(}{statusMessageReporting *smr,
    \addArgument{ptwXYPoints *ptwXY,}
    \addArgument{double accuracy );}}
    \argumentBox{smr}{The \highlight{statusMessageReporting} instance to record errors.}
    \argumentBox{ptwXY}{A pointer to the \highlight{ptwXYPoints} object.}
    \argumentBox{accuracy}{The accuracy of the thinned \highlight{ptwXYPoints} object.}
    \vskip 0.05 in \noindent

\subsubsection{ptwXY\_thinDomain}
This function returns a clone of \highlight{ptwXYPoints} whose x-values are those of \highlight{ptwXY} but thinned so that
\begin{equation}
    x[i+1] - x[i] \ge 0.5 \times \rm{epsilon} \times (x[i+1] + x[i]) \ \ \ .
\end{equation}
\setargumentNameLengths{accuracy}
\CallingC{ptwXPoints *ptwXY\_thinDomain(}{statusMessageReporting *smr,
    \addArgument{ptwXYPoints *ptwXY,}
    \addArgument{double epsilon );}}
    \argumentBox{smr}{The \highlight{statusMessageReporting} instance to record errors.}
    \argumentBox{ptwXY}{A pointer to the \highlight{ptwXYPoints} object.}
    \argumentBox{epsilon}{The epsilon to thin the x-values to.}
    \vskip 0.05 in \noindent

\subsubsection{ptwXY\_trim}
This function removes all extra 0.'s at the beginning and end of \highlight{ptwXY}.
\CallingC{fnu\_status ptwXY\_trim(}{statusMessageReporting *smr,
    \addArgument{ptwXYPoints *ptwXY );}}
    \argumentBox{smr}{The \highlight{statusMessageReporting} instance to record errors.}
    \argumentBox{ptwXY}{A pointer to the \highlight{ptwXYPoints} object.}
    \vskip 0.05 in \noindent
If \highlight{ptwXYPoints} starts (ends) with more than two 0.'s then all intermediary are removed.

\subsubsection{ptwXY\_union}
This function creates a new \highlight{ptwXY} instance whose x-values are the union of \highlight{ptwXY1}'s and \highlight{ptwXY2}'s 
x-values. The domains of \highlight{ptwXY1} and \highlight{ptwXY2} do not have to be mutual.
\setargumentNameLengths{unionOptions}
\CallingC{ptwXYPoints *ptwXY\_union(}{statusMessageReporting *smr,
    \addArgument{ptwXYPoints *ptwXY1,}
    \addArgument{ptwXYPoints *ptwXY2,}
    \addArgument{int unionOptions );}}
    \argumentBox{smr}{The \highlight{statusMessageReporting} instance to record errors.}
    \argumentBox{ptwXY1}{A pointer to a \highlight{ptwXYPoints} object.}
    \argumentBox{ptwXY2}{A pointer to a \highlight{ptwXYPoints} object.}
    \argumentBox{unionOptions}{Specifies options (see below).}
    \vskip 0.05 in \noindent
If an error occurs, NULL is returned. The default behavior of this function can be altered by setting bits
in the argument \highlight{unionOptions} . Currently, there are two bits, set via the C marcos
\highlight{ptwXY\_union\_fill} and \highlight{ptwXY\_union\_trim},
that alter \highlight{ptwXY\_union}'s behavior. The macro \highlight{ptwXY\_\-union\_\-fill} causes all y-values of the new \highlight{ptwXYPoints} object
to be filled via the y-values of \highlight{ptwXY1}; otherwise, the y-values are all zero. 
Normally, the new \highlight{ptwXYPoints} object's x domain spans all x-values
in both \highlight{ptwXY1} and \highlight{ptwXY2}. The macro \highlight{ptwXY\_\-union\_\-trim} limits the x domain to the common x domain
of \highlight{ptwXY1} and \highlight{ptwXY2}.

The returned \highlight{ptwXYPoints} object will always contain no points in the \highlight{overflowPoints} region.

\subsubsection{ptwXY\_scaleOffsetXAndY}
This function scales and offset the x-values and y-values.
\CallingC{nfu\_status ptwXY\_scaleOffsetXAndY(}{statusMessageReporting *smr,
    \addArgument{ptwXYPoints *ptwXY1,}
    \addArgument{double domainScale,}
    \addArgument{double domainOffset,}
    \addArgument{double rangeScale,}
    \addArgument{double rangeOffset );}}
    \argumentBox{smr}{The \highlight{statusMessageReporting} instance to record errors.}
    \argumentBox{domainScale}{The scale for the x-values.}
    \argumentBox{domainOffset}{The offset for the x-values.}
    \argumentBox{rangeScale}{The scale for the y-values.}
    \argumentBox{rangeOffset}{The offset for the y-values.}

