Class ScaledPolynomial
- java.lang.Object
-
- dev.nm.analysis.function.rn2r1.AbstractRealScalarFunction
-
- dev.nm.analysis.function.rn2r1.univariate.AbstractUnivariateRealFunction
-
- dev.nm.analysis.function.polynomial.Polynomial
-
- dev.nm.analysis.function.polynomial.ScaledPolynomial
-
- All Implemented Interfaces:
AbelianGroup<Polynomial>
,Monoid<Polynomial>
,Ring<Polynomial>
,VectorSpace<Polynomial,Real>
,Function<Vector,Double>
,RealScalarFunction
,UnivariateRealFunction
public class ScaledPolynomial extends Polynomial
This constructs a scaled polynomial that has neither too big or too small coefficients, hence avoiding overflow or underflow. This scaling factor is automatically computed from the coefficients of the given polynomial and is a power of the base.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface dev.nm.analysis.function.Function
Function.EvaluationException
-
-
Field Summary
-
Fields inherited from class dev.nm.analysis.function.polynomial.Polynomial
ONE, ZERO
-
-
Constructor Summary
Constructors Constructor Description ScaledPolynomial(Polynomial p)
Construct a scaled polynomial, with 2 as the base of the scaling factor.ScaledPolynomial(Polynomial p, double base)
Construct a scaled polynomial, with a base of the scaling factor.
-
Method Summary
-
Methods inherited from class dev.nm.analysis.function.polynomial.Polynomial
add, degree, equals, evaluate, evaluate, evaluate, getCoefficient, getCoefficients, getNormalization, hashCode, minus, multiply, ONE, opposite, pow, scaled, scaled, toString, ZERO
-
Methods inherited from class dev.nm.analysis.function.rn2r1.univariate.AbstractUnivariateRealFunction
evaluate
-
Methods inherited from class dev.nm.analysis.function.rn2r1.AbstractRealScalarFunction
dimensionOfDomain, dimensionOfRange
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface dev.nm.analysis.function.Function
dimensionOfDomain, dimensionOfRange
-
-
-
-
Constructor Detail
-
ScaledPolynomial
public ScaledPolynomial(Polynomial p, double base)
Construct a scaled polynomial, with a base of the scaling factor.- Parameters:
p
- a polynomialbase
- base of the scaling factor
-
ScaledPolynomial
public ScaledPolynomial(Polynomial p)
Construct a scaled polynomial, with 2 as the base of the scaling factor.- Parameters:
p
- a polynomial
-
-