class JAS::SubModule
Represents a JAS sub-module over a polynomial ring.
Methods to compute Groebner bases.
Attributes
the Java module, module list, polynomial list, number of columns and rows, module list
the Java module, module list, polynomial list, number of columns and rows, module list
the Java module, module list, polynomial list, number of columns and rows, module list
the Java module, module list, polynomial list, number of columns and rows, module list
the Java module, module list, polynomial list, number of columns and rows, module list
the Java module, module list, polynomial list, number of columns and rows, module list
Public Class Methods
Constructor for a sub-module.
# File examples/jas.rb, line 4484 def initialize(modu,modstr="",list=nil) @modu = modu; if list == nil sr = StringReader.new( modstr ); tok = GenPolynomialTokenizer.new(modu.ring,sr); @list = tok.nextSubModuleList(); else if list.is_a? Array if list.size != 0 if list[0].is_a? RingElem list = list.map { |re| re.elem }; end end @list = rbarray2arraylist(list,@modu.ring,rec=2); else @list = list; end end #puts "list = ", str(list); #e = @list[0]; #puts "e = ", e; @mset = OrderedModuleList.new(modu.ring,@list); @cols = @mset.cols; @rows = @mset.rows; @pset = @mset.getPolynomialList(); end
Public Instance Methods
Compute a Groebner base.
# File examples/jas.rb, line 4521 def GB() t = System.currentTimeMillis(); #gg = ModGroebnerBaseSeq.new(@modu.ring.coFac).GB(@mset); gg = GroebnerBaseSeq.new().GB(@mset); t = System.currentTimeMillis() - t; puts "executed module GB in #{t} ms\n"; return SubModule.new(@modu,"",gg.list); end
Test if this is a Groebner base.
# File examples/jas.rb, line 4533 def isGB() t = System.currentTimeMillis(); #b = ModGroebnerBaseSeq.new(@modu.ring.coFac).isGB(@mset); b = GroebnerBaseSeq.new().isGB(@mset); t = System.currentTimeMillis() - t; puts "module isGB executed in #{t} ms\n"; return b; end
Test if this is a syzygy of the polynomials in g.
# File examples/jas.rb, line 4545 def isSyzygy(g) l = @list; if g.is_a? SimIdeal s = g.pset.list; # not g.list else if g.is_a? SubModule s = g.mset; l = @mset; else raise "unknown type #{g.getClass().getName()}"; end end #puts "l = #{l}"; #puts "s = #{s}"; t = System.currentTimeMillis(); z = SyzygySeq.new(@modu.ring.coFac).isZeroRelation( l, s ); t = System.currentTimeMillis() - t; puts "executed isSyzygy in #{t} ms\n"; return z; end
Compute syzygys of this module.
# File examples/jas.rb, line 4569 def syzygy() l = @mset; t = System.currentTimeMillis(); p = SyzygySeq.new(@modu.ring.coFac).zeroRelations( l ); t = System.currentTimeMillis() - t; puts "executed module syzygy in #{t} ms\n"; m = CommutativeModule.new("",p.ring,p.cols); return SubModule.new(m,"",p.list); end
Create a string representation.
# File examples/jas.rb, line 4514 def to_s() return @mset.toScript(); # + "\n\n" + str(@pset); end