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 5026 def initialize(modstr="",ring=nil,cols=0) 5027 if ring == nil 5028 sr = StringReader.new( modstr ); 5029 tok = RingFactoryTokenizer.new(sr); 5030 pfac = tok.nextSolvablePolynomialRing(); 5031 #tok = GenPolynomialTokenizer.new(sr); 5032 #@mset = tok.nextSolvableSubModuleSet(); 5033 #if @mset.cols >= 0 5034 # @cols = @mset.cols; 5035 #end 5036 @ring = pfac; 5037 else 5038 if ring.is_a? Ring 5039 @ring = ring.ring 5040 else 5041 @ring = ring; 5042 end 5043 end 5044 @mset = ModuleList.new(@ring,nil); 5045 if cols < 0 5046 cols = 0; 5047 end 5048 @cols = cols; 5049 end
Public Instance Methods
element(mods)
click to toggle source
Create an element from a string.
# File examples/jas.rb 5068 def element(mods) 5069 if not mods.is_a? String 5070 begin 5071 if @ring == mods.ring 5072 return RingElem.new(mods); 5073 end 5074 rescue => e 5075 # pass 5076 end 5077 mods = str(mods); 5078 end 5079 ii = SolvableSubModule.new( "( " + mods + " )"); 5080 list = ii.mset.list; 5081 if list.size > 0 5082 return RingElem.new( list[0] ); 5083 end 5084 end
submodul(modstr="",list=nil)
click to toggle source
Create a solvable sub-module.
# File examples/jas.rb 5061 def submodul(modstr="",list=nil) 5062 return SolvableSubModule.new(self,modstr,list); 5063 end
to_s()
click to toggle source
Create a string representation.
# File examples/jas.rb 5054 def to_s() 5055 return @mset.toScript(); 5056 end