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
4888 def initialize(modstr="",ring=nil,cols=0)
4889     if ring == nil
4890        sr = StringReader.new( modstr );
4891        tok = RingFactoryTokenizer.new(sr);
4892        pfac = tok.nextSolvablePolynomialRing();
4893        #tok = GenPolynomialTokenizer.new(sr);
4894        #@mset = tok.nextSolvableSubModuleSet();
4895        #if @mset.cols >= 0
4896        #    @cols = @mset.cols;
4897        #end
4898        @ring = pfac;
4899     else
4900        if ring.is_a? Ring
4901           @ring = ring.ring
4902        else 
4903           @ring = ring;
4904        end
4905     end
4906     @mset = ModuleList.new(@ring,nil);
4907     if cols < 0 
4908        cols = 0;
4909     end
4910     @cols = cols;
4911 end

Public Instance Methods

element(mods) click to toggle source

Create an element from a string.

     # File examples/jas.rb
4930 def element(mods)
4931     if not mods.is_a? String 
4932        begin
4933           if @ring == mods.ring 
4934              return RingElem.new(mods);
4935           end
4936        rescue => e
4937           # pass
4938        end
4939        mods = str(mods);
4940     end
4941     ii = SolvableSubModule.new( "( " + mods + " )");
4942     list = ii.mset.list;
4943     if list.size > 0
4944         return RingElem.new( list[0] );
4945     end
4946 end
submodul(modstr="",list=nil) click to toggle source

Create a solvable sub-module.

     # File examples/jas.rb
4923 def submodul(modstr="",list=nil)
4924     return SolvableSubModule.new(self,modstr,list);
4925 end
to_s() click to toggle source

Create a string representation.

     # File examples/jas.rb
4916 def to_s()
4917     return @mset.toScript();
4918 end