"Fossies" - the Fresh Open Source Software Archive

Member "doc/jruby/JAS/SolvPolyRing.html" (21 Apr 2019, 33633 Bytes) of package /linux/privat/jas-2.6.5988-doc.zip:


The requested HTML page contains a <FORM> tag that is unusable on "Fossies" in "automatic" (rendered) mode so that page is shown as HTML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 <!DOCTYPE html>
    2 
    3 <html>
    4 <head>
    5 <meta charset="UTF-8">
    6 
    7 <title>class JAS::SolvPolyRing - Ruby to JAS</title>
    8 
    9 <script type="text/javascript">
   10   var rdoc_rel_prefix = "../";
   11 </script>
   12 
   13 <script src="../js/jquery.js"></script>
   14 <script src="../js/darkfish.js"></script>
   15 
   16 <link href="../css/fonts.css" rel="stylesheet">
   17 <link href="../css/rdoc.css" rel="stylesheet">
   18 
   19 
   20 
   21 <body id="top" role="document" class="class">
   22 <nav role="navigation">
   23   <div id="project-navigation">
   24     <div id="home-section" role="region" title="Quick navigation" class="nav-section">
   25   <h2>
   26     <a href="../index.html" rel="home">Home</a>
   27   </h2>
   28 
   29   <div id="table-of-contents-navigation">
   30     <a href="../table_of_contents.html#pages">Pages</a>
   31     <a href="../table_of_contents.html#classes">Classes</a>
   32     <a href="../table_of_contents.html#methods">Methods</a>
   33   </div>
   34 </div>
   35 
   36     <div id="search-section" role="search" class="project-section initially-hidden">
   37   <form action="#" method="get" accept-charset="utf-8">
   38     <div id="search-field-wrapper">
   39       <input id="search-field" role="combobox" aria-label="Search"
   40              aria-autocomplete="list" aria-controls="search-results"
   41              type="text" name="search" placeholder="Search" spellcheck="false"
   42              title="Type to search, Up and Down to navigate, Enter to load">
   43     </div>
   44 
   45     <ul id="search-results" aria-label="Search Results"
   46         aria-busy="false" aria-expanded="false"
   47         aria-atomic="false" class="initially-hidden"></ul>
   48   </form>
   49 </div>
   50 
   51   </div>
   52 
   53   
   54 
   55   <div id="class-metadata">
   56     
   57     <div id="parent-class-section" class="nav-section">
   58   <h3>Parent</h3>
   59 
   60   
   61   <p class="link"><a href="SolvableRing.html">JAS::SolvableRing</a>
   62   
   63 </div>
   64 
   65     
   66     
   67     <!-- Method Quickref -->
   68 <div id="method-list-section" class="nav-section">
   69   <h3>Methods</h3>
   70 
   71   <ul class="link-list" role="directory">
   72     
   73     <li class="calls-super" ><a href="#method-c-new">::new</a>
   74     
   75     <li ><a href="#method-i-to_s">#to_s</a>
   76     
   77   </ul>
   78 </div>
   79 
   80   </div>
   81 </nav>
   82 
   83 <main role="main" aria-labelledby="class-JAS::SolvPolyRing">
   84   <h1 id="class-JAS::SolvPolyRing" class="class">
   85     class JAS::SolvPolyRing
   86   </h1>
   87 
   88   <section class="description">
   89     
   90 <p>Represents a <a href="../JAS.html">JAS</a> solvable polynomial ring:
   91 GenSolvablePolynomialRing.</p>
   92 
   93 <p>Provides more convenient constructor.  Then returns a <a
   94 href="Ring.html">Ring</a>.</p>
   95 
   96   </section>
   97 
   98   
   99   
  100   
  101   <section id="5Buntitled-5D" class="documentation-section">
  102     
  103 
  104     
  105 
  106     
  107 
  108     
  109     <section class="attribute-method-details" class="method-section">
  110       <header>
  111         <h3>Attributes</h3>
  112       </header>
  113 
  114       
  115       <div id="attribute-c-auto_inject" class="method-detail">
  116         <div class="method-heading attribute-method-heading">
  117           <span class="method-name">auto_inject</span><span
  118             class="attribute-access-type">[RW]</span>
  119         </div>
  120 
  121         <div class="method-description">
  122         
  123         <p>inject variables into environment</p>
  124         
  125         </div>
  126       </div>
  127       
  128       <div id="attribute-c-auto_lowervar" class="method-detail">
  129         <div class="method-heading attribute-method-heading">
  130           <span class="method-name">auto_lowervar</span><span
  131             class="attribute-access-type">[RW]</span>
  132         </div>
  133 
  134         <div class="method-description">
  135         
  136         <p>avoid capital letter variables</p>
  137         
  138         </div>
  139       </div>
  140       
  141     </section>
  142     
  143 
  144     
  145      <section id="public-class-5Buntitled-5D-method-details" class="method-section">
  146        <header>
  147          <h3>Public Class Methods</h3>
  148        </header>
  149 
  150     
  151       <div id="method-c-new" class="method-detail ">
  152         
  153         <div class="method-heading">
  154           <span class="method-name">new</span><span
  155             class="method-args">(coeff,vars,order,rel=[])</span>
  156           
  157           <span class="method-click-advice">click to toggle source</span>
  158           
  159         </div>
  160         
  161 
  162         <div class="method-description">
  163           
  164           <p><a href="Ring.html">Ring</a> constructor.</p>
  165 
  166 <p>coeff = factory for coefficients, vars = string with variable names, order
  167 = term order, rel = triple list of relations. (e,f,p,…) with e * f = p as
  168 relation.</p>
  169           
  170           
  171             <div class="method-calls-super">
  172               Calls superclass method
  173               <a href="SolvableRing.html#method-c-new">JAS::SolvableRing.new</a>
  174             </div>
  175           
  176 
  177           
  178           <div class="method-source-code" id="new-source">
  179             <pre><span class="ruby-comment"># File examples/jas.rb, line 3784</span>
  180 <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">coeff</span>,<span class="ruby-identifier">vars</span>,<span class="ruby-identifier">order</span>,<span class="ruby-identifier">rel</span>=[])
  181     <span class="ruby-keyword">if</span> <span class="ruby-identifier">coeff</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">nil</span>
  182         <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">&quot;No coefficient given.&quot;</span>
  183     <span class="ruby-keyword">end</span>
  184     <span class="ruby-identifier">cf</span> = <span class="ruby-identifier">coeff</span>;
  185     <span class="ruby-keyword">if</span> <span class="ruby-identifier">coeff</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
  186         <span class="ruby-identifier">cf</span> = <span class="ruby-identifier">coeff</span>.<span class="ruby-identifier">elem</span>.<span class="ruby-identifier">factory</span>();
  187     <span class="ruby-keyword">end</span>
  188     <span class="ruby-keyword">if</span> <span class="ruby-identifier">coeff</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Ring</span>
  189         <span class="ruby-identifier">cf</span> = <span class="ruby-identifier">coeff</span>.<span class="ruby-identifier">ring</span>;
  190     <span class="ruby-keyword">end</span>
  191     <span class="ruby-keyword">if</span> <span class="ruby-identifier">vars</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">nil</span>
  192         <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">&quot;No variable names given.&quot;</span>
  193     <span class="ruby-keyword">end</span>
  194     <span class="ruby-identifier">names</span> = <span class="ruby-identifier">vars</span>;
  195     <span class="ruby-keyword">if</span> <span class="ruby-identifier">vars</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">String</span>
  196         <span class="ruby-identifier">names</span> = <span class="ruby-constant">GenPolynomialTokenizer</span>.<span class="ruby-identifier">variableList</span>(<span class="ruby-identifier">vars</span>);
  197     <span class="ruby-keyword">end</span>
  198     <span class="ruby-identifier">nv</span> = <span class="ruby-identifier">names</span>.<span class="ruby-identifier">size</span>;
  199     <span class="ruby-comment">#to = PolyRing.lex;</span>
  200     <span class="ruby-identifier">to</span> = <span class="ruby-constant">PolyRing</span>.<span class="ruby-identifier">grad</span>;
  201     <span class="ruby-keyword">if</span> <span class="ruby-identifier">order</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">TermOrder</span>
  202         <span class="ruby-identifier">to</span> = <span class="ruby-identifier">order</span>;
  203     <span class="ruby-keyword">end</span>
  204     <span class="ruby-keyword">if</span> <span class="ruby-identifier">order</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span> <span class="ruby-comment"># ruby has no keyword params</span>
  205         <span class="ruby-identifier">rel</span> = <span class="ruby-identifier">order</span>;
  206     <span class="ruby-keyword">end</span>
  207     <span class="ruby-identifier">ll</span> = [];
  208     <span class="ruby-keyword">for</span> <span class="ruby-identifier">x</span> <span class="ruby-keyword">in</span> <span class="ruby-identifier">rel</span>
  209         <span class="ruby-keyword">if</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
  210            <span class="ruby-identifier">x</span> = <span class="ruby-identifier">x</span>.<span class="ruby-identifier">elem</span>;
  211         <span class="ruby-keyword">end</span>
  212         <span class="ruby-identifier">ll</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">x</span>;
  213     <span class="ruby-keyword">end</span>
  214     <span class="ruby-identifier">constSolv</span> = <span class="ruby-keyword">false</span>;
  215     (<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-identifier">ll</span>.<span class="ruby-identifier">size</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>).<span class="ruby-identifier">step</span>(<span class="ruby-value">3</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
  216         <span class="ruby-comment">#puts &quot;ll[i+1] = #{ll[i+1]}&quot;</span>
  217         <span class="ruby-keyword">if</span> <span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>].<span class="ruby-identifier">isConstant</span>()
  218            <span class="ruby-identifier">constSolv</span> = <span class="ruby-keyword">true</span>;
  219         <span class="ruby-keyword">end</span>
  220     }
  221     <span class="ruby-comment">#puts &quot;constSolv = #{constSolv}&quot;</span>
  222     <span class="ruby-identifier">cfs</span> = <span class="ruby-identifier">cf</span>.<span class="ruby-identifier">toScript</span>();
  223     <span class="ruby-keyword">if</span> <span class="ruby-identifier">cfs</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;0&quot;</span>
  224        <span class="ruby-identifier">cfs</span> = <span class="ruby-identifier">cf</span>.<span class="ruby-identifier">toScriptFactory</span>();
  225     <span class="ruby-keyword">end</span>
  226     <span class="ruby-comment">#puts &quot;cf = #{cfs}&quot;</span>
  227     <span class="ruby-identifier">recSolv</span> = <span class="ruby-identifier">cf</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">GenPolynomialRing</span>
  228     <span class="ruby-identifier">recSolvWord</span> = <span class="ruby-identifier">cf</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">GenWordPolynomialRing</span>
  229     <span class="ruby-identifier">resWord</span> = <span class="ruby-identifier">cf</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">WordResidueRing</span>
  230     <span class="ruby-identifier">quotSolv</span> = <span class="ruby-identifier">cf</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">SolvableQuotientRing</span>
  231     <span class="ruby-identifier">resSolv</span> = <span class="ruby-identifier">cf</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">SolvableResidueRing</span>
  232     <span class="ruby-identifier">locSolv</span> = <span class="ruby-identifier">cf</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">SolvableLocalRing</span>
  233     <span class="ruby-identifier">locresSolv</span> = <span class="ruby-identifier">cf</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">SolvableLocalResidueRing</span>
  234     <span class="ruby-keyword">if</span> <span class="ruby-identifier">recSolv</span> <span class="ruby-keyword">and</span> <span class="ruby-keyword">not</span> <span class="ruby-identifier">constSolv</span>
  235        <span class="ruby-identifier">recSolv</span> = <span class="ruby-keyword">false</span>;
  236     <span class="ruby-keyword">end</span>
  237     <span class="ruby-comment">#puts &quot;cf = &quot; + cf.getClass().to_s + &quot;, quotSolv = &quot; + quotSolv.to_s + &quot;, recSolv = &quot; + recSolv.to_s;</span>
  238     <span class="ruby-keyword">if</span> <span class="ruby-identifier">recSolv</span>
  239        <span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;RecSolvablePolynomialRing: &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">cfs</span>;
  240        <span class="ruby-identifier">ring</span> = <span class="ruby-constant">RecSolvablePolynomialRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">cf</span>,<span class="ruby-identifier">nv</span>,<span class="ruby-identifier">to</span>,<span class="ruby-identifier">names</span>);
  241        <span class="ruby-identifier">table</span> = <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">table</span>;
  242        <span class="ruby-identifier">coeffTable</span> = <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">coeffTable</span>;
  243     <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">recSolvWord</span>
  244        <span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;RecSolvableWordPolynomialRing: &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">cfs</span>;
  245        <span class="ruby-identifier">ring</span> = <span class="ruby-constant">RecSolvableWordPolynomialRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">cf</span>,<span class="ruby-identifier">nv</span>,<span class="ruby-identifier">to</span>,<span class="ruby-identifier">names</span>);
  246        <span class="ruby-identifier">table</span> = <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">table</span>;
  247        <span class="ruby-identifier">coeffTable</span> = <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">coeffTable</span>;
  248     <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">resWord</span>
  249        <span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;ResWordSolvablePolynomialRing: &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">cfs</span>;
  250        <span class="ruby-comment">#ring = GenSolvablePolynomialRing.new(cf,nv,to,names);</span>
  251        <span class="ruby-comment">#ring = RecSolvableWordPolynomialRing.new(cf,nv,to,names);</span>
  252        <span class="ruby-comment">#ring = QLRSolvablePolynomialRing.new(cf,nv,to,names);</span>
  253        <span class="ruby-identifier">ring</span> = <span class="ruby-constant">ResidueSolvableWordPolynomialRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">cf</span>,<span class="ruby-identifier">nv</span>,<span class="ruby-identifier">to</span>,<span class="ruby-identifier">names</span>);
  254        <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;ring = #{ring.toScript()}&quot;</span>;
  255        <span class="ruby-identifier">table</span> = <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">table</span>;
  256        <span class="ruby-identifier">coeffTable</span> = <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">polCoeff</span>.<span class="ruby-identifier">coeffTable</span>;
  257     <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">resSolv</span>
  258        <span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;ResidueSolvablePolynomialRing: &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">cfs</span>;
  259        <span class="ruby-comment">#ring = ResidueSolvablePolynomialRing.new(cf,nv,to,names);</span>
  260        <span class="ruby-identifier">ring</span> = <span class="ruby-constant">QLRSolvablePolynomialRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">cf</span>,<span class="ruby-identifier">nv</span>,<span class="ruby-identifier">to</span>,<span class="ruby-identifier">names</span>);
  261        <span class="ruby-identifier">table</span> = <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">table</span>;
  262        <span class="ruby-identifier">coeffTable</span> = <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">polCoeff</span>.<span class="ruby-identifier">coeffTable</span>;
  263     <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">quotSolv</span>
  264        <span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;QuotSolvablePolynomialRing: &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">cfs</span>;
  265        <span class="ruby-comment">#ring = QuotSolvablePolynomialRing.new(cf,nv,to,names);</span>
  266        <span class="ruby-identifier">ring</span> = <span class="ruby-constant">QLRSolvablePolynomialRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">cf</span>,<span class="ruby-identifier">nv</span>,<span class="ruby-identifier">to</span>,<span class="ruby-identifier">names</span>);
  267        <span class="ruby-identifier">table</span> = <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">table</span>;
  268        <span class="ruby-identifier">coeffTable</span> = <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">polCoeff</span>.<span class="ruby-identifier">coeffTable</span>;
  269     <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">locSolv</span>
  270        <span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;LocalSolvablePolynomialRing: &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">cfs</span>;
  271        <span class="ruby-comment">#ring = LocalSolvablePolynomialRing.new(cf,nv,to,names);</span>
  272        <span class="ruby-identifier">ring</span> = <span class="ruby-constant">QLRSolvablePolynomialRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">cf</span>,<span class="ruby-identifier">nv</span>,<span class="ruby-identifier">to</span>,<span class="ruby-identifier">names</span>);
  273        <span class="ruby-identifier">table</span> = <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">table</span>;
  274        <span class="ruby-identifier">coeffTable</span> = <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">polCoeff</span>.<span class="ruby-identifier">coeffTable</span>;
  275     <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">locresSolv</span>
  276        <span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;QLRSolvablePolynomialRing: &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">cfs</span>;
  277        <span class="ruby-identifier">ring</span> = <span class="ruby-constant">QLRSolvablePolynomialRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">cf</span>,<span class="ruby-identifier">nv</span>,<span class="ruby-identifier">to</span>,<span class="ruby-identifier">names</span>);
  278        <span class="ruby-identifier">table</span> = <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">table</span>;
  279        <span class="ruby-identifier">coeffTable</span> = <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">polCoeff</span>.<span class="ruby-identifier">coeffTable</span>;
  280     <span class="ruby-keyword">else</span>
  281        <span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;GenSolvablePolynomialRing: &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">cfs</span>;
  282        <span class="ruby-identifier">ring</span> = <span class="ruby-constant">GenSolvablePolynomialRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">cf</span>,<span class="ruby-identifier">nv</span>,<span class="ruby-identifier">to</span>,<span class="ruby-identifier">names</span>);
  283        <span class="ruby-identifier">table</span> = <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">table</span>;
  284        <span class="ruby-identifier">coeffTable</span> = <span class="ruby-identifier">table</span>;
  285     <span class="ruby-keyword">end</span>
  286     <span class="ruby-comment">#puts &quot;ll = &quot; + str(ll);</span>
  287     (<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-identifier">ll</span>.<span class="ruby-identifier">size</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>).<span class="ruby-identifier">step</span>(<span class="ruby-value">3</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
  288         <span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;adding relation: &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">str</span>(<span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span>]) <span class="ruby-operator">+</span> <span class="ruby-string">&quot; * &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">str</span>(<span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>]) <span class="ruby-operator">+</span> <span class="ruby-string">&quot; = &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">str</span>(<span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">2</span>]);
  289         <span class="ruby-keyword">if</span> <span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>].<span class="ruby-identifier">isConstant</span>() 
  290            <span class="ruby-keyword">if</span> <span class="ruby-identifier">recSolv</span>
  291               <span class="ruby-comment">#puts &quot;r coeff type &quot; + str(ll[i].class);</span>
  292               <span class="ruby-comment">#coeffTable.update( ll[i], ll[i+1].leadingBaseCoefficient(), ll[i+2] );</span>
  293               <span class="ruby-identifier">coeffTable</span>.<span class="ruby-identifier">update</span>( <span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span>], <span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>], <span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">2</span>] );
  294            <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">recSolvWord</span>
  295               <span class="ruby-comment">#puts &quot;rw coeff type &quot; + str(ll[i].class);</span>
  296               <span class="ruby-identifier">coeffTable</span>.<span class="ruby-identifier">update</span>( <span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span>], <span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>], <span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">2</span>] );
  297            <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">resWord</span>
  298               <span class="ruby-comment">#puts &quot;rw coeff type &quot; + str(ll[i].class);</span>
  299               <span class="ruby-identifier">coeffTable</span>.<span class="ruby-identifier">update</span>( <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">toPolyCoefficients</span>(<span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span>]),
  300                                  <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">toPolyCoefficients</span>(<span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>]), 
  301                                  <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">toPolyCoefficients</span>(<span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">2</span>]) );
  302            <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">resSolv</span>
  303               <span class="ruby-comment">#puts &quot;ri coeff type &quot; + str(ll[i].class);</span>
  304               <span class="ruby-identifier">coeffTable</span>.<span class="ruby-identifier">update</span>( <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">toPolyCoefficients</span>(<span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span>]),
  305                                  <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">toPolyCoefficients</span>(<span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>]), 
  306                                  <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">toPolyCoefficients</span>(<span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">2</span>]) );
  307             <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">quotSolv</span>
  308               <span class="ruby-comment">#puts &quot;q coeff type &quot; + str(ll[i].class);</span>
  309               <span class="ruby-identifier">coeffTable</span>.<span class="ruby-identifier">update</span>( <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">toPolyCoefficients</span>(<span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span>]), 
  310                                  <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">toPolyCoefficients</span>(<span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>]), 
  311                                  <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">toPolyCoefficients</span>(<span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">2</span>]) );
  312             <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">locSolv</span>
  313               <span class="ruby-comment">#puts &quot;l coeff type &quot; + str(ll[i].class);</span>
  314               <span class="ruby-identifier">coeffTable</span>.<span class="ruby-identifier">update</span>( <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">toPolyCoefficients</span>(<span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span>]),
  315                                  <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">toPolyCoefficients</span>(<span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>]), 
  316                                  <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">toPolyCoefficients</span>(<span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">2</span>]) );
  317             <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">locresSolv</span>
  318               <span class="ruby-comment">#puts &quot;lr coeff type &quot; + str(ll[i].class);</span>
  319               <span class="ruby-identifier">coeffTable</span>.<span class="ruby-identifier">update</span>( <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">toPolyCoefficients</span>(<span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span>]),
  320                                  <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">toPolyCoefficients</span>(<span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>]), 
  321                                  <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">toPolyCoefficients</span>(<span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">2</span>]) );
  322             <span class="ruby-keyword">end</span>
  323         <span class="ruby-keyword">else</span> <span class="ruby-comment"># no coeff relation</span>
  324             <span class="ruby-comment">#puts &quot;ll[i], ll[i+1], ll[i+2]: &quot; + str(ll[i]) + &quot;, &quot; + str(ll[i+1]) + &quot;, &quot; + str(ll[i+2]);</span>
  325             <span class="ruby-comment">#puts &quot;poly type &quot; + str(ll[i].class);</span>
  326             <span class="ruby-identifier">table</span>.<span class="ruby-identifier">update</span>( <span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span>], <span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>], <span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">2</span>] );
  327             <span class="ruby-keyword">if</span> <span class="ruby-identifier">locresSolv</span> <span class="ruby-keyword">or</span> <span class="ruby-identifier">locSolv</span> <span class="ruby-keyword">or</span> <span class="ruby-identifier">quotSolv</span> <span class="ruby-keyword">or</span> <span class="ruby-identifier">resSolv</span> <span class="ruby-keyword">or</span> <span class="ruby-identifier">resWord</span>
  328                <span class="ruby-comment">#puts &quot;ring.polCoeff.table &quot; + str(ring.polCoeff.table.toScript());</span>
  329                <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">polCoeff</span>.<span class="ruby-identifier">table</span>.<span class="ruby-identifier">update</span>( <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">toPolyCoefficients</span>(<span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span>]),
  330                                            <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">toPolyCoefficients</span>(<span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>]), 
  331                                            <span class="ruby-identifier">ring</span>.<span class="ruby-identifier">toPolyCoefficients</span>(<span class="ruby-identifier">ll</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">2</span>]) );
  332             <span class="ruby-keyword">end</span>
  333         <span class="ruby-keyword">end</span>
  334     }
  335     <span class="ruby-comment">#puts &quot;ring &quot; + ring.toScript();</span>
  336     <span class="ruby-comment">#puts &quot;isAssoc &quot; + str(ring.isAssociative());</span>
  337     <span class="ruby-ivar">@ring</span> = <span class="ruby-identifier">ring</span>;
  338     <span class="ruby-comment">#puts &quot;SolvPolyRing to super()&quot;;</span>
  339     <span class="ruby-keyword">super</span>(<span class="ruby-string">&quot;&quot;</span>,<span class="ruby-ivar">@ring</span>) 
  340     <span class="ruby-comment"># puts &quot;ai = &quot; +  self.class.auto_inject.to_s</span>
  341     <span class="ruby-comment"># done in super():</span>
  342     <span class="ruby-comment">#if self.class.auto_inject or self.class.superclass.auto_inject</span>
  343     <span class="ruby-comment">#   inject_variables();</span>
  344     <span class="ruby-comment">#end</span>
  345 <span class="ruby-keyword">end</span></pre>
  346           </div>
  347           
  348         </div>
  349 
  350         
  351 
  352         
  353       </div>
  354 
  355     
  356     </section>
  357   
  358      <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
  359        <header>
  360          <h3>Public Instance Methods</h3>
  361        </header>
  362 
  363     
  364       <div id="method-i-to_s" class="method-detail ">
  365         
  366         <div class="method-heading">
  367           <span class="method-name">to_s</span><span
  368             class="method-args">()</span>
  369           
  370           <span class="method-click-advice">click to toggle source</span>
  371           
  372         </div>
  373         
  374 
  375         <div class="method-description">
  376           
  377           <p>Create a string representation.</p>
  378           
  379           
  380 
  381           
  382           <div class="method-source-code" id="to_s-source">
  383             <pre><span class="ruby-comment"># File examples/jas.rb, line 3954</span>
  384 <span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>()
  385     <span class="ruby-keyword">return</span> <span class="ruby-ivar">@ring</span>.<span class="ruby-identifier">toScript</span>();
  386 <span class="ruby-keyword">end</span></pre>
  387           </div>
  388           
  389         </div>
  390 
  391         
  392 
  393         
  394       </div>
  395 
  396     
  397     </section>
  398   
  399   </section>
  400 </main>
  401 
  402 
  403 <footer id="validator-badges" role="contentinfo">
  404   <p><a href="http://validator.w3.org/check/referer">Validate</a>
  405   <p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
  406   <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
  407 </footer>
  408