T
- the type of the field elementspublic class FieldTuple<T extends CalculusFieldElement<T>> extends Object implements CalculusFieldElement<FieldTuple<T>>
Constructor and Description |
---|
FieldTuple(T... x)
Creates a new instance from its components.
|
Modifier and Type | Method and Description |
---|---|
FieldTuple<T> |
abs()
absolute value.
|
FieldTuple<T> |
acos()
Arc cosine operation.
|
FieldTuple<T> |
acosh()
Inverse hyperbolic cosine operation.
|
FieldTuple<T> |
add(double a)
'+' operator.
|
FieldTuple<T> |
add(FieldTuple<T> a)
Compute this + a.
|
FieldTuple<T> |
asin()
Arc sine operation.
|
FieldTuple<T> |
asinh()
Inverse hyperbolic sine operation.
|
FieldTuple<T> |
atan()
Arc tangent operation.
|
FieldTuple<T> |
atan2(FieldTuple<T> x)
Two arguments arc tangent operation.
|
FieldTuple<T> |
atanh()
Inverse hyperbolic tangent operation.
|
FieldTuple<T> |
cbrt()
Cubic root.
|
FieldTuple<T> |
ceil()
Get the smallest whole number larger than instance.
|
FieldTuple<T> |
copySign(double sign)
Returns the instance with the sign of the argument.
|
FieldTuple<T> |
copySign(FieldTuple<T> sign)
Returns the instance with the sign of the argument.
|
FieldTuple<T> |
cos()
Cosine operation.
|
FieldTuple<T> |
cosh()
Hyperbolic cosine operation.
|
FieldTuple<T> |
divide(double a)
'÷' operator.
|
FieldTuple<T> |
divide(FieldTuple<T> a)
Compute this ÷ a.
|
boolean |
equals(Object obj) |
FieldTuple<T> |
exp()
Exponential.
|
FieldTuple<T> |
expm1()
Exponential minus 1.
|
FieldTuple<T> |
floor()
Get the largest whole number smaller than instance.
|
T |
getComponent(int index)
Get one component of the tuple.
|
T[] |
getComponents()
Get all components of the tuple.
|
int |
getDimension()
Get the dimension of the tuple.
|
Field<FieldTuple<T>> |
getField()
Get the
Field to which the instance belongs. |
FieldTuple<T> |
getPi()
Get the Archimedes constant π.
|
double |
getReal()
Get the real value of the number.
|
int |
hashCode() |
FieldTuple<T> |
hypot(FieldTuple<T> y)
Returns the hypotenuse of a triangle with sides
this and y
- sqrt(this2 +y2)
avoiding intermediate overflow or underflow. |
FieldTuple<T> |
linearCombination(double[] a,
FieldTuple<T>[] b)
Compute a linear combination.
|
FieldTuple<T> |
linearCombination(double a1,
FieldTuple<T> b1,
double a2,
FieldTuple<T> b2)
Compute a linear combination.
|
FieldTuple<T> |
linearCombination(double a1,
FieldTuple<T> b1,
double a2,
FieldTuple<T> b2,
double a3,
FieldTuple<T> b3)
Compute a linear combination.
|
FieldTuple<T> |
linearCombination(double a1,
FieldTuple<T> b1,
double a2,
FieldTuple<T> b2,
double a3,
FieldTuple<T> b3,
double a4,
FieldTuple<T> b4)
Compute a linear combination.
|
FieldTuple<T> |
linearCombination(FieldTuple<T>[] a,
FieldTuple<T>[] b)
Compute a linear combination.
|
FieldTuple<T> |
linearCombination(FieldTuple<T> a1,
FieldTuple<T> b1,
FieldTuple<T> a2,
FieldTuple<T> b2)
Compute a linear combination.
|
FieldTuple<T> |
linearCombination(FieldTuple<T> a1,
FieldTuple<T> b1,
FieldTuple<T> a2,
FieldTuple<T> b2,
FieldTuple<T> a3,
FieldTuple<T> b3)
Compute a linear combination.
|
FieldTuple<T> |
linearCombination(FieldTuple<T> a1,
FieldTuple<T> b1,
FieldTuple<T> a2,
FieldTuple<T> b2,
FieldTuple<T> a3,
FieldTuple<T> b3,
FieldTuple<T> a4,
FieldTuple<T> b4)
Compute a linear combination.
|
FieldTuple<T> |
log()
Natural logarithm.
|
FieldTuple<T> |
log10()
Base 10 logarithm.
|
FieldTuple<T> |
log1p()
Shifted natural logarithm.
|
FieldTuple<T> |
multiply(double a)
'×' operator.
|
FieldTuple<T> |
multiply(FieldTuple<T> a)
Compute this × a.
|
FieldTuple<T> |
multiply(int n)
Compute n × this.
|
FieldTuple<T> |
negate()
Returns the additive inverse of
this element. |
FieldTuple<T> |
newInstance(double value)
Create an instance corresponding to a constant real value.
|
FieldTuple<T> |
pow(double p)
Power operation.
|
FieldTuple<T> |
pow(FieldTuple<T> e)
Power operation.
|
FieldTuple<T> |
pow(int n)
Integer power operation.
|
FieldTuple<T> |
reciprocal()
Returns the multiplicative inverse of
this element. |
FieldTuple<T> |
remainder(double a)
IEEE remainder operator.
|
FieldTuple<T> |
remainder(FieldTuple<T> a)
IEEE remainder operator.
|
FieldTuple<T> |
rint()
Get the whole number that is the nearest to the instance, or the even one if x is exactly half way between two integers.
|
FieldTuple<T> |
rootN(int n)
Nth root.
|
FieldTuple<T> |
scalb(int n)
Multiply the instance by a power of 2.
|
FieldTuple<T> |
sign()
Compute the sign of the instance.
|
FieldTuple<T> |
sin()
Sine operation.
|
FieldSinCos<FieldTuple<T>> |
sinCos()
Combined Sine and Cosine operation.
|
FieldTuple<T> |
sinh()
Hyperbolic sine operation.
|
FieldSinhCosh<FieldTuple<T>> |
sinhCosh()
Combined hyperbolic sine and sosine operation.
|
FieldTuple<T> |
sqrt()
Square root.
|
FieldTuple<T> |
subtract(double a)
'-' operator.
|
FieldTuple<T> |
subtract(FieldTuple<T> a)
Compute this - a.
|
FieldTuple<T> |
tan()
Tangent operation.
|
FieldTuple<T> |
tanh()
Hyperbolic tangent operation.
|
FieldTuple<T> |
toDegrees()
Convert radians to degrees, with error of less than 0.5 ULP
|
FieldTuple<T> |
toRadians()
Convert degrees to radians, with error of less than 0.5 ULP
|
FieldTuple<T> |
ulp()
Compute least significant bit (Unit in Last Position) for a number.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getExponent, isFinite, isInfinite, isNaN, norm, round
isZero
@SafeVarargs public FieldTuple(T... x)
x
- components of the tuplepublic FieldTuple<T> newInstance(double value)
newInstance
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
value
- constant real valuepublic int getDimension()
public T getComponent(int index)
index
- index of the component, between 0 and getDimension()
- 1public T[] getComponents()
public Field<FieldTuple<T>> getField()
Field
to which the instance belongs.getField
in interface FieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
Field
to which the instance belongspublic FieldTuple<T> add(FieldTuple<T> a)
add
in interface FieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
a
- element to addpublic FieldTuple<T> subtract(FieldTuple<T> a)
subtract
in interface FieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
a
- element to subtractpublic FieldTuple<T> negate()
this
element.negate
in interface FieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
this
.public FieldTuple<T> multiply(FieldTuple<T> a)
multiply
in interface FieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
a
- element to multiplypublic FieldTuple<T> multiply(int n)
multiply
in interface FieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
n
- Number of times this
must be added to itself.public FieldTuple<T> divide(FieldTuple<T> a)
divide
in interface FieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
a
- element to divide bypublic FieldTuple<T> reciprocal()
this
element.reciprocal
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
reciprocal
in interface FieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
this
.public double getReal()
getReal
in interface FieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> add(double a)
add
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
a
- right hand side parameter of the operatorpublic FieldTuple<T> subtract(double a)
subtract
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
a
- right hand side parameter of the operatorpublic FieldTuple<T> multiply(double a)
multiply
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
a
- right hand side parameter of the operatorpublic FieldTuple<T> divide(double a)
divide
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
a
- right hand side parameter of the operatorpublic FieldTuple<T> remainder(double a)
remainder
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
a
- right hand side parameter of the operatorpublic FieldTuple<T> remainder(FieldTuple<T> a)
remainder
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
a
- right hand side parameter of the operatorpublic FieldTuple<T> abs()
Just another name for CalculusFieldElement.norm()
abs
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> ceil()
ceil
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> floor()
floor
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> rint()
rint
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> sign()
sign
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> copySign(FieldTuple<T> sign)
sign
argument is treated as positive.copySign
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
sign
- the sign for the returned valuesign
argumentpublic FieldTuple<T> copySign(double sign)
sign
argument is treated as positive.copySign
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
sign
- the sign for the returned valuesign
argumentpublic FieldTuple<T> scalb(int n)
scalb
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
n
- power of 2public FieldTuple<T> ulp()
ulp
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> hypot(FieldTuple<T> y)
this
and y
- sqrt(this2 +y2)
avoiding intermediate overflow or underflow.
hypot
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
y
- a valuepublic FieldTuple<T> sqrt()
sqrt
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> cbrt()
cbrt
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> rootN(int n)
rootN
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
n
- order of the rootpublic FieldTuple<T> pow(double p)
pow
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
p
- power to applypublic FieldTuple<T> pow(int n)
pow
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
n
- power to applypublic FieldTuple<T> pow(FieldTuple<T> e)
pow
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
e
- exponentpublic FieldTuple<T> exp()
exp
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> expm1()
expm1
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> log()
log
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> log1p()
log1p
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> log10()
log10
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> cos()
cos
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> sin()
sin
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldSinCos<FieldTuple<T>> sinCos()
sinCos
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> tan()
tan
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> acos()
acos
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> asin()
asin
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> atan()
atan
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> atan2(FieldTuple<T> x)
Beware of the order or arguments! As this is based on a
two-arguments functions, in order to be consistent with
arguments order, the instance is the first argument
and the single provided argument is the second argument.
In order to be consistent with programming languages atan2
,
this method computes atan2(this, x)
, i.e. the instance
represents the y
argument and the x
argument is
the one passed as a single argument. This may seem confusing especially
for users of Wolfram alpha, as this site is not consistent
with programming languages atan2
two-arguments arc tangent
and puts x
as its first argument.
atan2
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
x
- second argument of the arc tangentpublic FieldTuple<T> cosh()
cosh
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> sinh()
sinh
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldSinhCosh<FieldTuple<T>> sinhCosh()
sinhCosh
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> tanh()
tanh
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> acosh()
acosh
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> asinh()
asinh
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> atanh()
atanh
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> toDegrees()
toDegrees
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> toRadians()
toRadians
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
public FieldTuple<T> linearCombination(FieldTuple<T>[] a, FieldTuple<T>[] b) throws MathIllegalArgumentException
linearCombination
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
a
- Factors.b
- Factors.Σi ai bi
.MathIllegalArgumentException
- if arrays dimensions don't matchpublic FieldTuple<T> linearCombination(double[] a, FieldTuple<T>[] b) throws MathIllegalArgumentException
linearCombination
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
a
- Factors.b
- Factors.Σi ai bi
.MathIllegalArgumentException
- if arrays dimensions don't matchpublic FieldTuple<T> linearCombination(FieldTuple<T> a1, FieldTuple<T> b1, FieldTuple<T> a2, FieldTuple<T> b2)
linearCombination
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
a1
- first factor of the first termb1
- second factor of the first terma2
- first factor of the second termb2
- second factor of the second termCalculusFieldElement.linearCombination(FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement)
,
CalculusFieldElement.linearCombination(FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement)
public FieldTuple<T> linearCombination(double a1, FieldTuple<T> b1, double a2, FieldTuple<T> b2)
linearCombination
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
a1
- first factor of the first termb1
- second factor of the first terma2
- first factor of the second termb2
- second factor of the second termCalculusFieldElement.linearCombination(double, FieldElement, double, FieldElement, double, FieldElement)
,
CalculusFieldElement.linearCombination(double, FieldElement, double, FieldElement, double, FieldElement, double, FieldElement)
public FieldTuple<T> linearCombination(FieldTuple<T> a1, FieldTuple<T> b1, FieldTuple<T> a2, FieldTuple<T> b2, FieldTuple<T> a3, FieldTuple<T> b3)
linearCombination
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
a1
- first factor of the first termb1
- second factor of the first terma2
- first factor of the second termb2
- second factor of the second terma3
- first factor of the third termb3
- second factor of the third termCalculusFieldElement.linearCombination(FieldElement, FieldElement, FieldElement, FieldElement)
,
CalculusFieldElement.linearCombination(FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement)
public FieldTuple<T> linearCombination(double a1, FieldTuple<T> b1, double a2, FieldTuple<T> b2, double a3, FieldTuple<T> b3)
linearCombination
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
a1
- first factor of the first termb1
- second factor of the first terma2
- first factor of the second termb2
- second factor of the second terma3
- first factor of the third termb3
- second factor of the third termCalculusFieldElement.linearCombination(double, FieldElement, double, FieldElement)
,
CalculusFieldElement.linearCombination(double, FieldElement, double, FieldElement, double, FieldElement, double, FieldElement)
public FieldTuple<T> linearCombination(FieldTuple<T> a1, FieldTuple<T> b1, FieldTuple<T> a2, FieldTuple<T> b2, FieldTuple<T> a3, FieldTuple<T> b3, FieldTuple<T> a4, FieldTuple<T> b4)
linearCombination
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
a1
- first factor of the first termb1
- second factor of the first terma2
- first factor of the second termb2
- second factor of the second terma3
- first factor of the third termb3
- second factor of the third terma4
- first factor of the fourth termb4
- second factor of the fourth termCalculusFieldElement.linearCombination(FieldElement, FieldElement, FieldElement, FieldElement)
,
CalculusFieldElement.linearCombination(FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement)
public FieldTuple<T> linearCombination(double a1, FieldTuple<T> b1, double a2, FieldTuple<T> b2, double a3, FieldTuple<T> b3, double a4, FieldTuple<T> b4)
linearCombination
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
a1
- first factor of the first termb1
- second factor of the first terma2
- first factor of the second termb2
- second factor of the second terma3
- first factor of the third termb3
- second factor of the third terma4
- first factor of the fourth termb4
- second factor of the fourth termCalculusFieldElement.linearCombination(double, FieldElement, double, FieldElement)
,
CalculusFieldElement.linearCombination(double, FieldElement, double, FieldElement, double, FieldElement)
public FieldTuple<T> getPi()
Archimedes constant is the ratio of a circle's circumference to its diameter.
getPi
in interface CalculusFieldElement<FieldTuple<T extends CalculusFieldElement<T>>>
Copyright © 2016-2022 CS GROUP. All rights reserved.