In Files

Parent

Methods

JAS::WordPolyRing

Represents a JAS non-commutative polynomial ring: GenWordPolynomialRing.

Provides more convenient constructor. Then returns a Ring. Note: watch your step: check that jruby does not reorder multiplication.

Public Class Methods

new(coeff,vars) click to toggle source

Ring constructor.

coeff = factory for coefficients, vars = string with variable names.

# File examples/jas.rb, line 5474
def initialize(coeff,vars)
    if coeff == nil
        raise ArgumentError, "No coefficient given."
    end
    cf = coeff;
    if coeff.is_a? RingElem
        cf = coeff.elem.factory();
    end
    if coeff.is_a? Ring
        cf = coeff.ring;
    end
    if vars == nil
        raise ArgumentError, "No variable names given."
    end
    names = vars;
    if vars.is_a? String
        names = GenPolynomialTokenizer.variableList(vars);
    end
    wf = WordFactory.new(names);
    @ring = GenWordPolynomialRing.new(cf, wf);
end

Public Instance Methods

to_s() click to toggle source

Create a string representation.

# File examples/jas.rb, line 5499
def to_s()
    return @ring.toScript();
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.