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 4916 def initialize(modu,modstr="",list=nil) 4917 @modu = modu; 4918 if list == nil 4919 sr = StringReader.new( modstr ); 4920 tok = GenPolynomialTokenizer.new(modu.ring,sr); 4921 @list = tok.nextSubModuleList(); 4922 else 4923 if list.is_a? Array 4924 if list.size != 0 4925 if list[0].is_a? RingElem 4926 list = list.map { |re| re.elem }; 4927 end 4928 end 4929 @list = rbarray2arraylist(list,@modu.ring,rec=2); 4930 else 4931 @list = list; 4932 end 4933 end 4934 #puts "list = ", str(list); 4935 #e = @list[0]; 4936 #puts "e = ", e; 4937 @mset = OrderedModuleList.new(modu.ring,@list); 4938 @cols = @mset.cols; 4939 @rows = @mset.rows; 4940 @pset = @mset.getPolynomialList(); 4941 end
Public Instance Methods
Compute a Groebner base.
# File examples/jas.rb 4953 def GB() 4954 t = System.currentTimeMillis(); 4955 #gg = ModGroebnerBaseSeq.new(@modu.ring.coFac).GB(@mset); 4956 gg = GroebnerBaseSeq.new().GB(@mset); 4957 t = System.currentTimeMillis() - t; 4958 puts "executed module GB in #{t} ms\n"; 4959 return SubModule.new(@modu,"",gg.list); 4960 end
Test if this is a Groebner base.
# File examples/jas.rb 4965 def isGB() 4966 t = System.currentTimeMillis(); 4967 #b = ModGroebnerBaseSeq.new(@modu.ring.coFac).isGB(@mset); 4968 b = GroebnerBaseSeq.new().isGB(@mset); 4969 t = System.currentTimeMillis() - t; 4970 puts "module isGB executed in #{t} ms\n"; 4971 return b; 4972 end
Test if this is a syzygy of the polynomials in g.
# File examples/jas.rb 4977 def isSyzygy(g) 4978 l = @list; 4979 if g.is_a? SimIdeal 4980 s = g.pset.list; # not g.list 4981 else 4982 if g.is_a? SubModule 4983 s = g.mset; 4984 l = @mset; 4985 else 4986 raise "unknown type #{g.getClass().getName()}"; 4987 end 4988 end 4989 #puts "l = #{l}"; 4990 #puts "s = #{s}"; 4991 t = System.currentTimeMillis(); 4992 z = SyzygySeq.new(@modu.ring.coFac).isZeroRelation( l, s ); 4993 t = System.currentTimeMillis() - t; 4994 puts "executed isSyzygy in #{t} ms\n"; 4995 return z; 4996 end
Compute syzygys of this module.
# File examples/jas.rb 5001 def syzygy() 5002 l = @mset; 5003 t = System.currentTimeMillis(); 5004 p = SyzygySeq.new(@modu.ring.coFac).zeroRelations( l ); 5005 t = System.currentTimeMillis() - t; 5006 puts "executed module syzygy in #{t} ms\n"; 5007 m = CommutativeModule.new("",p.ring,p.cols); 5008 return SubModule.new(m,"",p.list); 5009 end
Create a string representation.
# File examples/jas.rb 4946 def to_s() 4947 return @mset.toScript(); # + "\n\n" + str(@pset); 4948 end