Class | JAS::SolvableSubModule |
In: |
examples/jas.rb
|
Parent: | Object |
Represents a JAS sub-module over a solvable polynomial ring.
Methods to compute left, right and two-sided Groebner bases.
cols | [R] | |
list | [R] | |
modu | [R] | |
mset | [R] | |
rows | [R] |
Constructor for sub-module over a solvable polynomial ring.
# File examples/jas.rb, line 3097 3097: def initialize(modu,modstr="",list=nil) 3098: @modu = modu; 3099: if list == nil 3100: sr = StringReader.new( modstr ); 3101: tok = GenPolynomialTokenizer.new(modu.ring,sr); 3102: @list = tok.nextSolvableSubModuleList(); 3103: else 3104: if list.is_a? Array 3105: @list = rbarray2arraylist(list,@modu.ring,rec=2); 3106: else 3107: @list = list; 3108: end 3109: end 3110: @mset = OrderedModuleList.new(modu.ring,@list); 3111: @cols = @mset.cols; 3112: @rows = @mset.rows; 3113: end
Test if this is a left Groebner base.
# File examples/jas.rb, line 3136 3136: def isLeftGB() 3137: t = System.currentTimeMillis(); 3138: b = ModSolvableGroebnerBaseAbstract.new().isLeftGB(@mset); 3139: t = System.currentTimeMillis() - t; 3140: puts "module isLeftGB executed in #{t} ms\n"; 3141: return b; 3142: end
Test if this is a right Groebner base.
# File examples/jas.rb, line 3180 3180: def isRightGB() 3181: t = System.currentTimeMillis(); 3182: b = ModSolvableGroebnerBaseAbstract.new().isRightGB(@mset); 3183: t = System.currentTimeMillis() - t; 3184: puts "module isRightGB executed in #{t} ms\n"; 3185: return b; 3186: end
Test if this is a two-sided Groebner base.
# File examples/jas.rb, line 3158 3158: def isTwosidedGB() 3159: t = System.currentTimeMillis(); 3160: b = ModSolvableGroebnerBaseAbstract.new().isTwosidedGB(@mset); 3161: t = System.currentTimeMillis() - t; 3162: puts "module isTwosidedGB executed in #{t} ms\n"; 3163: return b; 3164: end
Compute a left Groebner base.
# File examples/jas.rb, line 3125 3125: def leftGB() 3126: t = System.currentTimeMillis(); 3127: gg = ModSolvableGroebnerBaseAbstract.new().leftGB(@mset); 3128: t = System.currentTimeMillis() - t; 3129: puts "executed left module GB in #{t} ms\n"; 3130: return SolvableSubModule.new(@modu,"",gg.list); 3131: end
Compute a right Groebner base.
# File examples/jas.rb, line 3169 3169: def rightGB() 3170: t = System.currentTimeMillis(); 3171: gg = ModSolvableGroebnerBaseAbstract.new().rightGB(@mset); 3172: t = System.currentTimeMillis() - t; 3173: puts "executed module rightGB in #{t} ms\n"; 3174: return SolvableSubModule.new(@modu,"",gg.list); 3175: end
Create a string representation.
# File examples/jas.rb, line 3118 3118: def to_s() 3119: return @mset.toScript(); # + "\n\n" + str(@pset); 3120: end
Compute a two-sided Groebner base.
# File examples/jas.rb, line 3147 3147: def twosidedGB() 3148: t = System.currentTimeMillis(); 3149: gg = ModSolvableGroebnerBaseAbstract.new().twosidedGB(@mset); 3150: t = System.currentTimeMillis() - t; 3151: puts "executed in #{t} ms\n"; 3152: return SolvableSubModule.new(@modu,"",gg.list); 3153: end