Class JAS::WordPolyRing
In: examples/jas.rb
Parent: WordRing

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.

Methods

new   to_s  

Public Class methods

Ring constructor.

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

[Source]

      # File examples/jas.rb, line 4009
4009:     def initialize(coeff,vars)
4010:         if coeff == nil
4011:             raise ValueError, "No coefficient given."
4012:         end
4013:         cf = coeff;
4014:         if coeff.is_a? RingElem
4015:             cf = coeff.elem.factory();
4016:         end
4017:         if coeff.is_a? Ring
4018:             cf = coeff.ring;
4019:         end
4020:         if vars == nil
4021:             raise ValueError, "No variable names given."
4022:         end
4023:         names = vars;
4024:         if vars.is_a? String
4025:             names = GenPolynomialTokenizer.variableList(vars);
4026:         end
4027:         wf = WordFactory.new(names);
4028:         ring = GenWordPolynomialRing.new(cf,wf);
4029:         @ring = ring;
4030:     end

Public Instance methods

Create a string representation.

[Source]

      # File examples/jas.rb, line 4035
4035:     def to_s()
4036:         return @ring.toScript();
4037:     end

[Validate]