class JAS::SolvableModule
Represents a JAS module over a solvable polynomial ring.
Method to create solvable sub-modules.
Attributes
cols[R]
the Java polynomial ring, number of columns, module list
mset[R]
the Java polynomial ring, number of columns, module list
ring[R]
the Java polynomial ring, number of columns, module list
Public Class Methods
new(modstr="",ring=nil,cols=0)
click to toggle source
Solvable module constructor.
# File examples/jas.rb 4647 def initialize(modstr="",ring=nil,cols=0) 4648 if ring == nil 4649 sr = StringReader.new( modstr ); 4650 tok = RingFactoryTokenizer.new(sr); 4651 pfac = tok.nextSolvablePolynomialRing(); 4652 #tok = GenPolynomialTokenizer.new(sr); 4653 #@mset = tok.nextSolvableSubModuleSet(); 4654 #if @mset.cols >= 0 4655 # @cols = @mset.cols; 4656 #end 4657 @ring = pfac; 4658 else 4659 if ring.is_a? Ring 4660 @ring = ring.ring 4661 else 4662 @ring = ring; 4663 end 4664 end 4665 @mset = ModuleList.new(@ring,nil); 4666 if cols < 0 4667 cols = 0; 4668 end 4669 @cols = cols; 4670 end
Public Instance Methods
element(mods)
click to toggle source
Create an element from a string.
# File examples/jas.rb 4689 def element(mods) 4690 if not mods.is_a? String 4691 begin 4692 if @ring == mods.ring 4693 return RingElem.new(mods); 4694 end 4695 rescue => e 4696 # pass 4697 end 4698 mods = str(mods); 4699 end 4700 ii = SolvableSubModule.new( "( " + mods + " )"); 4701 list = ii.mset.list; 4702 if list.size > 0 4703 return RingElem.new( list[0] ); 4704 end 4705 end
submodul(modstr="",list=nil)
click to toggle source
Create a solvable sub-module.
# File examples/jas.rb 4682 def submodul(modstr="",list=nil) 4683 return SolvableSubModule.new(self,modstr,list); 4684 end
to_s()
click to toggle source
Create a string representation.
# File examples/jas.rb 4675 def to_s() 4676 return @mset.toScript(); 4677 end