Represents a JAS module over a polynomial ring.
Method to create sub-modules.
Module constructor.
# File examples/jas.rb, line 4141 def initialize(modstr="",ring=nil,cols=0) if ring == nil sr = StringReader.new( modstr ); tok = RingFactoryTokenizer.new(sr); pfac = tok.nextPolynomialRing(); #tok = GenPolynomialTokenizer.new(sr); #@mset = tok.nextSubModuleSet(); #if @mset.cols >= 0 # @cols = @mset.cols; #else #end @ring = pfac; else if ring.is_a? Ring @ring = ring.ring else @ring = ring; end end @mset = ModuleList.new(@ring,nil); if cols < 0 cols = 0; end @cols = cols; end
Create an element from a string.
# File examples/jas.rb, line 4184 def element(mods) if not mods.is_a? String begin if @ring == mods.ring return RingElem.new(mods); end rescue Exception => e # pass end mods = str(mods); end ii = SubModule.new( "( " + mods + " )"); list = ii.mset.list; if list.size > 0 return RingElem.new( list[0] ); end end
Get the generators of this module.
# File examples/jas.rb, line 4205 def gens() gm = GenVectorModul.new(@ring,@cols); ll = gm.generators(); nn = ll.map { |e| RingElem.new(e) }; # want use val here, but can not return nn; end
Generated with the Darkfish Rdoc Generator 2.