class JAS::PSIdeal

Represents a JAS power series ideal.

Method for Standard bases.

Attributes

list[R]

the Java powerseries ring, powerseries list

ring[R]

the Java powerseries ring, powerseries list

Public Class Methods

new(ring,polylist,ideal=nil,list=nil) click to toggle source

PSIdeal constructor.

     # File examples/jas.rb
5697 def initialize(ring,polylist,ideal=nil,list=nil)
5698     if ring.is_a? Ring or ring.is_a? PolyRing
5699         ring = MultiVarPowerSeriesRing.new(ring.ring);
5700     elsif ring.is_a? MultiSeriesRing
5701         ring = ring.ring;
5702     end
5703     @ring = ring;
5704     #puts "ring = ", ring.toScript();
5705     if ideal != nil
5706        polylist = ideal.pset.list;
5707     end
5708     if list == nil
5709         @polylist = rbarray2arraylist( polylist.map { |a| a.elem } );
5710         #puts "polylist = ", @polylist;
5711         @list = @ring.fromPolynomial(@polylist);
5712     else
5713         @polylist = nil;
5714         @list = rbarray2arraylist( list.map { |a| a.elem } );
5715     end
5716 end

Public Instance Methods

STD(trunc=nil) click to toggle source

Compute a standard base.

     # File examples/jas.rb
5728 def STD(trunc=nil)
5729     pr = @ring;
5730     if trunc != nil
5731         pr.setTruncate(trunc);
5732     end
5733     #puts "pr = ", pr.toScript();
5734     ff = @list;
5735     #puts "ff = ", ff;
5736     tm = StandardBaseSeq.new();
5737     t = System.currentTimeMillis();
5738     ss = tm.STD(ff);
5739     t = System.currentTimeMillis() - t;
5740     puts "sequential standard base executed in #{t} ms\n";
5741     #Sp = [ RingElem.new(a.asPolynomial()) for a in S ];
5742     sp = ss.map { |a| RingElem.new(a) };
5743     #return sp;
5744     return PSIdeal.new(@ring,nil,nil,sp);
5745 end
to_s() click to toggle source

Create a string representation.

     # File examples/jas.rb
5721 def to_s()
5722     return "( " + @list.map { |a| a.toScript() }.join(", ") + " )";
5723 end