public class Tuple extends Object implements RealFieldElement<Tuple>
DEG_TO_RAD, RAD_TO_DEG
Constructor and Description |
---|
Tuple(double... x)
Creates a new instance from its components.
|
Modifier and Type | Method and Description |
---|---|
Tuple |
abs()
absolute value.
|
Tuple |
acos()
Arc cosine operation.
|
Tuple |
acosh()
Inverse hyperbolic cosine operation.
|
Tuple |
add(double a)
'+' operator.
|
Tuple |
add(Tuple a)
Compute this + a.
|
Tuple |
asin()
Arc sine operation.
|
Tuple |
asinh()
Inverse hyperbolic sine operation.
|
Tuple |
atan()
Arc tangent operation.
|
Tuple |
atan2(Tuple x)
Two arguments arc tangent operation.
|
Tuple |
atanh()
Inverse hyperbolic tangent operation.
|
Tuple |
cbrt()
Cubic root.
|
Tuple |
ceil()
Get the smallest whole number larger than instance.
|
Tuple |
copySign(double sign)
Returns the instance with the sign of the argument.
|
Tuple |
copySign(Tuple sign)
Returns the instance with the sign of the argument.
|
Tuple |
cos()
Cosine operation.
|
Tuple |
cosh()
Hyperbolic cosine operation.
|
Tuple |
divide(double a)
'÷' operator.
|
Tuple |
divide(Tuple a)
Compute this ÷ a.
|
boolean |
equals(Object obj) |
Tuple |
exp()
Exponential.
|
Tuple |
expm1()
Exponential minus 1.
|
Tuple |
floor()
Get the largest whole number smaller than instance.
|
double |
getComponent(int index)
Get one component of the tuple.
|
double[] |
getComponents()
Get all components of the tuple.
|
int |
getDimension()
Get the dimension of the tuple.
|
Field<Tuple> |
getField()
Get the
Field to which the instance belongs. |
double |
getReal()
Get the real value of the number.
|
int |
hashCode() |
Tuple |
hypot(Tuple y)
Returns the hypotenuse of a triangle with sides
this and y
- sqrt(this2 +y2)
avoiding intermediate overflow or underflow. |
Tuple |
linearCombination(double[] a,
Tuple[] b)
Compute a linear combination.
|
Tuple |
linearCombination(double a1,
Tuple b1,
double a2,
Tuple b2)
Compute a linear combination.
|
Tuple |
linearCombination(double a1,
Tuple b1,
double a2,
Tuple b2,
double a3,
Tuple b3)
Compute a linear combination.
|
Tuple |
linearCombination(double a1,
Tuple b1,
double a2,
Tuple b2,
double a3,
Tuple b3,
double a4,
Tuple b4)
Compute a linear combination.
|
Tuple |
linearCombination(Tuple[] a,
Tuple[] b)
Compute a linear combination.
|
Tuple |
linearCombination(Tuple a1,
Tuple b1,
Tuple a2,
Tuple b2)
Compute a linear combination.
|
Tuple |
linearCombination(Tuple a1,
Tuple b1,
Tuple a2,
Tuple b2,
Tuple a3,
Tuple b3)
Compute a linear combination.
|
Tuple |
linearCombination(Tuple a1,
Tuple b1,
Tuple a2,
Tuple b2,
Tuple a3,
Tuple b3,
Tuple a4,
Tuple b4)
Compute a linear combination.
|
Tuple |
log()
Natural logarithm.
|
Tuple |
log10()
Base 10 logarithm.
|
Tuple |
log1p()
Shifted natural logarithm.
|
Tuple |
multiply(double a)
'×' operator.
|
Tuple |
multiply(int n)
Compute n × this.
|
Tuple |
multiply(Tuple a)
Compute this × a.
|
Tuple |
negate()
Returns the additive inverse of
this element. |
Tuple |
pow(double p)
Power operation.
|
Tuple |
pow(int n)
Integer power operation.
|
Tuple |
pow(Tuple e)
Power operation.
|
Tuple |
reciprocal()
Returns the multiplicative inverse of
this element. |
Tuple |
remainder(double a)
IEEE remainder operator.
|
Tuple |
remainder(Tuple a)
IEEE remainder operator.
|
Tuple |
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.
|
Tuple |
rootN(int n)
Nth root.
|
long |
round()
Get the closest long to instance value.
|
Tuple |
scalb(int n)
Multiply the instance by a power of 2.
|
Tuple |
signum()
Compute the signum of the instance.
|
Tuple |
sin()
Sine operation.
|
FieldSinCos<Tuple> |
sinCos()
Combined Sine and Cosine operation.
|
Tuple |
sinh()
Hyperbolic sine operation.
|
Tuple |
sqrt()
Square root.
|
Tuple |
subtract(double a)
'-' operator.
|
Tuple |
subtract(Tuple a)
Compute this - a.
|
Tuple |
tan()
Tangent operation.
|
Tuple |
tanh()
Hyperbolic tangent operation.
|
Tuple |
toDegrees()
Convert radians to degrees, with error of less than 0.5 ULP
|
Tuple |
toRadians()
Convert degrees to radians, with error of less than 0.5 ULP
|
public Tuple(double... x)
x
- components of the tuplepublic int getDimension()
public double getComponent(int index)
index
- index of the component, between 0 and getDimension()
- 1public double[] getComponents()
public Field<Tuple> getField()
Field
to which the instance belongs.getField
in interface FieldElement<Tuple>
Field
to which the instance belongspublic Tuple add(Tuple a)
add
in interface FieldElement<Tuple>
a
- element to addpublic Tuple subtract(Tuple a)
subtract
in interface FieldElement<Tuple>
a
- element to subtractpublic Tuple negate()
this
element.negate
in interface FieldElement<Tuple>
this
.public Tuple multiply(Tuple a)
multiply
in interface FieldElement<Tuple>
a
- element to multiplypublic Tuple multiply(int n)
multiply
in interface FieldElement<Tuple>
n
- Number of times this
must be added to itself.public Tuple divide(Tuple a)
divide
in interface FieldElement<Tuple>
a
- element to divide bypublic Tuple reciprocal()
this
element.reciprocal
in interface FieldElement<Tuple>
reciprocal
in interface RealFieldElement<Tuple>
this
.public double getReal()
getReal
in interface RealFieldElement<Tuple>
public Tuple add(double a)
add
in interface RealFieldElement<Tuple>
a
- right hand side parameter of the operatorpublic Tuple subtract(double a)
subtract
in interface RealFieldElement<Tuple>
a
- right hand side parameter of the operatorpublic Tuple multiply(double a)
multiply
in interface RealFieldElement<Tuple>
a
- right hand side parameter of the operatorpublic Tuple divide(double a)
divide
in interface RealFieldElement<Tuple>
a
- right hand side parameter of the operatorpublic Tuple remainder(double a)
remainder
in interface RealFieldElement<Tuple>
a
- right hand side parameter of the operatorpublic Tuple remainder(Tuple a)
remainder
in interface RealFieldElement<Tuple>
a
- right hand side parameter of the operatorpublic Tuple abs()
abs
in interface RealFieldElement<Tuple>
public Tuple ceil()
ceil
in interface RealFieldElement<Tuple>
public Tuple floor()
floor
in interface RealFieldElement<Tuple>
public Tuple rint()
rint
in interface RealFieldElement<Tuple>
public long round()
round
in interface RealFieldElement<Tuple>
RealFieldElement.getReal()
public Tuple signum()
signum
in interface RealFieldElement<Tuple>
public Tuple copySign(Tuple sign)
sign
argument is treated as positive.copySign
in interface RealFieldElement<Tuple>
sign
- the sign for the returned valuesign
argumentpublic Tuple copySign(double sign)
sign
argument is treated as positive.copySign
in interface RealFieldElement<Tuple>
sign
- the sign for the returned valuesign
argumentpublic Tuple scalb(int n)
scalb
in interface RealFieldElement<Tuple>
n
- power of 2public Tuple hypot(Tuple y)
this
and y
- sqrt(this2 +y2)
avoiding intermediate overflow or underflow.
hypot
in interface RealFieldElement<Tuple>
y
- a valuepublic Tuple sqrt()
sqrt
in interface RealFieldElement<Tuple>
public Tuple cbrt()
cbrt
in interface RealFieldElement<Tuple>
public Tuple rootN(int n)
rootN
in interface RealFieldElement<Tuple>
n
- order of the rootpublic Tuple pow(double p)
pow
in interface RealFieldElement<Tuple>
p
- power to applypublic Tuple pow(int n)
pow
in interface RealFieldElement<Tuple>
n
- power to applypublic Tuple pow(Tuple e)
pow
in interface RealFieldElement<Tuple>
e
- exponentpublic Tuple exp()
exp
in interface RealFieldElement<Tuple>
public Tuple expm1()
expm1
in interface RealFieldElement<Tuple>
public Tuple log()
log
in interface RealFieldElement<Tuple>
public Tuple log1p()
log1p
in interface RealFieldElement<Tuple>
public Tuple log10()
log10
in interface RealFieldElement<Tuple>
public Tuple cos()
cos
in interface RealFieldElement<Tuple>
public Tuple sin()
sin
in interface RealFieldElement<Tuple>
public FieldSinCos<Tuple> sinCos()
sinCos
in interface RealFieldElement<Tuple>
public Tuple tan()
tan
in interface RealFieldElement<Tuple>
public Tuple acos()
acos
in interface RealFieldElement<Tuple>
public Tuple asin()
asin
in interface RealFieldElement<Tuple>
public Tuple atan()
atan
in interface RealFieldElement<Tuple>
public Tuple atan2(Tuple x)
atan2
in interface RealFieldElement<Tuple>
x
- second argument of the arc tangentpublic Tuple cosh()
cosh
in interface RealFieldElement<Tuple>
public Tuple sinh()
sinh
in interface RealFieldElement<Tuple>
public Tuple tanh()
tanh
in interface RealFieldElement<Tuple>
public Tuple acosh()
acosh
in interface RealFieldElement<Tuple>
public Tuple asinh()
asinh
in interface RealFieldElement<Tuple>
public Tuple atanh()
atanh
in interface RealFieldElement<Tuple>
public Tuple toDegrees()
toDegrees
in interface RealFieldElement<Tuple>
public Tuple toRadians()
toRadians
in interface RealFieldElement<Tuple>
public Tuple linearCombination(Tuple[] a, Tuple[] b) throws MathIllegalArgumentException
linearCombination
in interface RealFieldElement<Tuple>
a
- Factors.b
- Factors.Σi ai bi
.MathIllegalArgumentException
- if arrays dimensions don't matchpublic Tuple linearCombination(double[] a, Tuple[] b) throws MathIllegalArgumentException
linearCombination
in interface RealFieldElement<Tuple>
a
- Factors.b
- Factors.Σi ai bi
.MathIllegalArgumentException
- if arrays dimensions don't matchpublic Tuple linearCombination(Tuple a1, Tuple b1, Tuple a2, Tuple b2)
linearCombination
in interface RealFieldElement<Tuple>
a1
- first factor of the first termb1
- second factor of the first terma2
- first factor of the second termb2
- second factor of the second termRealFieldElement.linearCombination(Object, Object, Object, Object, Object, Object)
,
RealFieldElement.linearCombination(Object, Object, Object, Object, Object, Object, Object, Object)
public Tuple linearCombination(double a1, Tuple b1, double a2, Tuple b2)
linearCombination
in interface RealFieldElement<Tuple>
a1
- first factor of the first termb1
- second factor of the first terma2
- first factor of the second termb2
- second factor of the second termRealFieldElement.linearCombination(double, Object, double, Object, double, Object)
,
RealFieldElement.linearCombination(double, Object, double, Object, double, Object, double, Object)
public Tuple linearCombination(Tuple a1, Tuple b1, Tuple a2, Tuple b2, Tuple a3, Tuple b3)
linearCombination
in interface RealFieldElement<Tuple>
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 termRealFieldElement.linearCombination(Object, Object, Object, Object)
,
RealFieldElement.linearCombination(Object, Object, Object, Object, Object, Object, Object, Object)
public Tuple linearCombination(double a1, Tuple b1, double a2, Tuple b2, double a3, Tuple b3)
linearCombination
in interface RealFieldElement<Tuple>
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 termRealFieldElement.linearCombination(double, Object, double, Object)
,
RealFieldElement.linearCombination(double, Object, double, Object, double, Object, double, Object)
public Tuple linearCombination(Tuple a1, Tuple b1, Tuple a2, Tuple b2, Tuple a3, Tuple b3, Tuple a4, Tuple b4)
linearCombination
in interface RealFieldElement<Tuple>
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 termRealFieldElement.linearCombination(Object, Object, Object, Object)
,
RealFieldElement.linearCombination(Object, Object, Object, Object, Object, Object)
public Tuple linearCombination(double a1, Tuple b1, double a2, Tuple b2, double a3, Tuple b3, double a4, Tuple b4)
linearCombination
in interface RealFieldElement<Tuple>
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 termRealFieldElement.linearCombination(double, Object, double, Object)
,
RealFieldElement.linearCombination(double, Object, double, Object, double, Object)
Copyright © 2016–2019 Hipparchus.org. All rights reserved.