Documentation of 'edu.jas.arith.BigOctonion' Java class
BigOctonion
edu.jas.arith

Class BigOctonion

    • Constructor Detail

      • BigOctonion

        public BigOctonion(BigQuaternion r,
                           BigQuaternion i)
        Constructor for a BigOctonion from Quaternions.
        Parameters:
        r - BigQuaternion.
        i - BigQuaternion.
      • BigOctonion

        public BigOctonion(BigQuaternion r)
        Constructor for a BigOctonion from BigQuaternion.
        Parameters:
        r - BigQuaternion.
      • BigOctonion

        public BigOctonion(BigComplex r)
        Constructor for a BigOctonion from BigComplex.
        Parameters:
        r - BigComplex.
      • BigOctonion

        public BigOctonion(BigRational r)
        Constructor for a BigOctonion from BigRational.
        Parameters:
        r - BigRational.
      • BigOctonion

        public BigOctonion(long r)
        Constructor for a BigOctonion from long.
        Parameters:
        r - long.
      • BigOctonion

        public BigOctonion()
        Constructor for a BigOctonion with no arguments.
      • BigOctonion

        public BigOctonion(java.lang.String s)
                    throws java.lang.NumberFormatException
        The BigOctonion string constructor accepts the following formats: empty string, "quaternion", or "quat o quat" with no blanks around o if used as polynoial coefficient.
        Parameters:
        s - String.
        Throws:
        java.lang.NumberFormatException
    • Method Detail

      • copy

        public BigOctonion copy()
        Clone this.
        Specified by:
        copy in interface Element<BigOctonion>
        Returns:
        Creates and returns a copy of this Element.
        See Also:
        Object.clone()
      • characteristic

        public java.math.BigInteger characteristic()
        Characteristic of this ring.
        Specified by:
        characteristic in interface RingFactory<BigOctonion>
        Returns:
        characteristic of this ring.
      • fromInteger

        public BigOctonion fromInteger(java.math.BigInteger a)
        Get a BigOctonion element from a BigInteger.
        Specified by:
        fromInteger in interface ElemFactory<BigOctonion>
        Parameters:
        a - BigInteger.
        Returns:
        a BigOctonion.
      • getR

        public BigQuaternion getR()
        Get the or part.
        Returns:
        or.
      • getI

        public BigQuaternion getI()
        Get the oi part.
        Returns:
        oi.
      • toString

        public java.lang.String toString()
        Get the string representation. Is compatible with the string constructor.
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()
      • toScriptFactory

        public java.lang.String toScriptFactory()
        Get a scripting compatible string representation of the factory.
        Specified by:
        toScriptFactory in interface Element<BigOctonion>
        Returns:
        script compatible representation for this ElemFactory.
        See Also:
        Element.toScriptFactory()
      • isOZERO

        public static boolean isOZERO(BigOctonion A)
        Is Octonion number zero.
        Parameters:
        A - BigOctonion.
        Returns:
        true if A is 0, else false.
      • isOONE

        public static boolean isOONE(BigOctonion A)
        Is BigOctonion number one.
        Parameters:
        A - is a quaternion number.
        Returns:
        true if A is 1, else false.
      • isIMAG

        public boolean isIMAG()
        Is BigOctonion imaginary one.
        Returns:
        true if this is i, else false.
      • equals

        public boolean equals(java.lang.Object b)
        Comparison with any other object.
        Specified by:
        equals in interface Element<BigOctonion>
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if this is equal to b, else false.
        See Also:
        Object.equals(java.lang.Object)
      • hashCode

        public int hashCode()
        Hash code for this BigOctonion.
        Specified by:
        hashCode in interface Element<BigOctonion>
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        the hashCode.
        See Also:
        Object.hashCode()
      • compareTo

        public int compareTo(BigOctonion b)
        Since quaternion numbers are unordered, we use lexicographical order of re, im, jm and km.
        Specified by:
        compareTo in interface Element<BigOctonion>
        Specified by:
        compareTo in interface java.lang.Comparable<BigOctonion>
        Parameters:
        b - BigOctonion.
        Returns:
        0 if b is equal to this, 1 if this is greater b and -1 else.
      • signum

        public int signum()
        Since quaternion numbers are unordered, we use lexicographical order of re, im, jm and km.
        Specified by:
        signum in interface AbelianGroupElem<BigOctonion>
        Returns:
        0 if this is equal to 0; 1 if or > 0, or or == 0 and oi > 0; -1 if or < 0, or or == 0 and oi < 0.
        See Also:
        AbelianGroupElem.signum()
      • ONEG

        public static BigOctonion ONEG(BigOctonion A)
        Octonion number negative.
        Parameters:
        A - is a octonion number
        Returns:
        -A.
      • OCON

        public static BigOctonion OCON(BigOctonion A)
        Octonion number conjugate.
        Parameters:
        A - is a quaternion number.
        Returns:
        the quaternion conjugate of A.
      • OABS

        public static BigRational OABS(BigOctonion A)
        Octonion number absolute value.
        Parameters:
        A - is a quaternion number.
        Returns:
        the absolute value of A, a rational number. Note: The square root is not jet implemented.
      • OINV

        public static BigOctonion OINV(BigOctonion A)
        Octonion number inverse.
        Parameters:
        A - is a non-zero quaternion number.
        Returns:
        S with S * A = 1.
      • divide

        public BigOctonion divide(BigRational b)
        BigOctonion divide.
        Parameters:
        b - BigRational.
        Returns:
        this/b.
      • quotientRemainder

        public BigOctonion[] quotientRemainder(BigOctonion S)
        Quotient and remainder by division of this by S.
        Parameters:
        S - a octonion number
        Returns:
        [this/S, this - (this/S)*S].
      • random

        public BigOctonion random(int n)
        BigOctonion random. Random rational numbers A, B, C and D are generated using random(n). Then R is the quaternion number with real part A and imaginary parts B, C and D.
        Specified by:
        random in interface ElemFactory<BigOctonion>
        Parameters:
        n - such that 0 ≤ A, B, C, D ≤ (2n-1).
        Returns:
        R, a random BigOctonion.
      • random

        public BigOctonion random(int n,
                                  java.util.Random rnd)
        BigOctonion random. Random rational numbers A, B, C and D are generated using RNRAND(n). Then R is the quaternion number with real part A and imaginary parts B, C and D.
        Specified by:
        random in interface ElemFactory<BigOctonion>
        Parameters:
        n - such that 0 ≤ A, B, C, D ≤ (2n-1).
        rnd - is a source for random bits.
        Returns:
        R, a random BigOctonion.
      • ORAND

        public static BigOctonion ORAND(int n)
        Octonion number, random. Random rational numbers A, B, C and D are generated using RNRAND(n). Then R is the quaternion number with real part A and imaginary parts B, C and D.
        Parameters:
        n - such that 0 ≤ A, B, C, D ≤ (2n-1).
        Returns:
        R, a random BigOctonion.
      • parse

        public BigOctonion parse(java.lang.String s)
        Parse quaternion number from String.
        Specified by:
        parse in interface ElemFactory<BigOctonion>
        Parameters:
        s - String.
        Returns:
        BigOctonion from s.
      • parse

        public BigOctonion parse(java.io.Reader r)
        Parse quaternion number from Reader.
        Specified by:
        parse in interface ElemFactory<BigOctonion>
        Parameters:
        r - Reader.
        Returns:
        next BigOctonion from r.
      • egcd

        public BigOctonion[] egcd(BigOctonion S)
        BigOctonion extended greatest common divisor.
        Specified by:
        egcd in interface RingElem<BigOctonion>
        Parameters:
        S - BigOctonion.
        Returns:
        [ gcd(this,S), a, b ] with a*this + b*S = gcd(this,S).

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.