Class | JAS::SolvableIdeal |
In: |
examples/jas.rb
|
Parent: | Object |
Represents a JAS solvable polynomial ideal.
Methods for left, right two-sided Groebner basees and others.
list | [R] | |
pset | [R] | |
ring | [R] |
Constructor for an ideal in a solvable polynomial ring.
# File examples/jas.rb, line 2713 2713: def initialize(ring,ringstr="",list=nil) 2714: @ring = ring; 2715: if list == nil 2716: sr = StringReader.new( ringstr ); 2717: tok = GenPolynomialTokenizer.new(ring.ring,sr); 2718: @list = tok.nextSolvablePolynomialList(); 2719: else 2720: @list = rbarray2arraylist(list,rec=1); 2721: end 2722: @pset = OrderedPolynomialList.new(ring.ring,@list); 2723: end
Compute the intersection of this and the polynomial ring.
# File examples/jas.rb, line 2813 2813: def intersect(ring) 2814: s = SolvableIdeal.new(@pset); 2815: nn = s.intersect(ring.ring); 2816: return SolvableIdeal.new(@ring,"",nn.getList()); 2817: end
Test if this is a left Groebner base.
# File examples/jas.rb, line 2748 2748: def isLeftGB() 2749: s = @pset; 2750: ff = s.list; 2751: t = System.currentTimeMillis(); 2752: b = SolvableGroebnerBaseSeq.new().isLeftGB(ff); 2753: t = System.currentTimeMillis() - t; 2754: puts "isLeftGB executed in #{t} ms\n"; 2755: return b; 2756: end
Test if this is a right Groebner base.
# File examples/jas.rb, line 2800 2800: def isRightGB() 2801: s = @pset; 2802: ff = s.list; 2803: t = System.currentTimeMillis(); 2804: b = SolvableGroebnerBaseSeq.new().isRightGB(ff); 2805: t = System.currentTimeMillis() - t; 2806: puts "isRightGB executed in #{t} ms\n"; 2807: return b; 2808: end
Test if this is a two-sided Groebner base.
# File examples/jas.rb, line 2774 2774: def isTwosidedGB() 2775: s = @pset; 2776: ff = s.list; 2777: t = System.currentTimeMillis(); 2778: b = SolvableGroebnerBaseSeq.new().isTwosidedGB(ff); 2779: t = System.currentTimeMillis() - t; 2780: puts "isTwosidedGB executed in #{t} ms\n"; 2781: return b; 2782: end
Compute a left Groebner base.
# File examples/jas.rb, line 2735 2735: def leftGB() 2736: s = @pset; 2737: ff = s.list; 2738: t = System.currentTimeMillis(); 2739: gg = SolvableGroebnerBaseSeq.new().leftGB(ff); 2740: t = System.currentTimeMillis() - t; 2741: puts "executed leftGB in #{t} ms\n"; 2742: return SolvableIdeal.new(@ring,"",gg); 2743: end
Compute a left Groebner base in parallel.
# File examples/jas.rb, line 2832 2832: def parLeftGB(th) 2833: s = @pset; 2834: ff = s.list; 2835: bbpar = SolvableGroebnerBaseParallel.new(th); 2836: t = System.currentTimeMillis(); 2837: gg = bbpar.leftGB(ff); 2838: t = System.currentTimeMillis() - t; 2839: bbpar.terminate(); 2840: puts "parallel #{th} leftGB executed in #{t} ms\n"; 2841: return SolvableIdeal.new(@ring,"",gg); 2842: end
Compute a two-sided Groebner base in parallel.
# File examples/jas.rb, line 2847 2847: def parTwosidedGB(th) 2848: s = @pset; 2849: ff = s.list; 2850: bbpar = SolvableGroebnerBaseParallel.new(th); 2851: t = System.currentTimeMillis(); 2852: gg = bbpar.twosidedGB(ff); 2853: t = System.currentTimeMillis() - t; 2854: bbpar.terminate(); 2855: puts "parallel #{th} twosidedGB executed in #{t} ms\n"; 2856: return SolvableIdeal.new(@ring,"",gg); 2857: end
Compute a right Groebner base.
# File examples/jas.rb, line 2787 2787: def rightGB() 2788: s = @pset; 2789: ff = s.list; 2790: t = System.currentTimeMillis(); 2791: gg = SolvableGroebnerBaseSeq.new().rightGB(ff); 2792: t = System.currentTimeMillis() - t; 2793: puts "executed rightGB in #{t} ms\n"; 2794: return SolvableIdeal.new(@ring,"",gg); 2795: end
Create a string representation.
# File examples/jas.rb, line 2728 2728: def to_s() 2729: return @pset.toScript(); 2730: end
Compute a two-sided Groebner base.
# File examples/jas.rb, line 2761 2761: def twosidedGB() 2762: s = @pset; 2763: ff = s.list; 2764: t = System.currentTimeMillis(); 2765: gg = SolvableGroebnerBaseSeq.new().twosidedGB(ff); 2766: t = System.currentTimeMillis() - t; 2767: puts "executed twosidedGB in #{t} ms\n"; 2768: return SolvableIdeal.new(@ring,"",gg); 2769: end