|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Number
org.jscience.mathematics.algebraic.numbers.ExactQuaternion
public final class ExactQuaternion
The ExactQuaternion class encapsulates quaternions.
| Field Summary | |
|---|---|
static ExactQuaternion |
I
|
static ExactQuaternion |
J
|
static ExactQuaternion |
K
|
static ExactQuaternion |
ONE
|
static java.lang.Class |
TYPE
|
static ExactQuaternion |
ZERO
|
| Constructor Summary | |
|---|---|
ExactQuaternion(double real,
Double3Vector imag)
Constructs a quaternion. |
|
ExactQuaternion(double q0,
double q1,
double q2,
double q3)
Constructs the quaternion q0+iq1+jq2+kq3. |
|
ExactQuaternion(ExactQuaternion quaternion)
Constructs the quaternion q0+iq1+jq2+kq3. |
|
ExactQuaternion(ExactReal q0,
ExactReal q1,
ExactReal q2,
ExactReal q3)
Constructs the quaternion q0+iq1+jq2+kq3. |
|
ExactQuaternion(Quaternion quaternion)
Constructs the quaternion q0+iq1+jq2+kq3. |
|
| Method Summary | |
|---|---|
AbelianGroup.Member |
add(AbelianGroup.Member x)
Returns the addition of this number and another. |
ExactQuaternion |
add(ExactQuaternion q)
Returns the addition of this quaternion and another. |
ExactQuaternion |
add(Quaternion q)
Returns the addition of this quaternion and another. |
ExactQuaternion |
addImag(RingVector imag)
Returns the addition of this quaternion with an imaginary part. |
ExactQuaternion |
addReal(double real)
Returns the addition of this quaternion with a real part. |
ExactQuaternion |
addReal(ExactReal real)
Returns the addition of this quaternion with a real part. |
java.lang.Object |
clone()
|
ExactQuaternion |
conjugate()
Returns the conjugate of this quaternion. |
ExactQuaternion |
divide(double x)
Returns the division of this quaternion by a scalar. |
ExactQuaternion |
divide(ExactQuaternion q)
Returns the division of this quaternion by another. |
ExactQuaternion |
divide(ExactReal x)
Returns the division of this quaternion by a scalar. |
Field.Member |
divide(Field.Member x)
Returns the division of this number and another. |
double |
doubleValue()
|
boolean |
equals(java.lang.Object obj)
Compares two quaternions for equality. |
float |
floatValue()
|
int |
hashCode()
Returns a hashcode for this quaternion. |
RingVector |
imag()
Returns the imaginary part of this quaternion as a Vector of length 3. |
int |
intValue()
|
Field.Member |
inverse()
Returns the inverse of this quaternion. |
CStarAlgebra.Member |
involution()
Returns the involution of this quaternion. |
boolean |
isInfinite()
Returns true if either the real or imaginary part is infinite. |
boolean |
isNaN()
Returns true if either the real or imaginary part is NaN. |
long |
longValue()
|
ExactQuaternion |
multiply(double x)
Returns the multiplication of this quaternion by a scalar. |
ExactQuaternion |
multiply(ExactQuaternion q)
Returns the multiplication of this quaternion and another. |
ExactQuaternion |
multiply(ExactReal x)
Returns the multiplication of this quaternion by a scalar. |
ExactQuaternion |
multiply(Quaternion q)
Returns the multiplication of this quaternion and another. |
Ring.Member |
multiply(Ring.Member x)
Returns the multiplication of this number and another. |
AbelianGroup.Member |
negate()
Returns the negative of this quaternion. |
double |
norm()
Returns the l2-norm (magnitude), which is also the C* norm. |
ExactReal |
real()
Returns the real part of this quaternion. |
VectorSpace.Member |
scalarDivide(Field.Member x)
Returns the division of this number by a real scalar. |
Module.Member |
scalarMultiply(Ring.Member x)
Returns the multiplication of this number by a real scalar. |
AbelianGroup.Member |
subtract(AbelianGroup.Member x)
Returns the subtraction of this number and another. |
ExactQuaternion |
subtract(ExactQuaternion q)
Returns the subtraction of this quaternion and another. |
ExactQuaternion |
subtract(Quaternion q)
Returns the subtraction of this quaternion and another. |
ExactQuaternion |
subtractImag(RingVector imag)
Returns the subtraction of this quaternion with an imaginary part. |
ExactQuaternion |
subtractReal(double real)
Returns the subtraction of this quaternion with a real part. |
ExactQuaternion |
subtractReal(ExactReal real)
Returns the subtraction of this quaternion with a real part. |
ExactReal |
sumSquares()
Returns the sum of the squares of the components. |
java.lang.String |
toString()
Returns a string representing the value of this quaternion. |
| Methods inherited from class java.lang.Number |
|---|
byteValue, shortValue |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final ExactQuaternion ZERO
public static final ExactQuaternion ONE
public static final ExactQuaternion I
public static final ExactQuaternion J
public static final ExactQuaternion K
public static final java.lang.Class TYPE
| Constructor Detail |
|---|
public ExactQuaternion(double real,
Double3Vector imag)
public ExactQuaternion(double q0,
double q1,
double q2,
double q3)
public ExactQuaternion(ExactReal q0,
ExactReal q1,
ExactReal q2,
ExactReal q3)
public ExactQuaternion(Quaternion quaternion)
public ExactQuaternion(ExactQuaternion quaternion)
| Method Detail |
|---|
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - a quaternionpublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean isNaN()
public boolean isInfinite()
public ExactReal real()
public RingVector imag()
public double norm()
norm in interface BanachSpace.Memberpublic ExactReal sumSquares()
public int intValue()
intValue in class java.lang.Numberpublic long longValue()
longValue in class java.lang.Numberpublic float floatValue()
floatValue in class java.lang.Numberpublic double doubleValue()
doubleValue in class java.lang.Numberpublic AbelianGroup.Member negate()
negate in interface AbelianGroup.Memberpublic Field.Member inverse()
inverse in interface Field.Memberpublic CStarAlgebra.Member involution()
involution in interface CStarAlgebra.Memberpublic ExactQuaternion conjugate()
public AbelianGroup.Member add(AbelianGroup.Member x)
add in interface AbelianGroup.Memberx - a group member
public ExactQuaternion add(ExactQuaternion q)
q - a quaternionpublic ExactQuaternion add(Quaternion q)
q - a quaternionpublic ExactQuaternion addReal(double real)
real - a real partpublic ExactQuaternion addReal(ExactReal real)
real - a real partpublic ExactQuaternion addImag(RingVector imag)
imag - an imaginary partpublic AbelianGroup.Member subtract(AbelianGroup.Member x)
subtract in interface AbelianGroup.Memberx - a group member
public ExactQuaternion subtract(ExactQuaternion q)
q - a quaternionpublic ExactQuaternion subtract(Quaternion q)
q - a quaternionpublic ExactQuaternion subtractReal(double real)
real - a real partpublic ExactQuaternion subtractReal(ExactReal real)
real - a real partpublic ExactQuaternion subtractImag(RingVector imag)
imag - an imaginary partpublic Module.Member scalarMultiply(Ring.Member x)
scalarMultiply in interface Module.Memberx - a ring member
public Ring.Member multiply(Ring.Member x)
multiply in interface Ring.Memberx - a ring member
public ExactQuaternion multiply(ExactQuaternion q)
q - a quaternionpublic ExactQuaternion multiply(Quaternion q)
q - a real numberpublic ExactQuaternion multiply(double x)
x - a real numberpublic ExactQuaternion multiply(ExactReal x)
x - a real numberpublic VectorSpace.Member scalarDivide(Field.Member x)
scalarDivide in interface VectorSpace.Memberx - a field member
public Field.Member divide(Field.Member x)
divide in interface Field.Memberx - a field member
public ExactQuaternion divide(ExactQuaternion q)
q - a quaternion
java.lang.ArithmeticException - If divide by zero.public ExactQuaternion divide(double x)
x - a real number
java.lang.ArithmeticException - If divide by zero.public ExactQuaternion divide(ExactReal x)
x - a real number
java.lang.ArithmeticException - If divide by zero.public java.lang.Object clone()
clone in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||