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, line 4594 def initialize(modstr="",ring=nil,cols=0) if ring == nil sr = StringReader.new( modstr ); tok = RingFactoryTokenizer.new(sr); pfac = tok.nextSolvablePolynomialRing(); #tok = GenPolynomialTokenizer.new(sr); #@mset = tok.nextSolvableSubModuleSet(); #if @mset.cols >= 0 # @cols = @mset.cols; #end @ring = pfac; else if ring.is_a? Ring @ring = ring.ring else @ring = ring; end end @mset = ModuleList.new(@ring,nil); if cols < 0 cols = 0; end @cols = cols; end
Public Instance Methods
element(mods)
click to toggle source
Create an element from a string.
# File examples/jas.rb, line 4636 def element(mods) if not mods.is_a? String begin if @ring == mods.ring return RingElem.new(mods); end rescue => e # pass end mods = str(mods); end ii = SolvableSubModule.new( "( " + mods + " )"); list = ii.mset.list; if list.size > 0 return RingElem.new( list[0] ); end end
submodul(modstr="",list=nil)
click to toggle source
Create a solvable sub-module.
# File examples/jas.rb, line 4629 def submodul(modstr="",list=nil) return SolvableSubModule.new(self,modstr,list); end
to_s()
click to toggle source
Create a string representation.
# File examples/jas.rb, line 4622 def to_s() return @mset.toScript(); end