pzapplet
Class ComplexToPoly
java.lang.Object
pzapplet.ComplexToPoly
- public class ComplexToPoly
- extends java.lang.Object
This class calculates a single polynomial from any number of real
or complex conjugate poles.
Complex poles must have a conjugate, as
this class uses that assumption to make fewer calculations.
This takes a complex array of values and makes available a
single polynomial.
The terms of the polynomial are represented in an array, where
the index of the array corresponds to the value of that power.
Representation: poly[x]=y is the equivalent of y*(s^x).
Additional data stored is the degree of the polynomial, to avoid
needing to search the polynomial for the highest non-zero
coefficient.
The number of points at the origin are also available through
a separate method.
- Author:
- Brian Williams
Constructor Summary |
ComplexToPoly(ORG.netlib.math.complex.Complex[] complex)
Creates a new ComplexToPoly with the given complex values |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ComplexToPoly
public ComplexToPoly(ORG.netlib.math.complex.Complex[] complex)
- Creates a new ComplexToPoly with the given complex values
- Parameters:
complex
- Complex[] of values to turn into a polynomial
getDegree
public int getDegree()
- Returns:
- the highest degree of the polynomial
getPoly
public double[] getPoly()
- Returns:
- coefficients of the polynomial from lowest to highest
toString
public java.lang.String toString()
toNormalizedString
public java.lang.String toNormalizedString()
- Returns:
- this in readable form, scaled so that the highest-order
polynomial is 1.
getZeros
public int getZeros()
- Returns:
- int representing the number of points at the origin