%$Id: tr_cpoly.tex,v 21.13 2002/03/25 05:37:03 al Exp $
% man Tech tr_cpoly .
% Copyright (C) 2001 Albert Davis
% Author: Albert Davis <aldavis@ieee.org>
%
% This file is part of "Gnucap", the Gnu Circuit Analysis Package
%
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2, or (at your option)
% any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software
% Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
% 02111-1307, USA.
%------------------------------------------------------------------------
\subsection{The ``CPOLY'' and ``FPOLY'' classes}

Before beginning a discussion of the evaluation and stamp methods, it
is necessary to understand the ``CPOLY'' and ``FPOLY'' classes.

These classes represent polynomials.  At present, only the first order
versions are used, but consider that they could be extended to any
order.

When evaluating a function $f(x)$, there are several possible
representations for the result.  The ``CPOLY'' and ``FPOLY'' represent
two of them.

The ``CPOLY'' classes represent the result in a traditional polynomial
form.  Consider a series of terms, c0, c1, c2, ...  These represent
the coefficients of a Taylor series of the function expanded about 0.
(Maclauran series).  Thus $f(x) = c_0 + c_1 x + c_2 x^2 + c_3 x^3 +
... $ In most cases, only the c0 and c1 terms are used, hence the
``CPOLY1'' class.  The series is truncated, so it is exact only at one
point.  The value ``x'' in the ``CPOLY'' class is the point at which
the truncated series is exact, so it is not truly a series expanded
about 0.

The other ``FPOLY'' classes represent the same polynomial as a Taylor
series expanded about a point ``x''.  Again, consider a series of
terms, f0, f1, f2, ...  This time the terms represent the function
evaluated at x and its derivatives.  Therefore, f0 is $f(x)$, f1 is
the first derivative, f2 is the second derivative, and so on.  To
evaluate this for some $t$ near $x$, $f(t) = f_0 + f_1 (t-x) + f_2
(t-x)^2 + f_3 (t-x)^3 + ... $ Again, in most cases, only the f0 and f1
terms are used, hence the ``FPOLY1'' class.

Both of these are equivalent in the sense that they represent the same
data, and there are functions (constructors) that convert between
them.  The ``FPOLY'' form is usually most convenient for function
evaluation used in behavioral modeling and device modeling.  The
``CPOLY'' form is most suitable for stamping into the admittance
matrix and current vector for the final solution.
%------------------------------------------------------------------------
%------------------------------------------------------------------------
