Represents a JAS power series ideal.
Method for Standard bases.
PSIdeal constructor.
# File examples/jas.rb, line 5004 def initialize(ring,polylist,ideal=nil,list=nil) if ring.is_a? Ring or ring.is_a? PolyRing ring = MultiVarPowerSeriesRing.new(ring.ring); elsif ring.is_a? MultiSeriesRing ring = ring.ring; end @ring = ring; #puts "ring = ", ring.toScript(); if ideal != nil polylist = ideal.pset.list; end if list == nil @polylist = rbarray2arraylist( polylist.map { |a| a.elem } ); #puts "polylist = ", @polylist; @list = @ring.fromPolynomial(@polylist); else @polylist = nil; @list = rbarray2arraylist( list.map { |a| a.elem } ); end end
Compute a standard base.
# File examples/jas.rb, line 5035 def STD(trunc=nil) pr = @ring; if trunc != nil pr.setTruncate(trunc); end #puts "pr = ", pr.toScript(); ff = @list; #puts "ff = ", ff; tm = StandardBaseSeq.new(); t = System.currentTimeMillis(); ss = tm.STD(ff); t = System.currentTimeMillis() - t; puts "sequential standard base executed in #{t} ms\n"; #Sp = [ RingElem.new(a.asPolynomial()) for a in S ]; sp = ss.map { |a| RingElem.new(a) }; #return sp; return PSIdeal.new(@ring,nil,nil,sp); end
Generated with the Darkfish Rdoc Generator 2.