Package ch.nolix.core.math.algebra
Klasse Polynom
java.lang.Object
ch.nolix.core.math.algebra.Polynom
A
Polynom
is not mutable.
A Polynom
stores its coefficients in an array from the highest to the
lowest coefficient. -degree: n -array: [a_n,... ,a_0]- Version:
- 2016-03-01
- Autor:
- Silvan Wyss
-
Feldübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
double
getCoefficientForDegree
(int degree) int
getDerived
(int deriveCount) getIntegrated
(int integrationCount) double
getSlopeAt
(double x) double
getValueAt
(double x) This method implements the Horner scheme to calculate the value.int
hashCode()
boolean
hasSameDegreeAs
(Polynom polynom) boolean
double[]
toArray()
toString()
toVector()
static Polynom
withCoefficient
(double coefficient, double... coefficients) static Polynom
withCoefficients
(double[] coefficients)
-
Felddetails
-
EMPTY_POLYNOM
-
DEFAULT_PARAMTER_SYMBOL
- Siehe auch:
-
-
Methodendetails
-
withCoefficient
-
withCoefficients
-
equals
-
getCoefficientForDegree
public double getCoefficientForDegree(int degree) - Parameter:
degree
-- Gibt zurück:
- the coefficient for the given degree from the current
Polynom
. - Löst aus:
ArgumentIsOutOfRangeException
- if the given degree is not between 0 and the degree of the currentPolynom
.
-
getDerived
-
getDerived
- Parameter:
deriveCount
-- Gibt zurück:
- a new
Polynom
that is derived from the currentPolynom
as many times as the given deriveCount says. - Löst aus:
NegativeArgumentException
- if the given deriveCount is negative.
-
getDegree
public int getDegree()- Gibt zurück:
- the degree of the current
Polynom
.
-
getIntegrated
-
getIntegrated
- Parameter:
integrationCount
-- Gibt zurück:
- a new
Polynom
that is the integration from the currentPolynom
as many times as the given integrationCount says. - Löst aus:
NegativeArgumentException
- if the given integrationCount is negative.
-
getSlopeAt
public double getSlopeAt(double x) - Parameter:
x
-- Gibt zurück:
- the slope of the current
Polynom
at the given x.
-
getValueAt
public double getValueAt(double x) This method implements the Horner scheme to calculate the value.- Parameter:
x
-- Gibt zurück:
- the value of the current
Polynom
at the given x.
-
hashCode
public int hashCode() -
hasSameDegreeAs
- Parameter:
polynom
-- Gibt zurück:
- true if the current
Polynom
has the same degree as the given polynom.
-
isZeroPolynom
public boolean isZeroPolynom() -
toArray
public double[] toArray()- Gibt zurück:
- a new array with the coefficients of the current
Polynom
.
-
toString
-
toString
- Parameter:
parameterSymbol
-- Gibt zurück:
- a
String
representation of the currentPolynom
with the given parameterSymbol - Löst aus:
ArgumentIsNullException
- if the given parameterSymbol is null.
-
toVector
-