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

Class ProductRing<C extends RingElem<C>>

    • Constructor Detail

      • ProductRing

        public ProductRing(RingFactory<C> r,
                           int n)
        The constructor creates a ProductRing object from an ring factory and a modul.
        Parameters:
        r - ring factory.
        n - number of copies.
      • ProductRing

        public ProductRing(java.util.List<RingFactory<C>> l)
        The constructor creates a ProductRing object from an ring factory and a modul.
        Parameters:
        l - list of ring factories.
    • Method Detail

      • getFactory

        public RingFactory<C> getFactory(int i)
        Get ring factory at index i.
        Parameters:
        i - index.
        Returns:
        RingFactory_i.
      • addFactory

        public void addFactory(RingFactory<C> rf)
        Add a ring factory.
        Parameters:
        rf - new ring factory.
      • containsFactory

        public boolean containsFactory(RingFactory<C> rf)
        Contains a ring factory.
        Parameters:
        rf - ring factory.
        Returns:
        true, if rf is contained in this, else false.
      • getAtomic

        public Product<C> getAtomic(int i)
        Get an atomic element.
        Parameters:
        i - index.
        Returns:
        e_i as Product.
      • length

        public int length()
        Get the number of factors of this ring.
        Returns:
        nCopies or ringList.size().
      • isCommutative

        public boolean isCommutative()
        Query if this ring is commutative.
        Specified by:
        isCommutative in interface MonoidFactory<Product<C extends RingElem<C>>>
        Returns:
        true if this ring is commutative, else false.
      • isAssociative

        public boolean isAssociative()
        Query if this ring is associative.
        Specified by:
        isAssociative in interface MonoidFactory<Product<C extends RingElem<C>>>
        Returns:
        true if this ring is associative, else false.
      • onlyFields

        public boolean onlyFields()
        Query if this ring consists only of fields.
        Returns:
        true or false.
      • characteristic

        public java.math.BigInteger characteristic()
        Characteristic of this ring.
        Specified by:
        characteristic in interface RingFactory<Product<C extends RingElem<C>>>
        Returns:
        minimal characteristic of ring component.
      • fromInteger

        public Product<C> fromInteger(java.math.BigInteger a)
        Get a Product element from a BigInteger value.
        Specified by:
        fromInteger in interface ElemFactory<Product<C extends RingElem<C>>>
        Parameters:
        a - BigInteger.
        Returns:
        a Product.
      • toString

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

        public boolean equals(java.lang.Object b)
        Comparison with any other object.
        Overrides:
        equals in class java.lang.Object
        See Also:
        Object.equals(java.lang.Object)
      • hashCode

        public int hashCode()
        Hash code for this product ring.
        Overrides:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()
      • random

        public Product<C> random(int n)
        Product random.
        Specified by:
        random in interface ElemFactory<Product<C extends RingElem<C>>>
        Parameters:
        n - such that 0 ≤ v ≤ (2n-1).
        Returns:
        a random product element v.
      • random

        public Product<C> random(int n,
                                 float q)
        Product random.
        Parameters:
        n - such that 0 ≤ v ≤ (2n-1).
        q - density of nozero entries.
        Returns:
        a random product element v.
      • random

        public Product<C> random(int n,
                                 java.util.Random rnd)
        Product random.
        Specified by:
        random in interface ElemFactory<Product<C extends RingElem<C>>>
        Parameters:
        n - such that 0 ≤ v ≤ (2n-1).
        rnd - is a source for random bits.
        Returns:
        a random product element v.
      • random

        public Product<C> random(int n,
                                 float q,
                                 java.util.Random rnd)
        Product random.
        Parameters:
        n - such that 0 ≤ v ≤ (2n-1).
        q - density of nozero entries.
        rnd - is a source for random bits.
        Returns:
        a random product element v.
      • parse

        public Product<C> parse(java.lang.String s)
        Parse Product from String.
        Specified by:
        parse in interface ElemFactory<Product<C extends RingElem<C>>>
        Parameters:
        s - String.
        Returns:
        Product from s.
      • parse

        public Product<C> parse(java.io.Reader r)
        Parse Product from Reader. Syntax: p1 ... pn (no commas)
        Specified by:
        parse in interface ElemFactory<Product<C extends RingElem<C>>>
        Parameters:
        r - Reader.
        Returns:
        next Product from r.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.