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
4700 def initialize(modstr="",ring=nil,cols=0)
4701     if ring == nil
4702        sr = StringReader.new( modstr );
4703        tok = RingFactoryTokenizer.new(sr);
4704        pfac = tok.nextSolvablePolynomialRing();
4705        #tok = GenPolynomialTokenizer.new(sr);
4706        #@mset = tok.nextSolvableSubModuleSet();
4707        #if @mset.cols >= 0
4708        #    @cols = @mset.cols;
4709        #end
4710        @ring = pfac;
4711     else
4712        if ring.is_a? Ring
4713           @ring = ring.ring
4714        else 
4715           @ring = ring;
4716        end
4717     end
4718     @mset = ModuleList.new(@ring,nil);
4719     if cols < 0 
4720        cols = 0;
4721     end
4722     @cols = cols;
4723 end

Public Instance Methods

element(mods) click to toggle source

Create an element from a string.

     # File examples/jas.rb
4742 def element(mods)
4743     if not mods.is_a? String 
4744        begin
4745           if @ring == mods.ring 
4746              return RingElem.new(mods);
4747           end
4748        rescue => e
4749           # pass
4750        end
4751        mods = str(mods);
4752     end
4753     ii = SolvableSubModule.new( "( " + mods + " )");
4754     list = ii.mset.list;
4755     if list.size > 0
4756         return RingElem.new( list[0] );
4757     end
4758 end
submodul(modstr="",list=nil) click to toggle source

Create a solvable sub-module.

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

Create a string representation.

     # File examples/jas.rb
4728 def to_s()
4729     return @mset.toScript();
4730 end