In Files

Parent

JAS::SolvableSubModule

Represents a JAS sub-module over a solvable polynomial ring.

Methods to compute left, right and two-sided Groebner bases.

Attributes

cols[R]

the Java module, module list, number of columns and rows, module list

list[R]

the Java module, module list, number of columns and rows, module list

modu[R]

the Java module, module list, number of columns and rows, module list

mset[R]

the Java module, module list, number of columns and rows, module list

rows[R]

the Java module, module list, number of columns and rows, module list

Public Class Methods

new(modu,modstr="",list=nil) click to toggle source

Constructor for sub-module over a solvable polynomial ring.

# File examples/jas.rb, line 4412
def initialize(modu,modstr="",list=nil)
    @modu = modu;
    if list == nil
       sr = StringReader.new( modstr );
       tok = GenPolynomialTokenizer.new(modu.ring,sr);
       @list = tok.nextSolvableSubModuleList();
    else
        if list.is_a? Array
            @list = rbarray2arraylist(list,@modu.ring,rec=2);
        else
            @list = list;
        end
    end
    @mset = OrderedModuleList.new(modu.ring,@list);
    @cols = @mset.cols;
    @rows = @mset.rows;
end

Public Instance Methods

isLeftGB() click to toggle source

Test if this is a left Groebner base.

# File examples/jas.rb, line 4452
def isLeftGB()
    t = System.currentTimeMillis();
    #b = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).isLeftGB(@mset);
    b = SolvableGroebnerBaseSeq.new().isLeftGB(@mset);
    t = System.currentTimeMillis() - t;
    puts "module isLeftGB executed in #{t} ms\n"; 
    return b;
end
isLeftSyzygy(g) click to toggle source

Test if this is a left syzygy of the vectors in g.

# File examples/jas.rb, line 4512
def isLeftSyzygy(g)
    l = @list;
    if g.is_a? SolvIdeal
       s = g.pset.list; # not g.list
    else 
       if g.is_a? SolvableSubModule
          s = g.mset;
          l = @mset;
       else
          raise "unknown type #{g.getClass().getName()}";
       end
    end
    #puts "l = #{l}"; 
    #puts "s = #{s}"; 
    t = System.currentTimeMillis();
    z = SolvableSyzygySeq.new(@modu.ring.coFac).isLeftZeroRelation( l, s );
    t = System.currentTimeMillis() - t;
    puts "executed isLeftSyzygy in #{t} ms\n"; 
    return z;
end
isRightGB() click to toggle source

Test if this is a right Groebner base.

# File examples/jas.rb, line 4500
def isRightGB()
    t = System.currentTimeMillis();
    #b = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).isRightGB(@mset);
    b = SolvableGroebnerBaseSeq.new().isRightGB(@mset);
    t = System.currentTimeMillis() - t;
    puts "module isRightGB executed in #{t} ms\n"; 
    return b;
end
isRightSyzygy(g) click to toggle source

Test if this is a right syzygy of the vectors in g.

# File examples/jas.rb, line 4549
def isRightSyzygy(g)
    l = @list;
    if g.is_a? SolvIdeal
       s = g.pset.list; # not g.list
    else 
       if g.is_a? SolvableSubModule
          s = g.mset;
          l = @mset;
       else
          raise "unknown type #{g.getClass().getName()}";
       end
    end
    #puts "l = #{l}"; 
    #puts "s = #{s}"; 
    t = System.currentTimeMillis();
    z = SolvableSyzygySeq.new(@modu.ring.coFac).isRightZeroRelation( l, s );
    t = System.currentTimeMillis() - t;
    puts "executed isRightSyzygy in #{t} ms\n"; 
    return z;
end
isTwosidedGB() click to toggle source

Test if this is a two-sided Groebner base.

# File examples/jas.rb, line 4476
def isTwosidedGB()
    t = System.currentTimeMillis();
    #b = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).isTwosidedGB(@mset);
    b = SolvableGroebnerBaseSeq.new().isTwosidedGB(@mset);
    t = System.currentTimeMillis() - t;
    puts "module isTwosidedGB executed in #{t} ms\n"; 
    return b;
end
leftGB() click to toggle source

Compute a left Groebner base.

# File examples/jas.rb, line 4440
def leftGB()
    t = System.currentTimeMillis();
    #gg = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).leftGB(@mset);
    gg = SolvableGroebnerBaseSeq.new().leftGB(@mset);
    t = System.currentTimeMillis() - t;
    puts "executed left module GB in #{t} ms\n"; 
    return SolvableSubModule.new(@modu,"",gg.list);
end
leftSyzygy() click to toggle source

Compute left syzygys of this module.

# File examples/jas.rb, line 4536
def leftSyzygy()
    l = @mset;
    t = System.currentTimeMillis();
    p = SolvableSyzygySeq.new(@modu.ring.coFac).leftZeroRelationsArbitrary( l );
    t = System.currentTimeMillis() - t;
    puts "executed left module syzygy in #{t} ms\n"; 
    m = SolvableModule.new("",p.ring,p.cols);
    return SolvableSubModule.new(m,"",p.list);
end
rightGB() click to toggle source

Compute a right Groebner base.

# File examples/jas.rb, line 4488
def rightGB()
    t = System.currentTimeMillis();
    #gg = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).rightGB(@mset);
    gg = SolvableGroebnerBaseSeq.new().rightGB(@mset);
    t = System.currentTimeMillis() - t;
    puts "executed right module GB in #{t} ms\n"; 
    return SolvableSubModule.new(@modu,"",gg.list);
end
rightSyzygy() click to toggle source

Compute right syzygys of this module.

# File examples/jas.rb, line 4573
def rightSyzygy()
    l = @mset;
    t = System.currentTimeMillis();
    #no: p = SolvableSyzygySeq.new(@modu.ring.coFac).rightZeroRelations( l );
    p = SolvableSyzygySeq.new(@modu.ring.coFac).rightZeroRelationsArbitrary( l );
    t = System.currentTimeMillis() - t;
    puts "executed right module syzygy in #{t} ms\n"; 
    m = SolvableModule.new("",p.ring,p.cols);
    return SolvableSubModule.new(m,"",p.list);
end
to_s() click to toggle source

Create a string representation.

# File examples/jas.rb, line 4433
def to_s()
    return @mset.toScript(); # + "\n\n" + str(@pset);
end
twosidedGB() click to toggle source

Compute a two-sided Groebner base.

# File examples/jas.rb, line 4464
def twosidedGB()
    t = System.currentTimeMillis();
    #gg = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).twosidedGB(@mset);
    gg = SolvableGroebnerBaseSeq.new().twosidedGB(@mset);
    t = System.currentTimeMillis() - t;
    puts "executed twosided module GB in #{t} ms\n"; 
    return SolvableSubModule.new(@modu,"",gg.list);
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.