Represents a JAS solvable polynomial ring: GenSolvablePolynomialRing.
Has a method to create solvable ideals.
Solvable polynomial ring constructor.
# File examples/jas.rb, line 3426 def initialize(ringstr="",ring=nil) if ring == nil sr = StringReader.new( ringstr ); tok = RingFactoryTokenizer.new(sr); pfac = tok.nextSolvablePolynomialRing(); #tok = GenPolynomialTokenizer.new(sr); #@pset = tok.nextSolvablePolynomialSet(); @ring = pfac; else if ring.is_a? Ring @ring = ring.ring else @ring = ring; end end if @ring.isAssociative() puts "ring is associative"; else puts "warning: ring is not associative"; end #puts "SolvableRing to super()"; super("",@ring) end
Create an element from a string or object.
# File examples/jas.rb, line 3481 def element(poly) if not poly.is_a? String begin if @ring == poly.ring return RingElem.new(poly); end rescue Exception => e # pass end poly = str(poly); end ii = SolvIdeal.new(self, "( " + poly + " )"); list = ii.pset.list; if list.size > 0 return RingElem.new( list[0] ); end end
Create a solvable ideal.
# File examples/jas.rb, line 3460 def ideal(ringstr="",list=nil) return SolvIdeal.new(self,ringstr,list); end
Get the one of the solvable polynomial ring.
# File examples/jas.rb, line 3467 def one() return RingElem.new( @ring.getONE() ); end
Generated with the Darkfish Rdoc Generator 2.