Class AbstractPolynomial<N extends Comparable<N>, P extends AbstractPolynomial<N,P> >
java.lang.Object
org.ojalgo.function.polynomial.AbstractPolynomial<N,P>
- All Implemented Interfaces:
DoubleUnaryOperator, Function<N,N>, UnaryOperator<N>, Group, Group.Additive<PolynomialFunction<N>>, Operation, Operation.Addition<PolynomialFunction<N>>, Operation.Multiplication<PolynomialFunction<N>>, Ring<PolynomialFunction<N>>, BasicFunction, BasicFunction.Differentiable<N, PolynomialFunction<N>>, BasicFunction.Integratable<N, PolynomialFunction<N>>, PolynomialFunction<N>, UnaryFunction<N>, Access1D<N>, Mutate1D, Structure1D
- Direct Known Subclasses:
PolynomialR032, PolynomialR064, PolynomialR256, ScalarPolynomial
abstract class AbstractPolynomial<N extends Comparable<N>, P extends AbstractPolynomial<N,P>>
extends Object
implements PolynomialFunction<N>
-
Nested Class Summary
Nested classes/interfaces inherited from interface Access1D
Access1D.Aggregatable<N>, Access1D.Collectable<N,R>, Access1D.ElementView<N>, Access1D.SelectionView<N>, Access1D.Sliceable<N>, Access1D.Visitable<N> Nested classes/interfaces inherited from interface BasicFunction
BasicFunction.Differentiable<N,F>, BasicFunction.Integratable<N, F>, BasicFunction.PlainUnary<T, R> Nested classes/interfaces inherited from interface Group
Group.Additive<T>, Group.Multiplicative<T>Nested classes/interfaces inherited from interface Mutate1D
Mutate1D.Fillable<N>, Mutate1D.Mixable<N>, Mutate1D.Modifiable<N>, Mutate1D.ModifiableReceiver<N>, Mutate1D.Receiver<N>, Mutate1D.SortableNested classes/interfaces inherited from interface Operation
Operation.Addition<T>, Operation.Division<T>, Operation.Multiplication<T>, Operation.Subtraction<T>Nested classes/interfaces inherited from interface Structure1D
Structure1D.BasicMapper<T>, Structure1D.IndexMapper<T>, Structure1D.IntIndex, Structure1D.Logical<S,B>, Structure1D.LongIndex, Structure1D.LoopCallback -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NumberContextprivate final BasicArray<N> private Pprivate P -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(PolynomialFunction<N> addend) (package private) BasicArray<N> longcount()The total number of elements in this structure.intdegree(NumberContext accuracy) The largest exponent/power of the non-zero (to the given accuracy) coefficients.doubledoubleValue(int power) booleanvoidvoidestimate(NumberSeries<?> samples) (package private) voidestimate(Access1D<?> x, Access1D<?> y, PhysicalStore.Factory<N, ?> store, QR.Factory<N> qr) get(long power) protected abstract NgetDerivativeFactor(int power) protected abstract NgetPrimitiveFactor(int power) inthashCode()doubleinvoke(double arg) floatinvoke(float arg) abstract Pmultiply(PolynomialFunction<N> multiplicand) protected abstract PnewInstance(int size) (package private) doublenorm(int power) (package private) abstract Pone()final Ppower(int power) Multiply by itselfpowertimes.voidset(int power, double coefficient) voidfinal voidset(long power, Comparable<?> value) final voidintsize()The total number of elements in this structure.toString()Methods inherited from interface Access1D
asCollectable1D, asKeyed1D, asList, axpy, byteValue, byteValue, dot, doubleValue, elements, floatValue, floatValue, intValue, intValue, longValue, longValue, nonzeros, select, shortValue, shortValue, supplyTo, toList, toRawCopy1DMethods inherited from interface BasicFunction.Integratable
integrateMethods inherited from interface DoubleUnaryOperator
andThen, composeMethods inherited from interface Group.Additive
negateMethods inherited from interface Mutate1D
reset, set, set, set, set, set, set, set, set, set, set, setMethods inherited from interface PolynomialFunction
degree, estimateMethods inherited from interface UnaryFunction
andThen, apply, applyAsDouble, compose, invoke, invoke, invoke, invoke, invoke
-
Field Details
-
DEGREE_ACCURACY
-
myCoefficients
-
myDerivative
-
myPrimitive
-
-
Constructor Details
-
AbstractPolynomial
AbstractPolynomial(BasicArray<N> coefficients)
-
-
Method Details
-
add
- Specified by:
addin interfaceOperation.Addition<N extends Comparable<N>>- Parameters:
addend- What to add- Returns:
this + addend
-
buildDerivative
- Specified by:
buildDerivativein interfaceBasicFunction.Differentiable<N extends Comparable<N>, P extends AbstractPolynomial<N,P>>
-
buildPrimitive
- Specified by:
buildPrimitivein interfaceBasicFunction.Integratable<N extends Comparable<N>, P extends AbstractPolynomial<N,P>>
-
count
public long count()Description copied from interface:Structure1DThe total number of elements in this structure.You only need to implement this method if the structure can contain more than Integer.MAX_VALUE elements.
- Specified by:
countin interfaceStructure1D
-
degree
Description copied from interface:PolynomialFunctionThe largest exponent/power of the non-zero (to the given accuracy) coefficients.- Specified by:
degreein interfacePolynomialFunction<N extends Comparable<N>>
-
doubleValue
public double doubleValue(int power) - Specified by:
doubleValuein interfaceAccess1D<N extends Comparable<N>>
-
equals
-
estimate
- Specified by:
estimatein interfacePolynomialFunction<N extends Comparable<N>>
-
estimate
- Specified by:
estimatein interfacePolynomialFunction<N extends Comparable<N>>
-
get
-
hashCode
-
invoke
public double invoke(double arg) - Specified by:
invokein interfaceUnaryFunction<N extends Comparable<N>>
-
invoke
public float invoke(float arg) - Specified by:
invokein interfaceUnaryFunction<N extends Comparable<N>>
-
multiply
- Specified by:
multiplyin interfaceOperation.Multiplication<N extends Comparable<N>>- Parameters:
multiplicand- The multiplicand- Returns:
this * multiplicand.
-
power
Description copied from interface:Operation.MultiplicationMultiply by itselfpowertimes.- Specified by:
powerin interfaceOperation.Multiplication<N extends Comparable<N>>
-
set
- Specified by:
setin interfacePolynomialFunction<N extends Comparable<N>>
-
set
-
set
- Specified by:
setin interfacePolynomialFunction<N extends Comparable<N>>
-
set
-
size
public int size()Description copied from interface:Structure1DThe total number of elements in this structure.- Specified by:
sizein interfaceStructure1D
-
toString
-
getDerivativeFactor
-
getPrimitiveFactor
-
newInstance
-
coefficients
BasicArray<N> coefficients() -
estimate
-
norm
double norm(int power) -
one
-