class JAS::SolvableSubModule
Represents a JAS sub-module over a solvable polynomial ring.
Methods to compute left, right and two-sided Groebner bases.
Attributes
the Java module, module list, number of columns and rows, module list
the Java module, module list, number of columns and rows, module list
the Java module, module list, number of columns and rows, module list
the Java module, module list, number of columns and rows, module list
the Java module, module list, number of columns and rows, module list
Public Class Methods
Constructor for sub-module over a solvable polynomial ring.
# File examples/jas.rb 4775 def initialize(modu,modstr="",list=nil) 4776 @modu = modu; 4777 if list == nil 4778 sr = StringReader.new( modstr ); 4779 tok = GenPolynomialTokenizer.new(modu.ring,sr); 4780 @list = tok.nextSolvableSubModuleList(); 4781 else 4782 if list.is_a? Array 4783 @list = rbarray2arraylist(list,@modu.ring,rec=2); 4784 else 4785 @list = list; 4786 end 4787 end 4788 @mset = OrderedModuleList.new(modu.ring,@list); 4789 @cols = @mset.cols; 4790 @rows = @mset.rows; 4791 end
Public Instance Methods
Test if this is a left Groebner base.
# File examples/jas.rb 4815 def isLeftGB() 4816 t = System.currentTimeMillis(); 4817 #b = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).isLeftGB(@mset); 4818 b = SolvableGroebnerBaseSeq.new().isLeftGB(@mset); 4819 t = System.currentTimeMillis() - t; 4820 puts "module isLeftGB executed in #{t} ms\n"; 4821 return b; 4822 end
Test if this is a left syzygy of the vectors in g.
# File examples/jas.rb 4875 def isLeftSyzygy(g) 4876 l = @list; 4877 if g.is_a? SolvIdeal 4878 s = g.pset.list; # not g.list 4879 else 4880 if g.is_a? SolvableSubModule 4881 s = g.mset; 4882 l = @mset; 4883 else 4884 raise "unknown type #{g.getClass().getName()}"; 4885 end 4886 end 4887 #puts "l = #{l}"; 4888 #puts "s = #{s}"; 4889 t = System.currentTimeMillis(); 4890 z = SolvableSyzygySeq.new(@modu.ring.coFac).isLeftZeroRelation( l, s ); 4891 t = System.currentTimeMillis() - t; 4892 puts "executed isLeftSyzygy in #{t} ms\n"; 4893 return z; 4894 end
Test if this is a right Groebner base.
# File examples/jas.rb 4863 def isRightGB() 4864 t = System.currentTimeMillis(); 4865 #b = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).isRightGB(@mset); 4866 b = SolvableGroebnerBaseSeq.new().isRightGB(@mset); 4867 t = System.currentTimeMillis() - t; 4868 puts "module isRightGB executed in #{t} ms\n"; 4869 return b; 4870 end
Test if this is a right syzygy of the vectors in g.
# File examples/jas.rb 4912 def isRightSyzygy(g) 4913 l = @list; 4914 if g.is_a? SolvIdeal 4915 s = g.pset.list; # not g.list 4916 else 4917 if g.is_a? SolvableSubModule 4918 s = g.mset; 4919 l = @mset; 4920 else 4921 raise "unknown type #{g.getClass().getName()}"; 4922 end 4923 end 4924 #puts "l = #{l}"; 4925 #puts "s = #{s}"; 4926 t = System.currentTimeMillis(); 4927 z = SolvableSyzygySeq.new(@modu.ring.coFac).isRightZeroRelation( l, s ); 4928 t = System.currentTimeMillis() - t; 4929 puts "executed isRightSyzygy in #{t} ms\n"; 4930 return z; 4931 end
Test if this is a two-sided Groebner base.
# File examples/jas.rb 4839 def isTwosidedGB() 4840 t = System.currentTimeMillis(); 4841 #b = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).isTwosidedGB(@mset); 4842 b = SolvableGroebnerBaseSeq.new().isTwosidedGB(@mset); 4843 t = System.currentTimeMillis() - t; 4844 puts "module isTwosidedGB executed in #{t} ms\n"; 4845 return b; 4846 end
Compute a left Groebner base.
# File examples/jas.rb 4803 def leftGB() 4804 t = System.currentTimeMillis(); 4805 #gg = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).leftGB(@mset); 4806 gg = SolvableGroebnerBaseSeq.new().leftGB(@mset); 4807 t = System.currentTimeMillis() - t; 4808 puts "executed left module GB in #{t} ms\n"; 4809 return SolvableSubModule.new(@modu,"",gg.list); 4810 end
Compute left syzygys of this module.
# File examples/jas.rb 4899 def leftSyzygy() 4900 l = @mset; 4901 t = System.currentTimeMillis(); 4902 p = SolvableSyzygySeq.new(@modu.ring.coFac).leftZeroRelationsArbitrary( l ); 4903 t = System.currentTimeMillis() - t; 4904 puts "executed left module syzygy in #{t} ms\n"; 4905 m = SolvableModule.new("",p.ring,p.cols); 4906 return SolvableSubModule.new(m,"",p.list); 4907 end
Compute a right Groebner base.
# File examples/jas.rb 4851 def rightGB() 4852 t = System.currentTimeMillis(); 4853 #gg = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).rightGB(@mset); 4854 gg = SolvableGroebnerBaseSeq.new().rightGB(@mset); 4855 t = System.currentTimeMillis() - t; 4856 puts "executed right module GB in #{t} ms\n"; 4857 return SolvableSubModule.new(@modu,"",gg.list); 4858 end
Compute right syzygys of this module.
# File examples/jas.rb 4936 def rightSyzygy() 4937 l = @mset; 4938 t = System.currentTimeMillis(); 4939 #no: p = SolvableSyzygySeq.new(@modu.ring.coFac).rightZeroRelations( l ); 4940 p = SolvableSyzygySeq.new(@modu.ring.coFac).rightZeroRelationsArbitrary( l ); 4941 t = System.currentTimeMillis() - t; 4942 puts "executed right module syzygy in #{t} ms\n"; 4943 m = SolvableModule.new("",p.ring,p.cols); 4944 return SolvableSubModule.new(m,"",p.list); 4945 end
Create a string representation.
# File examples/jas.rb 4796 def to_s() 4797 return @mset.toScript(); # + "\n\n" + str(@pset); 4798 end
Compute a two-sided Groebner base.
# File examples/jas.rb 4827 def twosidedGB() 4828 t = System.currentTimeMillis(); 4829 #gg = SolvableGroebnerBaseSeq.new(@modu.ring.coFac).twosidedGB(@mset); 4830 gg = SolvableGroebnerBaseSeq.new().twosidedGB(@mset); 4831 t = System.currentTimeMillis() - t; 4832 puts "executed twosided module GB in #{t} ms\n"; 4833 return SolvableSubModule.new(@modu,"",gg.list); 4834 end