Class | JAS::SubModule |
In: |
examples/jas.rb
|
Parent: | Object |
Represents a JAS sub-module over a polynomial ring.
Methods to compute Groebner bases.
cols | [R] | |
list | [R] | |
modu | [R] | |
mset | [R] | |
pset | [R] | |
rows | [R] |
Constructor for a sub-module.
# File examples/jas.rb, line 2949 2949: def initialize(modu,modstr="",list=nil) 2950: @modu = modu; 2951: if list == nil 2952: sr = StringReader.new( modstr ); 2953: tok = GenPolynomialTokenizer.new(modu.ring,sr); 2954: @list = tok.nextSubModuleList(); 2955: else 2956: if list.is_a? Array 2957: if list.size != 0 2958: if list[0].is_a? RingElem 2959: list = list.map { |re| re.elem }; 2960: end 2961: end 2962: @list = rbarray2arraylist(list,@modu.ring,rec=2); 2963: else 2964: @list = list; 2965: end 2966: end 2967: #puts "list = ", str(list); 2968: #e = @list[0]; 2969: #puts "e = ", e; 2970: @mset = OrderedModuleList.new(modu.ring,@list); 2971: @cols = @mset.cols; 2972: @rows = @mset.rows; 2973: @pset = @mset.getPolynomialList(); 2974: end
Compute a Groebner base.
# File examples/jas.rb, line 2986 2986: def GB() 2987: t = System.currentTimeMillis(); 2988: gg = ModGroebnerBaseAbstract.new().GB(@mset); 2989: t = System.currentTimeMillis() - t; 2990: puts "executed module GB in #{t} ms\n"; 2991: return SubModule.new(@modu,"",gg.list); 2992: end