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
4864 def initialize(modstr="",ring=nil,cols=0)
4865     if ring == nil
4866        sr = StringReader.new( modstr );
4867        tok = RingFactoryTokenizer.new(sr);
4868        pfac = tok.nextSolvablePolynomialRing();
4869        #tok = GenPolynomialTokenizer.new(sr);
4870        #@mset = tok.nextSolvableSubModuleSet();
4871        #if @mset.cols >= 0
4872        #    @cols = @mset.cols;
4873        #end
4874        @ring = pfac;
4875     else
4876        if ring.is_a? Ring
4877           @ring = ring.ring
4878        else 
4879           @ring = ring;
4880        end
4881     end
4882     @mset = ModuleList.new(@ring,nil);
4883     if cols < 0 
4884        cols = 0;
4885     end
4886     @cols = cols;
4887 end

Public Instance Methods

element(mods) click to toggle source

Create an element from a string.

     # File examples/jas.rb
4906 def element(mods)
4907     if not mods.is_a? String 
4908        begin
4909           if @ring == mods.ring 
4910              return RingElem.new(mods);
4911           end
4912        rescue => e
4913           # pass
4914        end
4915        mods = str(mods);
4916     end
4917     ii = SolvableSubModule.new( "( " + mods + " )");
4918     list = ii.mset.list;
4919     if list.size > 0
4920         return RingElem.new( list[0] );
4921     end
4922 end
submodul(modstr="",list=nil) click to toggle source

Create a solvable sub-module.

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

Create a string representation.

     # File examples/jas.rb
4892 def to_s()
4893     return @mset.toScript();
4894 end