|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.uwaterloo.alumni.dwharder.Numbers.Sedenion
public final class Sedenion
A class implementing sedenions using sixteen doubles.
This package allows the user to construct, manipulate, and model with sedenions. A sedenion is of the form a0 + ia1 + ja2 + ka3 + e'a4 + i'a5 + j'a6 + k'a7 + e''a8 + i''a9 + j''a10 + k''a11 + e'''a12 + i'''a13 + j'''a14 + k'''a15 where each an is a real numbers. The symbols i, j, k, e', i', j', k', e'', i'', j'', k'', e''', i''', j''', k''' commute with real numbers and obey the multiplication rules i2 = j2 = k2 = e'2 = i'2 = j'2 = k'2 = e''2 = i''2 = j''2 = k''2 = e'''2 = i'''2 = j'''2 = k'''2 = -1, ij = k, ie' = i', je' = j', ke' = k', ie'' = i'', je'' = j'', ke'' = k'', ie''' = i''', je''' = j''', and ke''' = k'''.
Sedenions are neither commutative nor associative (containing octonions), nor are they alternative; for example (i + e''')((i + e''') j) = -2j + 2k''' ≠ -2j = (i + e''')2 j. Additionally, the norm is no longer a algebraic, for exmaple, |(i + j'')(e' + k''')|2 = 8 > 4 = |i +j''|2 |e' + k'''|2, and there exist zero divisors.
In the description of each non-static method, this sedenion is represented by s = a0 + ia1 + ja2 + ka3 + e'a4 + i'a5 + j'a6 + k'a7 + e''a8 + i''a9 + j''a10 + k''a11 + e'''a12 + i'''a13 + j'''a14 + k'''a15. a0 and ia1 + ja2 + ka3 + e'a4 + i'a5 + j'a6 + k'a7 + e''a8 + i''a9 + j''a10 + k''a11 + e'''a12 + i'''a13 + j'''a14 + k'''a15 are the real and imaginary parts of s, respectively. The real numbers an are the coefficients of the sedenion s. The components a0, ia1, ..., k'''a15 will be referred to as the 0th, 1st, ..., and 17th terms of the sedenion s, respectively.
Any other sedenion is represented by t = b0 + ib1 + jb2 + kb3 + e'b4 + i'b5 + j'b6 + k'b7 + e''b8 + i''b9 + j''b10 + k''b11 + e'''b12 + i'''b13 + j'''b14 + k'''b15. The variables x and n are used to represent real numbers and integers, respectively.In reference to methods which must deal with branch cuts, the symbol u refers to any unit imaginary sedenion (real(u) = 0 and |u| = 1).
Instances of this class are immutable.
This class returns correct answers on branch cuts. Additionally, this class tries to give reasonable treatment to ∞ and NaN. For example, ONE.multiply(Double.POSITIVE_INFINITY) returns ∞ + i0 + ... + k'''0. Most implementations would return ∞ + iNaN + ... + k'''NaN because they would simply multiply each coefficient by the multiplier. This is probably not the desired result.
This class is based on the methods found in the Java classes Double, Math, and java.math.BigDecimal.
There is very little interaction between between the classes in this package. If there is a significant request for such behaviour, it will be added (seemlessly) in the future.
Double
,
Math
,
Serialized FormField Summary | |
---|---|
static Sedenion |
E1
The constant e'. |
static Sedenion |
E2
The constant e''. |
static Sedenion |
E3
The constant e'''. |
static Sedenion |
I
The constant i. |
static Sedenion |
I1
The constant i'. |
static Sedenion |
I2
The constant i''. |
static Sedenion |
I3
The constant i'''. |
static Sedenion |
J
The constant j. |
static Sedenion |
J1
The constant j'. |
static Sedenion |
J2
The constant j''. |
static Sedenion |
J3
The constant j'''. |
static Sedenion |
K
The constant k. |
static Sedenion |
K1
The constant k'. |
static Sedenion |
K2
The constant k''. |
static Sedenion |
K3
The constant k'''. |
static Sedenion |
NaN
The constant NaN + iNaN + jNaN + kNaN + e'NaN + i'NaN + j'NaN + k'NaN + e''NaN + i''NaN + j''NaN + k''NaN + e'''NaN + i'''NaN + j'''NaN + k'''NaN. |
static Sedenion |
ONE
The constant 1. |
static Sedenion |
ZERO
The constant 0. |
Constructor Summary | |
---|---|
Sedenion(double a0)
Generates the sedenion a0 + i0 + j0 + k0 + e'0 + i'0 + j'0 + k'0 + e''0 + i''0 + j''0 + k''0 + e'''0 + i'''0 + j'''0 + k'''0. |
|
Sedenion(double[] v)
Generates a sedenion based on the entries of the array v. |
|
Sedenion(double x,
double[] v)
Generates the sedenion x + iv1 + jv2 + kv3 + e'v4 + i'v5 + j'v6 + k'v7 + e''v8 + i''v9 + j''v10 + k''v11 + e'''v12 + i'''v13 + j'''v14 + k'''v15. |
|
Sedenion(double a1,
double a2,
double a3,
double a4,
double a5,
double a6,
double a7,
double a8,
double a9,
double a10,
double a11,
double a12,
double a13,
double a14,
double a15)
Generates the imaginary sedenion ia1 + ja2 + ka3 + e'a4 + i'a5 + j'a6 + k'a7 + e''a8 + i''a9 + j''a10 + k''a11 + e'''a12 + i'''a13 + j'''a14 + k'''a15. |
|
Sedenion(double a0,
double a1,
double a2,
double a3,
double a4,
double a5,
double a6,
double a7,
double a8,
double a9,
double a10,
double a11,
double a12,
double a13,
double a14,
double a15)
Generates the sedenion a0 + ia1 + ja2 + ka3 + e'a4 + i'a5 + j'a6 + k'a7 + e''a8 + i''a9 + j''a10 + k''a11 + e'''a12 + i'''a13 + j'''a14 + k'''a15. |
Method Summary | |
---|---|
double |
abs()
Returns the absolute value of this sedenion s. |
double |
abs2()
Returns the square of the absolute value of this sedenion s. |
double |
abs2Imag()
Returns the square of the absolute value of the imaginary part of this sedenion s. |
double |
absImag()
Returns the absolute value of the imaginary part of this sedenion s. |
Sedenion |
acos()
Returns the principal inverse cosine of this sedenion s. |
Sedenion |
acos(Sedenion u)
Returns the principal inverse cosine of this sedenion s. |
Sedenion |
acosh()
Returns the principal inverse hyperbolic cosine of this sedenion s. |
Sedenion |
acosh(Sedenion u)
Returns the principal inverse hyperbolic cosine of this sedenion s. |
Sedenion |
acot()
Returns the principal inverse cotangent of this sedenion s. |
Sedenion |
acot(Sedenion u)
Returns the principal inverse cotangent of this sedenion s. |
Sedenion |
acoth()
Returns the principal inverse hyperbolic cotangent of this sedenion s. |
Sedenion |
acoth(Sedenion u)
Returns the principal inverse hyperbolic cotangent of this sedenion s. |
Sedenion |
acsc()
Returns the principal inverse cosecant of this sedenion s. |
Sedenion |
acsc(Sedenion u)
Returns the principal inverse cosecant of this sedenion s. |
Sedenion |
acsch()
Returns the principal inverse hyperbolic cosecant of this sedenion s. |
Sedenion |
acsch(Sedenion u)
Returns the principal inverse hyperbolic cosecant of this sedenion s. |
Sedenion |
add(double x)
Returns the sum of this sedenion s and the real number x. |
Sedenion |
add(int n,
double x)
Returns this sedenian s with x added onto its nth term. |
Sedenion |
add(Sedenion t)
Returns the sum of this sedenion s and the sedenion t = b0 + ib1 + jb2 + kb3 + e'b4 + i'b5 + j'b6 + k'b7 + e''b8 + i''b9 + j''b10 + k''b11 + e'''b12 + i'''b13 + j'''b14 + k'''b15. |
double |
argument()
Returns the argument of this sedenion s. |
Sedenion |
asec()
Returns the principal inverse secant of this sedenion s. |
Sedenion |
asec(Sedenion u)
Returns the principal inverse secant of this sedenion s. |
Sedenion |
asech()
Returns the principal inverse hyperbolic secant of this sedenion s. |
Sedenion |
asech(Sedenion u)
Returns the principal inverse hyperbolic secant of this sedenion s. |
Sedenion |
asin()
Returns the principal inverse sine of this sedenion s. |
Sedenion |
asin(Sedenion u)
Returns the principal inverse sine of this sedenion s. |
Sedenion |
asinh()
Returns the principal inverse hyperbolic sine of this sedenion s. |
Sedenion |
asinh(Sedenion u)
Returns the principal inverse hyperbolic sine of this sedenion s. |
Sedenion |
atan()
Returns the principal inverse tangent of this sedenion s. |
Sedenion |
atan(Sedenion u)
Returns the principal inverse tangent of this sedenion s. |
Sedenion |
atanh()
Returns the principal inverse hyperbolic tangent of this sedenion s. |
Sedenion |
atanh(Sedenion u)
Returns the principal inverse hyperbolic tangent of this sedenion s. |
Sedenion |
ceil()
Returns the ceiling of each of the coefficients of this sedenion s. |
double |
coefficient(int n)
Returns the coefficient of the nth term of this sedenion s. |
Sedenion |
conjugate()
Returns the conjugate of this sedenion s. |
Sedenion |
cos()
Returns the cosine of this sedenion s. |
Sedenion |
cosh()
Returns the hyperbolic cosine of this sedenion s. |
Sedenion |
cot()
Returns the cotangent of this sedenion s. |
Sedenion |
coth()
Returns the hyperbolic cotangent of this sedenion s. |
Sedenion |
csc()
Returns the cosecant of this sedenion s. |
Sedenion |
csch()
Returns the hyperbolic cosecant of this sedenion s. |
Sedenion |
divide(Sedenion t)
Returns the quotient of this sedenion s over the sedenion t = b0 + ib1 + jb2 + kb3 + e'b4 + i'b5 + j'b6 + k'b7 + e''b8 + i''b9 + j''b10 + k''b11 + e'''b12 + i'''b13 + j'''b14 + k'''b15. |
boolean |
equals(java.lang.Object t)
Returns true if this sedenion s equals the sedenion t = b0 + ib1 + jb2 + kb3 + e'b4 + i'b5 + j'b6 + k'b7 + e''b8 + i''b9 + j''b10 + k''b11 + e'''b12 + i'''b13 + j'''b14 + k'''b15. |
boolean |
equals(java.lang.Object t,
double eps)
Returns true if this sedenion s equals the sedenion t = b0 + ib1 + jb2 +...+ k'''b15. |
Sedenion |
exp()
Returns Euler's number (e) raised to the power of this sedenion s. |
Sedenion |
floor()
Returns the floor of each of the coefficients of this sedenion s. |
int |
hashCode()
Returns a hash code for the this sedenion s based on the coefficients. |
Sedenion |
horner(double[] v)
Evaluate the polynomial with real coefficients, given by the array of doubles v, at this sedenion s. |
Sedenion |
imag()
Returns the imaginary part of this sedenion s. |
static java.lang.String[] |
imaginaryUnits(java.lang.String[] units)
Set the strings to be used for the fifteen imaginary units. |
boolean |
isImaginary()
Returns true if the real part of this sedenion s is zero and false otherwise. |
boolean |
isImaginary(int n)
Returns true if the nth imaginary coefficient of this octonian s is the only non-zero coefficient and false otherwise. |
boolean |
isInfinite()
Returns true if any coefficient of this sedenion s is infinite and false otherwise. |
boolean |
isNaN()
Returns true if any coefficient of this sedenion s is not-a-number (NaN) and false otherwise. |
boolean |
isReal()
Returns true if all the coefficients of the imaginary part of this sedenion s are zero, otherwise false. |
boolean |
isZero()
Returns true if all coefficients of this sedenion s are zero, otherwise false. |
Sedenion |
log()
Returns the natural logarithm of this sedenion s. |
Sedenion |
log(Sedenion u)
Returns the natural logarithm of this sedenion s. |
Sedenion |
log10()
Returns the logarithm base 10 of this sedenion s. |
Sedenion |
log10(Sedenion u)
Returns the natural logarithm of this sedenion s. |
Sedenion |
multiply(double x)
Returns the product of this sedenion s and the real number x. |
Sedenion |
multiply(Sedenion t)
Returns the product of this sedenion s and the sedenion t = b0 + ib1 + jb2 + kb3 + e'b4 + i'b5 + j'b6 + k'b7 + e''b8 + i''b9 + j''b10 + k''b11 + e'''b12 + i'''b13 + j'''b14 + k'''b15. |
Sedenion |
negate()
Returns the negative of this sedenion s. |
Sedenion |
pow(double x)
Returns this sedenion s raised to the real number x. |
Sedenion |
pow(int n)
Returns this sedenion s raised to the integer n. |
Sedenion |
pow(Sedenion t)
|
Sedenion |
project(boolean[] v)
Project this sedenion s onto the subspace defined by the boolean vector v. |
Sedenion |
project(int n)
Project this sedenion s onto the nth term. |
static Sedenion |
random()
A factory method for constructing an sedenion with random real and imaginary parts. |
Sedenion |
random(boolean[] v)
A factory method to create a random sedenion defined by the boolean vector v. |
static Sedenion |
random(int n)
A factory method for constructing a complex number with random nth coefficient. |
static Sedenion |
randomImaginary()
A factory method for constructing a random imaginary sedenion. |
static Sedenion |
randomReal()
A factory method for constructing an sedenion with random real part. |
double |
real()
Returns the real part of this sedenion s. |
Sedenion |
rint()
Returns each coefficient of the sedenion s rounded to the nearest double equal to an integer. |
Sedenion |
sec()
Returns the secant of this sedenion s. |
Sedenion |
sech()
Returns the hyperbolic secant of this sedenion s. |
Sedenion |
signum()
Returns a normalized form of this sedenion s when it is non-zero and s otherwise. |
Sedenion |
sin()
Returns the sine of this sedenion s. |
Sedenion |
sinh()
Returns the hyperbolic sine of this sedenion s. |
Sedenion |
sqr()
Returns the square of this sedenion s. |
Sedenion |
sqrt()
Returns the square root of this sedenion s. |
Sedenion |
sqrt(Sedenion u)
Returns the square root of this sedenion s. |
Sedenion |
subtract(Sedenion t)
Returns the difference between this sedenion s and the sedenion t = b0 + ib1 + jb2 + kb3 + e'b4 + i'b5 + j'b6 + k'b7 + e''b8 + i''b9 + j''b10 + k''b11 + e'''b12 + i'''b13 + j'''b14 + k'''b15. |
Sedenion |
tan()
Returns the tangent of this sedenion s. |
Sedenion |
tanh()
Returns the hyperbolic tangent of this sedenion s. |
double[] |
toArray()
Converts this sedenion s in to an array of four doubles. |
double[] |
toArray(byte[] v)
Convert this sedenion o to an array of doubles. |
double[] |
toImagArray()
Converts the imaginary part of this sedenion s in to an array of three doubles. |
java.lang.String |
toString()
Returns a string representing this sedenion s. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Sedenion ZERO
public static final Sedenion ONE
public static final Sedenion I
public static final Sedenion J
public static final Sedenion K
public static final Sedenion E1
public static final Sedenion I1
public static final Sedenion J1
public static final Sedenion K1
public static final Sedenion E2
public static final Sedenion I2
public static final Sedenion J2
public static final Sedenion K2
public static final Sedenion E3
public static final Sedenion I3
public static final Sedenion J3
public static final Sedenion K3
public static final Sedenion NaN
Constructor Detail |
---|
public Sedenion(double a0, double a1, double a2, double a3, double a4, double a5, double a6, double a7, double a8, double a9, double a10, double a11, double a12, double a13, double a14, double a15)
Generates the sedenion a0 + ia1 + ja2 + ka3 + e'a4 + i'a5 + j'a6 + k'a7 + e''a8 + i''a9 + j''a10 + k''a11 + e'''a12 + i'''a13 + j'''a14 + k'''a15.
a0
- the real parta1
- the coefficient of ia2
- the coefficient of ja3
- the coefficient of ka4
- the coefficient of e'a5
- the coefficient of i'a6
- the coefficient of j'a7
- the coefficient of k'a8
- the coefficient of e''a9
- the coefficient of i''a10
- the coefficient of j''a11
- the coefficient of k''a12
- the coefficient of e'''a13
- the coefficient of i'''a14
- the coefficient of j'''a15
- the coefficient of k'''public Sedenion(double a0)
Generates the sedenion a0 + i0 + j0 + k0 + e'0 + i'0 + j'0 + k'0 + e''0 + i''0 + j''0 + k''0 + e'''0 + i'''0 + j'''0 + k'''0.
a0
- the real partpublic Sedenion(double a1, double a2, double a3, double a4, double a5, double a6, double a7, double a8, double a9, double a10, double a11, double a12, double a13, double a14, double a15)
Generates the imaginary sedenion ia1 + ja2 + ka3 + e'a4 + i'a5 + j'a6 + k'a7 + e''a8 + i''a9 + j''a10 + k''a11 + e'''a12 + i'''a13 + j'''a14 + k'''a15.
a1
- the coefficient of ia2
- the coefficient of ja3
- the coefficient of ka4
- the coefficient of e'a5
- the coefficient of i'a6
- the coefficient of j'a7
- the coefficient of k'a8
- the coefficient of e''a9
- the coefficient of i''a10
- the coefficient of j''a11
- the coefficient of k''a12
- the coefficient of e'''a13
- the coefficient of i'''a14
- the coefficient of j'''a15
- the coefficient of k'''public Sedenion(double[] v)
Generates a sedenion based on the entries of the array v.
An array v of length 16 defines the sedenion v0 + iv1 + jv2 + kv3 + e'v4 + i'v5 + j'v6 + k'v7 + e''v8 + i''v9 + j''v10 + k''v11 + e'''v12 + i'''v13 + j'''v14 + k'''v15, and
An array v of length 15 defines the sedenion 0 + iv1 + jv2 + kv3 + e'v4 + i'v5 + j'v6 + k'v7 + e''v8 + i''v9 + j''v10 + k''v11 + e'''v12 + i'''v13 + j'''v14 + k'''v15, and
v
- array of length 15 or 16public Sedenion(double x, double[] v)
Generates the sedenion x + iv1 + jv2 + kv3 + e'v4 + i'v5 + j'v6 + k'v7 + e''v8 + i''v9 + j''v10 + k''v11 + e'''v12 + i'''v13 + j'''v14 + k'''v15.
x
- the real partv
- array of length 15Method Detail |
---|
public static final Sedenion random()
Math.random()
public static final Sedenion random(int n)
A factory method for constructing a complex number with random nth coefficient.
Math.random()
public final Sedenion random(boolean[] v)
A factory method to create a random sedenion defined by the boolean vector v.
In the result, the coefficient of the nth term is a random double if vn == true.
v
- an array indicating a subspace
Math.random()
public static final Sedenion randomReal()
A factory method for constructing an sedenion with random real part.
Math.random()
public static final Sedenion randomImaginary()
Math.random()
public final boolean equals(java.lang.Object t)
Returns true if this sedenion s equals the sedenion t = b0 + ib1 + jb2 + kb3 + e'b4 + i'b5 + j'b6 + k'b7 + e''b8 + i''b9 + j''b10 + k''b11 + e'''b12 + i'''b13 + j'''b14 + k'''b15.
The sedendions are equal if an = bn for each n.
Note: NaN == NaN returns false but 0.0 == -0.0 returns true.
equals
in class java.lang.Object
public final boolean equals(java.lang.Object t, double eps)
Returns true if this sedenion s equals the sedenion t = b0 + ib1 + jb2 +...+ k'''b15.
Two nonzero sedenions s and t are equal up to ε if |s - t|/min( |s|, |t| ) < ε.
If s = 0 or t = 0 then we check that |t| < ε or |s| < ε, respectively.
eps
- the allowable relative difference: greater than or equal to 0
public final int hashCode()
Returns a hash code for the this sedenion s based on the coefficients.
hashCode
in class java.lang.Object
public final java.lang.String toString()
Returns a string representing this sedenion s.
If N0 = abs(a), N1 = abs(b), N2 = abs(c), and N3 = abs(d), then the return value is "[-]N0 (+|-) iN1 (+|-) jN2 (+|-) kN3".
toString
in class java.lang.Object
public static final java.lang.String[] imaginaryUnits(java.lang.String[] units)
Set the strings to be used for the fifteen imaginary units.
For example, double[] {"i", "j", "k", "e(1)", "i(1)", "j(1)", "k(1)", "e(2)", "i(2)", "j(2)", "k(2)", "e(3)", "i(3)", "j(3)", "k(3)"}
.
public final double[] toArray()
public final double[] toArray(byte[] v)
Convert this sedenion o to an array of doubles.
The coefficient placed into the nth entry of the array is determined by vn.
v
- an array of 0, 1, 2, ..., or 15, indicating which coefficient is to be placed into the nth entry of the array
public final double[] toImagArray()
public final boolean isZero()
public final boolean isReal()
public final boolean isImaginary()
public final boolean isImaginary(int n)
public final boolean isNaN()
Double.isNaN(double)
public final boolean isInfinite()
Double.isInfinite(double)
public final double abs()
Returns the absolute value of this sedenion s.
abs(s) = |s| = sqrt(a02 + a12 + a22 + a32 + a42 + a52 + a62 + a72 + a82 + a92 + a102 + a112 + a122 + a132 + a142 + a152).
Special case:
public final double abs2()
Returns the square of the absolute value of this sedenion s.
abs(s)2 = |s|2 = a02 + a12 + a22 + a32 + a42 + a52 + a62 + a72 + a82 + a92 + a102 + a112 + a122 + a132 + a142 + a152.
Special case:
public final double absImag()
Returns the absolute value of the imaginary part of this sedenion s.
abs(imag(s)) = |imag(s)| = sqrt(a12 + a22 + a32 + a42 + a52 + a62 + a72 + a82 + a92 + a102 + a112 + a122 + a132 + a142 + a152).
Special case:
public final double abs2Imag()
Returns the square of the absolute value of the imaginary part of this sedenion s.
abs(imag(s))2 = |imag(s)|2 = a12 + a22 + a32 + a42 + a52 + a62 + a72 + a82 + a92 + a102 + a112 + a122 + a132 + a142 + a152.
Special case:
public final double real()
Returns the real part of this sedenion s.
real(s) = a0.
public final Sedenion imag()
Returns the imaginary part of this sedenion s.
imag(s) = ia1 + ja2 + ka3 + e'a4 + i'a5 + j'a6 + k'a7 + e''a8 + i''a9 + j''a10 + k''a11 + e'''a12 + i'''a13 + j'''a14 + k'''a15.
public final double coefficient(int n)
Returns the coefficient of the nth term of this sedenion s.
n
- the number (0, 1, 2, ..., 15) of the coefficient to return
public final Sedenion project(int n)
Project this sedenion s onto the nth term.
n
- the number of term (0, 1, 2, ..., 15) to be projected onto
public final Sedenion project(boolean[] v)
Project this sedenion s onto the subspace defined by the boolean vector v.
In the result, the coefficient of the nth term is set to 0.0 if vn == false.
v
- an array indicating the terms to project onto
public final Sedenion conjugate()
Returns the conjugate of this sedenion s.
conjugate(s) = a0 - ia1 - ja2 - ka3 - e'a4 - i'a5 - j'a6 - k'a7 - e''a8 - i''a9 - j''a10 - k''a11 - e'''a12 - i'''a13 - j'''a14 - k'''a15.
public final double argument()
Returns the argument of this sedenion s.
This is a value on the interval [0, &pi]. For non-zero s, if u = imag(s)/|imag(s)| then s = |s|eu argument(s).
argument(s) = atan2( |imag(s)|, a ).
public final Sedenion signum()
Returns a normalized form of this sedenion s when it is non-zero and s otherwise.
public final Sedenion add(Sedenion t)
Returns the sum of this sedenion s and the sedenion t = b0 + ib1 + jb2 + kb3 + e'b4 + i'b5 + j'b6 + k'b7 + e''b8 + i''b9 + j''b10 + k''b11 + e'''b12 + i'''b13 + j'''b14 + k'''b15.
s + t = (a0 + b0) + i(a1 + b1) + j(a2 + b2) + k(a3 + b3) + e'(a4 + b4) + i'(a5 + b5) + j'(a6 + b6) + k'(a7 + b7) + e''(a8 + b8) + i''(a9 + b9) + j''(a10 + b10) + k''(a11 + b11) + e'''(a12 + b12) + i'''(a13 + b13) + j'''(a14 + b14) + k'''(a15 + b15).
public final Sedenion add(int n, double x)
Returns this sedenian s with x added onto its nth term.
n
- the number (0, 1, 2, ..., 15) of the onto which to add x
public final Sedenion add(double x)
Returns the sum of this sedenion s and the real number x.
s + x = (a0 + x) + ia1 + ja2 + ka3 + e'a4 + i'a5 + j'a6 + k'a7 + e''a8 + i''a9 + j''a10 + k''a11 + e'''a12 + i'''a13 + j'''a14 + k'''a15.
public final Sedenion subtract(Sedenion t)
Returns the difference between this sedenion s and the sedenion t = b0 + ib1 + jb2 + kb3 + e'b4 + i'b5 + j'b6 + k'b7 + e''b8 + i''b9 + j''b10 + k''b11 + e'''b12 + i'''b13 + j'''b14 + k'''b15.
s - t = (a0 - b0) + i(a1 - b1) + j(a2 - b2) + k(a3 - b3) + e'(a4 - b4) + i'(a5 - b5) + j'(a6 - b6) + k'(a7 - b7) + e''(a8 - b8) + i''(a9 - b9) + j''(a10 - b10) + k''(a11 - b11) + e'''(a12 - b12) + i'''(a13 - b13) + j'''(a14 - b14) + k'''(a15 - b15).
public final Sedenion negate()
Returns the negative of this sedenion s.
-s = -a0 - ia1 - ja2 - ka3 - e'a4 - i'a5 - j'a6 - k'a7 - e''a8 - i''a9 - j''a10 - k''a11 - e'''a12 - i'''a13 - j'''a14 - k'''a15.
public final Sedenion multiply(Sedenion t)
Returns the product of this sedenion s and the sedenion t = b0 + ib1 + jb2 + kb3 + e'b4 + i'b5 + j'b6 + k'b7 + e''b8 + i''b9 + j''b10 + k''b11 + e'''b12 + i'''b13 + j'''b14 + k'''b15.
Multiplication is distributive with the following multiplication matrix for 1 and the imaginary units:
× | 1 | i | j | k | e' | i' | j' | k' | e'' | i'' | j'' | k'' | e''' | i''' | j''' | k''' |
1 | 1 | i | j | k | e' | i' | j' | k' | e'' | i'' | j'' | k'' | e''' | i''' | j''' | k''' |
i | i | -1 | k | -j | i' | -e' | -k' | j' | i'' | -e'' | -k'' | j'' | -i''' | e''' | k''' | -j''' |
j | j | -k | -1 | i | j' | k' | -e' | -i' | j'' | k'' | -e'' | -i'' | -j''' | -k''' | e''' | i''' |
k | k | j | -i | -1 | k' | -j' | i' | -e' | k'' | -j'' | i'' | -e'' | -k''' | j''' | -i''' | e''' |
e' | e' | -i' | -j' | -k' | -1 | i | j | k | e''' | i''' | j''' | k''' | -e'' | -i'' | -j'' | -k'' |
i' | i' | e' | -k' | j' | -i | -1 | -k | j | i''' | -e''' | k''' | -j''' | i'' | -e'' | k'' | -j'' |
j' | j' | k' | e' | -i' | -j | k | -1 | -i | j''' | -k''' | -e''' | i''' | j'' | -k'' | -e'' | i'' |
k' | k' | -j' | i' | e' | -k | -j | i | -1 | k''' | j''' | -i''' | -e''' | k'' | j'' | -i'' | -e'' |
e'' | e'' | -i'' | -j'' | -k'' | -e''' | -i''' | -j''' | -k''' | -1 | i | j | k | e' | i' | j' | k' |
i'' | i'' | e'' | -k'' | j'' | -i''' | e''' | k''' | -j''' | -i | -1 | -k | j | -i' | e' | k' | -j' |
j'' | j'' | k'' | e'' | -i'' | -j''' | -k''' | e''' | i''' | -j | k | -1 | -i | -j' | -k' | e' | i' |
k'' | k'' | -j'' | i'' | e'' | -k''' | j''' | -i''' | e''' | -k | -j | i | -1 | -k' | j' | -i' | e' |
e''' | e''' | i''' | j''' | k''' | e'' | -i'' | -j'' | -k'' | -e' | i' | j' | k' | -1 | -i | -j | -k |
i''' | i''' | -e''' | k''' | -j''' | i'' | e'' | k'' | -j'' | -i' | -e' | k' | -j' | i | -1 | k | -j |
j''' | j''' | -k''' | -e''' | i''' | j'' | -k'' | e'' | i'' | -j' | -k' | -e' | i' | j | -k | -1 | i |
k''' | k''' | j''' | -i''' | -e''' | k'' | j'' | -i'' | e'' | -k' | j' | -i' | -e' | k | j | -i | -1 |
In general, st ≠ ts, s(tu) ≠ (st)u, and s(st) ≠ s2t.
public final Sedenion multiply(double x)
Returns the product of this sedenion s and the real number x.
sx = xa0 + ixa1 + jxa2 + kxa3 + e'xa4 + i'xa5 + j'xa6 + k'xa7 + e''xa8 + i''xa9 + j''xa10 + k''xa11 + e'''xa12 + i'''xa13 + j'''xa14 + k'''xa15
public final Sedenion divide(Sedenion t)
Returns the quotient of this sedenion s over the sedenion t = b0 + ib1 + jb2 + kb3 + e'b4 + i'b5 + j'b6 + k'b7 + e''b8 + i''b9 + j''b10 + k''b11 + e'''b12 + i'''b13 + j'''b14 + k'''b15.
s/t = sconjugate(t)/|t|2. In general, s/t ≠ (1/p)q.
public final Sedenion pow(Sedenion t)
public final Sedenion pow(double x)
Returns this sedenion s raised to the real number x.
public final Sedenion pow(int n)
Returns this sedenion s raised to the integer n.
public final Sedenion sqr()
Returns the square of this sedenion s.
public final Sedenion horner(double[] v)
Evaluate the polynomial with real coefficients, given by the array of doubles v, at this sedenion s.
If n = v.length - 1 then this method evaluates v0 + v1s + ... + vnsn using Horner's rule.
public final Sedenion sqrt()
Returns the square root of this sedenion s.
The branch cut is on (-∞, 0).
public final Sedenion sqrt(Sedenion u)
Returns the square root of this sedenion s.
The branch cut is on (-∞, 0).
On the branch cuts, the imaginary part is a multiple of the imaginary sedenion u.
u
- a non-real sedenion
public final Sedenion exp()
Returns Euler's number (e) raised to the power of this sedenion s.
If u = imag(s)/|imag(s)| then es = ea(cos|imag(s)| + u sin|imag(s)|).
public final Sedenion log()
Returns the natural logarithm of this sedenion s.
The branch cut is on (-∞, 0].
public final Sedenion log(Sedenion u)
Returns the natural logarithm of this sedenion s.
The branch cut is on (-∞, 0].
On the branch cuts, the imaginary part is a multiple of the imaginary sedenion u.
u
- a non-real sedenion
public final Sedenion log10()
Returns the logarithm base 10 of this sedenion s.
The branch cut is on (-∞, 0].
public final Sedenion log10(Sedenion u)
Returns the natural logarithm of this sedenion s.
The branch cut is on (-∞, 0].
On the branch cuts, the imaginary part is a multiple of the imaginary sedenion u.
u
- a non-real sedenion
public final Sedenion sin()
Returns the sine of this sedenion s.
public final Sedenion cos()
Returns the cosine of this sedenion s.
public final Sedenion tan()
Returns the tangent of this sedenion s.
public final Sedenion sec()
Returns the secant of this sedenion s.
public final Sedenion csc()
Returns the cosecant of this sedenion s.
public final Sedenion cot()
Returns the cotangent of this sedenion s.
public final Sedenion sinh()
Returns the hyperbolic sine of this sedenion s.
public final Sedenion cosh()
Returns the hyperbolic cosine of this sedenion s.
public final Sedenion tanh()
Returns the hyperbolic tangent of this sedenion s.
public final Sedenion sech()
Returns the hyperbolic secant of this sedenion s.
public final Sedenion csch()
Returns the hyperbolic cosecant of this sedenion s.
public final Sedenion coth()
Returns the hyperbolic cotangent of this sedenion s.
public final Sedenion asin()
Returns the principal inverse sine of this sedenion s.
The branch cuts are (-∞, -1) and (1, ∞).
public final Sedenion asin(Sedenion u)
Returns the principal inverse sine of this sedenion s.
The branch cuts are (-∞, -1) and (1, ∞).
On the branch cuts, the imaginary part is a multiple of the imaginary sedenion u.
u
- a non-real sedenion
public final Sedenion acos()
Returns the principal inverse cosine of this sedenion s.
The branch cuts are (-∞, -1) and (1, ∞).
public final Sedenion acos(Sedenion u)
Returns the principal inverse cosine of this sedenion s.
The branch cuts are (-∞, -1) and (1, ∞).
On the branch cuts, the imaginary part is a multiple of the imaginary sedenion u.
u
- a non-real sedenion
public final Sedenion atan()
Returns the principal inverse tangent of this sedenion s.
The branch cuts are (-u∞, -u] and [u, u∞).
public final Sedenion atan(Sedenion u)
Returns the principal inverse tangent of this sedenion s.
The branch cuts are (-u∞, -u] and [u, u∞).
On the branch cuts, the imaginary part is a multiple of the imaginary sedenion u.
u
- a non-real sedenion
public final Sedenion asec()
Returns the principal inverse secant of this sedenion s.
The branch cut is (-1, 1).
public final Sedenion asec(Sedenion u)
Returns the principal inverse secant of this sedenion s.
The branch cut is (-1, 1).
On the branch cuts, the imaginary part is a multiple of the imaginary sedenion u.
u
- a non-real sedenion
public final Sedenion acsc()
Returns the principal inverse cosecant of this sedenion s.
The branch cut is (-1, 1).
public final Sedenion acsc(Sedenion u)
Returns the principal inverse cosecant of this sedenion s.
The branch cut is (-1, 1).
On the branch cuts, the imaginary part is a multiple of the imaginary sedenion u.
u
- a non-real sedenion
public final Sedenion acot()
Returns the principal inverse cotangent of this sedenion s.
The branch cut is (-u, u).
public final Sedenion acot(Sedenion u)
Returns the principal inverse cotangent of this sedenion s.
The branch cut is (-u, u).
On the branch cuts, the imaginary part is a multiple of the imaginary sedenion u.
u
- a non-real sedenion
public final Sedenion asinh()
Returns the principal inverse hyperbolic sine of this sedenion s.
The branch cuts are (-u∞, -u) and (u, u∞).
public final Sedenion asinh(Sedenion u)
Returns the principal inverse hyperbolic sine of this sedenion s.
The branch cuts are (-u∞, -u) and (u, u∞).
On the branch cuts, the imaginary part is a multiple of the imaginary sedenion u.
u
- a non-real sedenion
public final Sedenion acosh()
Returns the principal inverse hyperbolic cosine of this sedenion s.
The branch cut is (-∞, 1).
public final Sedenion acosh(Sedenion u)
Returns the principal inverse hyperbolic cosine of this sedenion s.
The branch cut is (-∞, 1).
On the branch cuts, the imaginary part is a multiple of the imaginary sedenion u.
u
- a non-real sedenion
public final Sedenion atanh()
Returns the principal inverse hyperbolic tangent of this sedenion s.
The branch cuts are (-∞, -1] and [1, ∞).
public final Sedenion atanh(Sedenion u)
Returns the principal inverse hyperbolic tangent of this sedenion s.
The branch cuts are (-∞, -1] and [1, ∞).
On the branch cuts, the imaginary part is a multiple of the imaginary sedenion u.
u
- a non-real sedenion
public final Sedenion asech()
Returns the principal inverse hyperbolic secant of this sedenion s.
The branch cuts are (-∞, 0] and (1, ∞).
public final Sedenion asech(Sedenion u)
Returns the principal inverse hyperbolic secant of this sedenion s.
The branch cuts are (-∞, 0] and (1, ∞).
On the branch cuts, the imaginary part is a multiple of the imaginary sedenion u.
u
- a non-real sedenion
public final Sedenion acsch()
Returns the principal inverse hyperbolic cosecant of this sedenion s.
The branch cut is (-i, i).
public final Sedenion acsch(Sedenion u)
Returns the principal inverse hyperbolic cosecant of this sedenion s.
The branch cut is (-u, u).
On the branch cuts, the imaginary part is a multiple of the imaginary sedenion u.
u
- a non-real sedenion
public final Sedenion acoth()
Returns the principal inverse hyperbolic cotangent of this sedenion s.
The branch cut is [-1, 1].
public final Sedenion acoth(Sedenion u)
Returns the principal inverse hyperbolic cotangent of this sedenion s.
The branch cut is [-1, 1].
On the branch cuts, the imaginary part is a multiple of the imaginary sedenion u.
u
- a non-real sedenion
public final Sedenion ceil()
Returns the ceiling of each of the coefficients of this sedenion s.
Math.ceil(double)
public final Sedenion floor()
Returns the floor of each of the coefficients of this sedenion s.
Math.floor(double)
public final Sedenion rint()
Returns each coefficient of the sedenion s rounded to the nearest double equal to an integer.
Math.rint(double)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |