In Files

Parent

Methods

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, 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

Public Instance Methods

STD(trunc=nil) click to toggle source

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
to_s() click to toggle source

Create a string representation.

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

[Validate]

Generated with the Darkfish Rdoc Generator 2.