Documentation of 'edu.jas.vector.GenMatrix' Java class
GenMatrix
edu.jas.vector

Class GenMatrix<C extends RingElem<C>>

    • Constructor Detail

      • GenMatrix

        public GenMatrix(GenMatrixRing<C> r)
        Constructor for zero GenMatrix.
        Parameters:
        r - matrix ring
      • GenMatrix

        public GenMatrix(GenMatrixRing<C> r,
                         java.util.List<java.util.List<C>> m)
        Constructor for GenMatrix.
        Parameters:
        r - matrix ring
        m - matrix
      • GenMatrix

        public GenMatrix(GenMatrixRing<C> r,
                         java.util.ArrayList<java.util.ArrayList<C>> m)
        Constructor for GenMatrix.
        Parameters:
        r - matrix ring
        m - matrix
    • Method Detail

      • get

        public C get(int i,
                     int j)
        Get element at row i, column j.
        Parameters:
        i - row index.
        j - column index.
        Returns:
        this(i,j).
      • setMutate

        public void setMutate(int i,
                              int j,
                              C el)
        Set element at row i, column j. Mutates this matrix.
        Parameters:
        i - row index.
        j - column index.
        el - element to set.
      • set

        public GenMatrix<C> set(int i,
                                int j,
                                C el)
        Set element at row i, column j.
        Parameters:
        i - row index.
        j - column index.
        el - element to set.
        Returns:
        new matrix m, with m(i,j) == el.
      • toString

        public java.lang.String toString()
        Get the String representation as RingElem.
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()
      • toScript

        public java.lang.String toScript()
        Get a scripting compatible string representation.
        Specified by:
        toScript in interface Element<GenMatrix<C extends RingElem<C>>>
        Returns:
        script compatible representation for this Element.
        See Also:
        Element.toScript()
      • copy

        public GenMatrix<C> copy()
        clone method.
        Specified by:
        copy in interface Element<GenMatrix<C extends RingElem<C>>>
        Returns:
        Creates and returns a copy of this Element.
        See Also:
        Object.clone()
      • isONE

        public boolean isONE()
        Test if this is one.
        Specified by:
        isONE in interface MonoidElem<GenMatrix<C extends RingElem<C>>>
        Returns:
        true if this is 1, else false.
      • equals

        public boolean equals(java.lang.Object other)
        Comparison with any other object.
        Specified by:
        equals in interface Element<GenMatrix<C extends RingElem<C>>>
        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 GenMatrix.
        Specified by:
        hashCode in interface Element<GenMatrix<C extends RingElem<C>>>
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        the hashCode.
        See Also:
        Object.hashCode()
      • compareTo

        public int compareTo(GenMatrix<C> b)
        compareTo, lexicogaphical comparison.
        Specified by:
        compareTo in interface Element<GenMatrix<C extends RingElem<C>>>
        Specified by:
        compareTo in interface java.lang.Comparable<GenMatrix<C extends RingElem<C>>>
        Parameters:
        b - other
        Returns:
        1 if (this < b), 0 if (this == b) or -1 if (this > b).
      • isUnit

        public boolean isUnit()
        Test if this is a unit. I.e. there exists x with this.multiply(x).isONE() == true. Tests if all diagonal elements are units and all other elements are zero.
        Specified by:
        isUnit in interface MonoidElem<GenMatrix<C extends RingElem<C>>>
        Returns:
        true if this is a unit, else false.
      • leftScalarMultiply

        public GenMatrix<C> leftScalarMultiply(C s)
        Left product of this matrix with scalar.
        Returns:
        s*this
      • linearCombination

        public GenMatrix<C> linearCombination(C t,
                                              GenMatrix<C> b)
        Left linear combination of this matrix with scalar multiple of other matrix.
        Returns:
        this+t*b
      • leftLinearCombination

        public GenMatrix<C> leftLinearCombination(C s,
                                                  C t,
                                                  GenMatrix<C> b)
        left linear compination of this matrix with scalar multiple of other matrix.
        Returns:
        s*this+t*b
      • multiplySimple

        public GenMatrix<C> multiplySimple(GenMatrix<C> S)
        Multiply this with S. Simple unblocked algorithm.
        Parameters:
        S -
        Returns:
        this * S.
      • quotientRemainder

        public GenMatrix<C>[] quotientRemainder(GenMatrix<C> S)
        Quotient and remainder by division of this by S.
        Parameters:
        S - a GenMatrix
        Returns:
        [this/S, this - (this/S)*S].
      • egcd

        public GenMatrix<C>[] egcd(GenMatrix<C> b)
        Extended greatest common divisor.
        Specified by:
        egcd in interface RingElem<GenMatrix<C extends RingElem<C>>>
        Parameters:
        b - other element.
        Returns:
        [ gcd(this,b), c1, c2 ] with c1*this + c2*b = gcd(this,b).

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.