poly.cpp File Reference

Polynomial functions. More...

#include <itpp/base/itcompat.h>
#include <itpp/signal/poly.h>
#include <itpp/base/converters.h>
#include <itpp/base/algebra/eigen.h>
#include <itpp/base/specmat.h>
#include <itpp/base/matfunc.h>

Functions

double itpp::cheb (int n, double x)
 Chebyshev polynomial of the first kind

Chebyshev polynomials of the first kind can be defined as follows:

\[ T(x) = \left\{ \begin{array}{ll} \cos(n\arccos(x)),& |x| \leq 0 \\ \cosh(n\mathrm{arccosh}(x)),& x > 1 \\ (-1)^n \cosh(n\mathrm{arccosh}(-x)),& x < -1 \end{array} \right. \]

.

vec itpp::cheb (int n, const vec &x)
 Chebyshev polynomial of the first kind

Chebyshev polynomials of the first kind can be defined as follows:

\[ T(x) = \left\{ \begin{array}{ll} \cos(n\arccos(x)),& |x| \leq 0 \\ \cosh(n\mathrm{arccosh}(x)),& x > 1 \\ (-1)^n \cosh(n\mathrm{arccosh}(-x)),& x < -1 \end{array} \right. \]

.

mat itpp::cheb (int n, const mat &x)
 Chebyshev polynomial of the first kind

Chebyshev polynomials of the first kind can be defined as follows:

\[ T(x) = \left\{ \begin{array}{ll} \cos(n\arccos(x)),& |x| \leq 0 \\ \cosh(n\mathrm{arccosh}(x)),& x > 1 \\ (-1)^n \cosh(n\mathrm{arccosh}(-x)),& x < -1 \end{array} \right. \]

.

void itpp::poly (const vec &r, vec &p)
 Create a polynomial of the given roots

Create a polynomial p with roots r.

void itpp::poly (const cvec &r, cvec &p)
void itpp::roots (const vec &p, cvec &r)
 Calculate the roots of the polynomial

Calculate the roots r of the polynomial p.

void itpp::roots (const cvec &p, cvec &r)
vec itpp::polyval (const vec &p, const vec &x)
 Evaluate polynomial

Evaluate the polynomial p (of length $N+1$ at the points x The output is given by

\[ p_0 x^N + p_1 x^{N-1} + \ldots + p_{N-1} x + p_N \]

.

cvec itpp::polyval (const vec &p, const cvec &x)
cvec itpp::polyval (const cvec &p, const vec &x)
cvec itpp::polyval (const cvec &p, const cvec &x)


Detailed Description

Polynomial functions.

Author:
Tony Ottosson, Kumar Appaiah and Adam Piatyszek
-------------------------------------------------------------------------

Copyright (C) 1995-2008 (see AUTHORS file for a list of contributors)

This file is part of IT++ - a C++ library of mathematical, signal processing, speech processing, and communications classes and functions.

IT++ 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 3 of the License, or (at your option) any later version.

IT++ 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 IT++. If not, see <http://www.gnu.org/licenses/>.

-------------------------------------------------------------------------


Generated on Tue Jun 2 10:02:14 2009 for mixpp by  doxygen 1.5.8