"Fossies" - the Fresh Open Source Software Archive

Member "doc/jruby/JAS.html" (21 Apr 2019, 159697 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>module JAS - 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="module">
   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     
   58     
   59     
   60     <!-- Method Quickref -->
   61 <div id="method-list-section" class="nav-section">
   62   <h3>Methods</h3>
   63 
   64   <ul class="link-list" role="directory">
   65     
   66     <li ><a href="#method-i-AN">#AN</a>
   67     
   68     <li ><a href="#method-i-CC">#CC</a>
   69     
   70     <li ><a href="#method-i-CR">#CR</a>
   71     
   72     <li ><a href="#method-i-DD">#DD</a>
   73     
   74     <li ><a href="#method-i-FF">#FF</a>
   75     
   76     <li ><a href="#method-i-GF">#GF</a>
   77     
   78     <li ><a href="#method-i-GFI">#GFI</a>
   79     
   80     <li ><a href="#method-i-GFL">#GFL</a>
   81     
   82     <li ><a href="#method-i-LC">#LC</a>
   83     
   84     <li ><a href="#method-i-MPS">#MPS</a>
   85     
   86     <li ><a href="#method-i-Mat">#Mat</a>
   87     
   88     <li ><a href="#method-i-Oct">#Oct</a>
   89     
   90     <li ><a href="#method-i-PS">#PS</a>
   91     
   92     <li ><a href="#method-i-QQ">#QQ</a>
   93     
   94     <li ><a href="#method-i-Quat">#Quat</a>
   95     
   96     <li ><a href="#method-i-RC">#RC</a>
   97     
   98     <li ><a href="#method-i-RF">#RF</a>
   99     
  100     <li ><a href="#method-i-RR">#RR</a>
  101     
  102     <li ><a href="#method-i-RealN">#RealN</a>
  103     
  104     <li ><a href="#method-i-SLC">#SLC</a>
  105     
  106     <li ><a href="#method-i-SLR">#SLR</a>
  107     
  108     <li ><a href="#method-i-SRC">#SRC</a>
  109     
  110     <li ><a href="#method-i-SRF">#SRF</a>
  111     
  112     <li ><a href="#method-i-Vec">#Vec</a>
  113     
  114     <li ><a href="#method-i-WRC">#WRC</a>
  115     
  116     <li ><a href="#method-i-ZM">#ZM</a>
  117     
  118     <li ><a href="#method-i-ZMI">#ZMI</a>
  119     
  120     <li ><a href="#method-i-ZML">#ZML</a>
  121     
  122     <li ><a href="#method-i-ZZ">#ZZ</a>
  123     
  124     <li ><a href="#method-i-inject_gens">#inject_gens</a>
  125     
  126     <li ><a href="#method-i-makeJasArith">#makeJasArith</a>
  127     
  128     <li ><a href="#method-i-nameFromValue">#nameFromValue</a>
  129     
  130     <li ><a href="#method-i-noThreads">#noThreads</a>
  131     
  132     <li ><a href="#method-i-rbarray2arraylist">#rbarray2arraylist</a>
  133     
  134     <li ><a href="#method-i-startLog">#startLog</a>
  135     
  136     <li ><a href="#method-i-str">#str</a>
  137     
  138     <li ><a href="#method-i-terminate">#terminate</a>
  139     
  140   </ul>
  141 </div>
  142 
  143   </div>
  144 </nav>
  145 
  146 <main role="main" aria-labelledby="module-JAS">
  147   <h1 id="module-JAS" class="module">
  148     module JAS
  149   </h1>
  150 
  151   <section class="description">
  152     
  153 <p>jruby interface to <a href="JAS.html">JAS</a>.</p>
  154 
  155   </section>
  156 
  157   
  158   
  159   
  160   <section id="5Buntitled-5D" class="documentation-section">
  161     
  162 
  163     
  164 
  165     
  166     <section class="constants-list">
  167       <header>
  168         <h3>Constants</h3>
  169       </header>
  170       <dl>
  171       
  172         <dt id="CC">CC
  173         
  174         <dd><p>complex big rational numbers</p>
  175         
  176       
  177         <dt id="CR">CR
  178         
  179         <dd><p>generic complex numbers</p>
  180         
  181       
  182         <dt id="DD">DD
  183         
  184         <dd><p>big decimal numbers</p>
  185         
  186       
  187         <dt id="QQ">QQ
  188         
  189         <dd><p>big rational numbers</p>
  190         
  191       
  192         <dt id="ZZ">ZZ
  193         
  194         <dd><p>define some shortcuts big integers</p>
  195         
  196       
  197       </dl>
  198     </section>
  199     
  200 
  201     
  202 
  203     
  204      <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
  205        <header>
  206          <h3>Public Instance Methods</h3>
  207        </header>
  208 
  209     
  210       <div id="method-i-AN" class="method-detail ">
  211         
  212         <div class="method-heading">
  213           <span class="method-name">AN</span><span
  214             class="method-args">(m,z=0,field=false,pr=nil)</span>
  215           
  216           <span class="method-click-advice">click to toggle source</span>
  217           
  218         </div>
  219         
  220 
  221         <div class="method-description">
  222           
  223           <p>Create <a href="JAS.html">JAS</a> AlgebraicNumber as ring element.</p>
  224           
  225           
  226 
  227           
  228           <div class="method-source-code" id="AN-source">
  229             <pre><span class="ruby-comment"># File examples/jas.rb, line 2116</span>
  230 <span class="ruby-keyword">def</span> <span class="ruby-constant">AN</span>(<span class="ruby-identifier">m</span>,<span class="ruby-identifier">z</span>=<span class="ruby-value">0</span>,<span class="ruby-identifier">field</span>=<span class="ruby-keyword">false</span>,<span class="ruby-identifier">pr</span>=<span class="ruby-keyword">nil</span>)
  231     <span class="ruby-keyword">if</span> <span class="ruby-identifier">m</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
  232         <span class="ruby-identifier">m</span> = <span class="ruby-identifier">m</span>.<span class="ruby-identifier">elem</span>;
  233     <span class="ruby-keyword">end</span>
  234     <span class="ruby-keyword">if</span> <span class="ruby-identifier">z</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
  235         <span class="ruby-identifier">z</span> = <span class="ruby-identifier">z</span>.<span class="ruby-identifier">elem</span>;
  236     <span class="ruby-keyword">end</span>
  237     <span class="ruby-keyword">if</span> <span class="ruby-identifier">z</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span> <span class="ruby-keyword">and</span> ( <span class="ruby-identifier">z</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">true</span> <span class="ruby-keyword">or</span> <span class="ruby-identifier">z</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">false</span> )
  238         <span class="ruby-identifier">field</span> = <span class="ruby-identifier">z</span>;
  239         <span class="ruby-identifier">z</span> = <span class="ruby-value">0</span>;
  240     <span class="ruby-keyword">end</span>
  241     <span class="ruby-comment">#puts &quot;m.getClass() = &quot; + str(m.getClass().getName());</span>
  242     <span class="ruby-comment">#puts &quot;field = &quot; + str(field);</span>
  243     <span class="ruby-keyword">if</span> <span class="ruby-identifier">m</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">AlgebraicNumber</span>
  244         <span class="ruby-identifier">mf</span> = <span class="ruby-constant">AlgebraicNumberRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">m</span>.<span class="ruby-identifier">factory</span>().<span class="ruby-identifier">modul</span>,<span class="ruby-identifier">m</span>.<span class="ruby-identifier">factory</span>().<span class="ruby-identifier">isField</span>());
  245     <span class="ruby-keyword">else</span>
  246         <span class="ruby-keyword">if</span> <span class="ruby-identifier">field</span>
  247             <span class="ruby-identifier">mf</span> = <span class="ruby-constant">AlgebraicNumberRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">m</span>,<span class="ruby-identifier">field</span>);
  248         <span class="ruby-keyword">else</span>
  249             <span class="ruby-identifier">mf</span> = <span class="ruby-constant">AlgebraicNumberRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">m</span>);
  250         <span class="ruby-keyword">end</span>
  251     <span class="ruby-keyword">end</span>
  252     <span class="ruby-comment">#puts &quot;mf = &quot; + mf.toString();</span>
  253     <span class="ruby-keyword">if</span> <span class="ruby-identifier">z</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
  254         <span class="ruby-identifier">r</span> = <span class="ruby-constant">AlgebraicNumber</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">mf</span>);
  255     <span class="ruby-keyword">else</span>
  256         <span class="ruby-identifier">r</span> = <span class="ruby-constant">AlgebraicNumber</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">mf</span>,<span class="ruby-identifier">z</span>);
  257     <span class="ruby-keyword">end</span>
  258     <span class="ruby-keyword">return</span> <span class="ruby-constant">RingElem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">r</span>);
  259 <span class="ruby-keyword">end</span></pre>
  260           </div>
  261           
  262         </div>
  263 
  264         
  265 
  266         
  267       </div>
  268 
  269     
  270       <div id="method-i-CC" class="method-detail ">
  271         
  272         <div class="method-heading">
  273           <span class="method-name">CC</span><span
  274             class="method-args">(re=BigRational.new(),im=BigRational.new())</span>
  275           
  276           <span class="method-click-advice">click to toggle source</span>
  277           
  278         </div>
  279         
  280 
  281         <div class="method-description">
  282           
  283           <p>Create <a href="JAS.html">JAS</a> BigComplex as ring element.</p>
  284           
  285           
  286 
  287           
  288           <div class="method-source-code" id="CC-source">
  289             <pre><span class="ruby-comment"># File examples/jas.rb, line 313</span>
  290 <span class="ruby-keyword">def</span> <span class="ruby-constant">CC</span>(<span class="ruby-identifier">re</span>=<span class="ruby-constant">BigRational</span>.<span class="ruby-identifier">new</span>(),<span class="ruby-identifier">im</span>=<span class="ruby-constant">BigRational</span>.<span class="ruby-identifier">new</span>())
  291     <span class="ruby-keyword">if</span> <span class="ruby-identifier">re</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
  292         <span class="ruby-identifier">re</span> = <span class="ruby-constant">BigRational</span>.<span class="ruby-identifier">new</span>();
  293     <span class="ruby-keyword">end</span>
  294     <span class="ruby-keyword">if</span> <span class="ruby-identifier">im</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
  295         <span class="ruby-identifier">im</span> = <span class="ruby-constant">BigRational</span>.<span class="ruby-identifier">new</span>();
  296     <span class="ruby-keyword">end</span>
  297     <span class="ruby-keyword">if</span> <span class="ruby-identifier">re</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span> 
  298         <span class="ruby-keyword">if</span> <span class="ruby-identifier">re</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span> 
  299             <span class="ruby-keyword">if</span> <span class="ruby-identifier">re</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>
  300                 <span class="ruby-identifier">im</span> = <span class="ruby-constant">QQ</span>( <span class="ruby-identifier">re</span>[<span class="ruby-value">1</span>] );
  301             <span class="ruby-keyword">end</span>
  302             <span class="ruby-identifier">re</span> = <span class="ruby-constant">QQ</span>( <span class="ruby-identifier">re</span>[<span class="ruby-value">0</span>] );
  303         <span class="ruby-keyword">else</span>
  304             <span class="ruby-identifier">re</span> = <span class="ruby-constant">QQ</span>(<span class="ruby-identifier">re</span>);
  305 <span class="ruby-comment">#        re = makeJasArith( re );</span>
  306         <span class="ruby-keyword">end</span>
  307     <span class="ruby-keyword">end</span>
  308     <span class="ruby-keyword">if</span> <span class="ruby-identifier">im</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span> 
  309         <span class="ruby-identifier">im</span> = <span class="ruby-constant">QQ</span>( <span class="ruby-identifier">im</span> );
  310 <span class="ruby-comment">#        im = makeJasArith( im );</span>
  311     <span class="ruby-keyword">end</span>
  312     <span class="ruby-keyword">if</span> <span class="ruby-identifier">re</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Numeric</span>
  313         <span class="ruby-identifier">re</span> = <span class="ruby-constant">QQ</span>(<span class="ruby-identifier">re</span>);
  314     <span class="ruby-keyword">end</span>
  315     <span class="ruby-keyword">if</span> <span class="ruby-identifier">im</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Numeric</span>
  316         <span class="ruby-identifier">im</span> = <span class="ruby-constant">QQ</span>(<span class="ruby-identifier">im</span>);
  317     <span class="ruby-keyword">end</span>
  318     <span class="ruby-keyword">if</span> <span class="ruby-identifier">re</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
  319         <span class="ruby-identifier">re</span> = <span class="ruby-identifier">re</span>.<span class="ruby-identifier">elem</span>;
  320     <span class="ruby-keyword">end</span>
  321     <span class="ruby-keyword">if</span> <span class="ruby-identifier">im</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
  322         <span class="ruby-identifier">im</span> = <span class="ruby-identifier">im</span>.<span class="ruby-identifier">elem</span>;
  323     <span class="ruby-keyword">end</span>
  324     <span class="ruby-keyword">if</span> <span class="ruby-identifier">im</span>.<span class="ruby-identifier">isZERO</span>()
  325         <span class="ruby-keyword">if</span> <span class="ruby-identifier">re</span>.<span class="ruby-identifier">isZERO</span>()
  326             <span class="ruby-identifier">c</span> = <span class="ruby-constant">BigComplex</span>.<span class="ruby-identifier">new</span>();
  327         <span class="ruby-keyword">else</span>
  328             <span class="ruby-identifier">c</span> = <span class="ruby-constant">BigComplex</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">re</span>);
  329         <span class="ruby-keyword">end</span>
  330     <span class="ruby-keyword">else</span>
  331         <span class="ruby-identifier">c</span> = <span class="ruby-constant">BigComplex</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">re</span>,<span class="ruby-identifier">im</span>);
  332     <span class="ruby-keyword">end</span>
  333     <span class="ruby-keyword">return</span> <span class="ruby-constant">RingElem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">c</span>);
  334 <span class="ruby-keyword">end</span></pre>
  335           </div>
  336           
  337         </div>
  338 
  339         
  340 
  341         
  342       </div>
  343 
  344     
  345       <div id="method-i-CR" class="method-detail ">
  346         
  347         <div class="method-heading">
  348           <span class="method-name">CR</span><span
  349             class="method-args">(re=BigRational.new(),im=BigRational.new(),ring=nil)</span>
  350           
  351           <span class="method-click-advice">click to toggle source</span>
  352           
  353         </div>
  354         
  355 
  356         <div class="method-description">
  357           
  358           <p>Create <a href="JAS.html">JAS</a> generic Complex as ring element.</p>
  359           
  360           
  361 
  362           
  363           <div class="method-source-code" id="CR-source">
  364             <pre><span class="ruby-comment"># File examples/jas.rb, line 363</span>
  365 <span class="ruby-keyword">def</span> <span class="ruby-constant">CR</span>(<span class="ruby-identifier">re</span>=<span class="ruby-constant">BigRational</span>.<span class="ruby-identifier">new</span>(),<span class="ruby-identifier">im</span>=<span class="ruby-constant">BigRational</span>.<span class="ruby-identifier">new</span>(),<span class="ruby-identifier">ring</span>=<span class="ruby-keyword">nil</span>)
  366     <span class="ruby-keyword">if</span> <span class="ruby-identifier">re</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
  367         <span class="ruby-identifier">re</span> = <span class="ruby-constant">BigRational</span>.<span class="ruby-identifier">new</span>();
  368     <span class="ruby-keyword">end</span>
  369     <span class="ruby-keyword">if</span> <span class="ruby-identifier">im</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
  370         <span class="ruby-identifier">im</span> = <span class="ruby-constant">BigRational</span>.<span class="ruby-identifier">new</span>();
  371     <span class="ruby-keyword">end</span>
  372     <span class="ruby-keyword">if</span> <span class="ruby-identifier">re</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span> 
  373         <span class="ruby-keyword">if</span> <span class="ruby-identifier">re</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span> 
  374             <span class="ruby-keyword">if</span> <span class="ruby-identifier">re</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>
  375                 <span class="ruby-identifier">im</span> = <span class="ruby-constant">QQ</span>( <span class="ruby-identifier">re</span>[<span class="ruby-value">1</span>] );
  376             <span class="ruby-keyword">end</span>
  377             <span class="ruby-identifier">re</span> = <span class="ruby-constant">QQ</span>( <span class="ruby-identifier">re</span>[<span class="ruby-value">0</span>] );
  378         <span class="ruby-keyword">else</span>
  379             <span class="ruby-identifier">re</span> = <span class="ruby-constant">QQ</span>(<span class="ruby-identifier">re</span>);
  380 <span class="ruby-comment">#        re = makeJasArith( re );</span>
  381         <span class="ruby-keyword">end</span>
  382     <span class="ruby-keyword">end</span>
  383     <span class="ruby-keyword">if</span> <span class="ruby-identifier">im</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span> 
  384         <span class="ruby-identifier">im</span> = <span class="ruby-constant">QQ</span>( <span class="ruby-identifier">im</span> );
  385 <span class="ruby-comment">#        im = makeJasArith( im );</span>
  386     <span class="ruby-keyword">end</span>
  387     <span class="ruby-keyword">if</span> <span class="ruby-identifier">re</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
  388         <span class="ruby-identifier">re</span> = <span class="ruby-identifier">re</span>.<span class="ruby-identifier">elem</span>;
  389     <span class="ruby-keyword">end</span>
  390     <span class="ruby-keyword">if</span> <span class="ruby-identifier">im</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
  391         <span class="ruby-identifier">im</span> = <span class="ruby-identifier">im</span>.<span class="ruby-identifier">elem</span>;
  392     <span class="ruby-keyword">end</span>
  393     <span class="ruby-keyword">if</span> <span class="ruby-identifier">ring</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">nil</span>
  394         <span class="ruby-identifier">ring</span> = <span class="ruby-identifier">re</span>.<span class="ruby-identifier">factory</span>();
  395     <span class="ruby-keyword">end</span>
  396     <span class="ruby-identifier">r</span> = <span class="ruby-constant">ComplexRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ring</span>);
  397     <span class="ruby-keyword">if</span> <span class="ruby-identifier">im</span>.<span class="ruby-identifier">isZERO</span>()
  398         <span class="ruby-keyword">if</span> <span class="ruby-identifier">re</span>.<span class="ruby-identifier">isZERO</span>()
  399             <span class="ruby-identifier">c</span> = <span class="ruby-constant">Complex</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">r</span>);
  400         <span class="ruby-keyword">else</span>
  401             <span class="ruby-identifier">c</span> = <span class="ruby-constant">Complex</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">r</span>,<span class="ruby-identifier">re</span>);
  402         <span class="ruby-keyword">end</span>
  403     <span class="ruby-keyword">else</span>
  404         <span class="ruby-identifier">c</span> = <span class="ruby-constant">Complex</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">r</span>,<span class="ruby-identifier">re</span>,<span class="ruby-identifier">im</span>);
  405     <span class="ruby-keyword">end</span>
  406     <span class="ruby-keyword">return</span> <span class="ruby-constant">RingElem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">c</span>);
  407 <span class="ruby-keyword">end</span></pre>
  408           </div>
  409           
  410         </div>
  411 
  412         
  413 
  414         
  415       </div>
  416 
  417     
  418       <div id="method-i-DD" class="method-detail ">
  419         
  420         <div class="method-heading">
  421           <span class="method-name">DD</span><span
  422             class="method-args">(d=0)</span>
  423           
  424           <span class="method-click-advice">click to toggle source</span>
  425           
  426         </div>
  427         
  428 
  429         <div class="method-description">
  430           
  431           <p>Create <a href="JAS.html">JAS</a> BigDecimal as ring element.</p>
  432           
  433           
  434 
  435           
  436           <div class="method-source-code" id="DD-source">
  437             <pre><span class="ruby-comment"># File examples/jas.rb, line 411</span>
  438 <span class="ruby-keyword">def</span> <span class="ruby-constant">DD</span>(<span class="ruby-identifier">d</span>=<span class="ruby-value">0</span>)
  439     <span class="ruby-keyword">if</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
  440         <span class="ruby-identifier">d</span> = <span class="ruby-identifier">d</span>.<span class="ruby-identifier">elem</span>;
  441     <span class="ruby-keyword">end</span>
  442     <span class="ruby-keyword">if</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Float</span>
  443         <span class="ruby-identifier">d</span> = <span class="ruby-identifier">d</span>.<span class="ruby-identifier">to_s</span>;
  444     <span class="ruby-keyword">end</span>
  445     <span class="ruby-comment">#puts &quot;d type(#{d}) = #{d.class}&quot;;</span>
  446     <span class="ruby-keyword">if</span> <span class="ruby-identifier">d</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
  447        <span class="ruby-identifier">r</span> = <span class="ruby-constant">BigDecimal</span>.<span class="ruby-identifier">new</span>();
  448     <span class="ruby-keyword">else</span>
  449        <span class="ruby-identifier">r</span> = <span class="ruby-constant">BigDecimal</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">d</span>);
  450     <span class="ruby-keyword">end</span>
  451     <span class="ruby-keyword">return</span> <span class="ruby-constant">RingElem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">r</span>);
  452 <span class="ruby-keyword">end</span></pre>
  453           </div>
  454           
  455         </div>
  456 
  457         
  458 
  459         
  460       </div>
  461 
  462     
  463       <div id="method-i-FF" class="method-detail ">
  464         
  465         <div class="method-heading">
  466           <span class="method-name">FF</span><span
  467             class="method-args">(p,n,z=0)</span>
  468           
  469           <span class="method-click-advice">click to toggle source</span>
  470           
  471         </div>
  472         
  473 
  474         <div class="method-description">
  475           
  476           <p>Create <a href="JAS.html">JAS</a> Finite Field element as ring element.  <a
  477 href="JAS.html#method-i-FF">#FF</a> has p&lt;sup&gt;n&lt;/sup&gt; elements.</p>
  478           
  479           
  480 
  481           
  482           <div class="method-source-code" id="FF-source">
  483             <pre><span class="ruby-comment"># File examples/jas.rb, line 2157</span>
  484 <span class="ruby-keyword">def</span> <span class="ruby-constant">FF</span>(<span class="ruby-identifier">p</span>,<span class="ruby-identifier">n</span>,<span class="ruby-identifier">z</span>=<span class="ruby-value">0</span>)
  485     <span class="ruby-keyword">if</span> <span class="ruby-identifier">p</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
  486         <span class="ruby-identifier">p</span> = <span class="ruby-identifier">p</span>.<span class="ruby-identifier">elem</span>;
  487     <span class="ruby-keyword">end</span>
  488     <span class="ruby-keyword">if</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
  489         <span class="ruby-identifier">n</span> = <span class="ruby-identifier">n</span>.<span class="ruby-identifier">elem</span>;
  490     <span class="ruby-keyword">end</span>
  491     <span class="ruby-keyword">if</span> <span class="ruby-identifier">z</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
  492         <span class="ruby-identifier">z</span> = <span class="ruby-identifier">z</span>.<span class="ruby-identifier">elem</span>;
  493     <span class="ruby-keyword">end</span>
  494     <span class="ruby-keyword">if</span> <span class="ruby-identifier">z</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">AlgebraicNumber</span>
  495         <span class="ruby-identifier">z</span> = <span class="ruby-identifier">z</span>.<span class="ruby-identifier">val</span>;
  496         <span class="ruby-comment">#puts &quot;z = &quot; + z.ring.toScript();</span>
  497     <span class="ruby-keyword">end</span>
  498     <span class="ruby-keyword">if</span> <span class="ruby-identifier">p</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
  499       <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">&quot;No finite ring.&quot;</span>
  500     <span class="ruby-keyword">end</span>
  501     <span class="ruby-keyword">if</span> <span class="ruby-identifier">n</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
  502       <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">&quot;No finite ring.&quot;</span>
  503     <span class="ruby-keyword">end</span>
  504     <span class="ruby-identifier">field</span> = <span class="ruby-keyword">true</span>;
  505     <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-constant">PrimeInteger</span>.<span class="ruby-identifier">isPrime</span>(<span class="ruby-identifier">p</span>)
  506       <span class="ruby-identifier">field</span> = <span class="ruby-keyword">false</span>;
  507       <span class="ruby-comment">#raise ArgumentError, &quot;{p} not prime.&quot;</span>
  508     <span class="ruby-keyword">end</span>
  509     <span class="ruby-identifier">mf</span> = <span class="ruby-identifier">$finiteFields</span>[ [<span class="ruby-identifier">p</span>,<span class="ruby-identifier">n</span>] ];
  510     <span class="ruby-keyword">if</span> <span class="ruby-identifier">mf</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">nil</span> 
  511        <span class="ruby-identifier">cf</span> = <span class="ruby-constant">GF</span>(<span class="ruby-identifier">p</span>).<span class="ruby-identifier">ring</span>;
  512        <span class="ruby-identifier">mf</span> = <span class="ruby-constant">PolyUfdUtil</span>.<span class="ruby-identifier">algebraicNumberField</span>(<span class="ruby-identifier">cf</span>,<span class="ruby-identifier">n</span>);
  513        <span class="ruby-identifier">$finiteFields</span>[ [<span class="ruby-identifier">p</span>,<span class="ruby-identifier">n</span>] ] = <span class="ruby-identifier">mf</span>;
  514        <span class="ruby-comment">#puts &quot;mf = &quot; + mf.toScript();</span>
  515     <span class="ruby-keyword">end</span>
  516     <span class="ruby-keyword">if</span> <span class="ruby-identifier">z</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
  517         <span class="ruby-identifier">r</span> = <span class="ruby-constant">AlgebraicNumber</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">mf</span>);
  518     <span class="ruby-keyword">else</span>
  519         <span class="ruby-identifier">r</span> = <span class="ruby-constant">AlgebraicNumber</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">mf</span>,<span class="ruby-identifier">z</span>);
  520         <span class="ruby-comment">#puts &quot;r = &quot; + r.toScript();</span>
  521     <span class="ruby-keyword">end</span>
  522     <span class="ruby-keyword">return</span> <span class="ruby-constant">RingElem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">r</span>);
  523 <span class="ruby-keyword">end</span></pre>
  524           </div>
  525           
  526         </div>
  527 
  528         
  529 
  530         
  531       </div>
  532 
  533     
  534       <div id="method-i-GF" class="method-detail ">
  535         
  536         <div class="method-heading">
  537           <span class="method-name">GF</span><span
  538             class="method-args">(m,z=0)</span>
  539           
  540           <span class="method-click-advice">click to toggle source</span>
  541           
  542         </div>
  543         
  544 
  545         <div class="method-description">
  546           
  547           <p>Create <a href="JAS.html">JAS</a> ModInteger as field element.</p>
  548           
  549           
  550 
  551           
  552           <div class="method-source-code" id="GF-source">
  553             <pre><span class="ruby-comment"># File examples/jas.rb, line 259</span>
  554 <span class="ruby-keyword">def</span> <span class="ruby-constant">GF</span>(<span class="ruby-identifier">m</span>,<span class="ruby-identifier">z</span>=<span class="ruby-value">0</span>)
  555     <span class="ruby-keyword">return</span> <span class="ruby-constant">ZM</span>(<span class="ruby-identifier">m</span>,<span class="ruby-identifier">z</span>,<span class="ruby-keyword">true</span>);
  556 <span class="ruby-keyword">end</span></pre>
  557           </div>
  558           
  559         </div>
  560 
  561         
  562 
  563         
  564       </div>
  565 
  566     
  567       <div id="method-i-GFI" class="method-detail ">
  568         
  569         <div class="method-heading">
  570           <span class="method-name">GFI</span><span
  571             class="method-args">(m,z=0)</span>
  572           
  573           <span class="method-click-advice">click to toggle source</span>
  574           
  575         </div>
  576         
  577 
  578         <div class="method-description">
  579           
  580           <p>Create <a href="JAS.html">JAS</a> ModInt as field element.</p>
  581           
  582           
  583 
  584           
  585           <div class="method-source-code" id="GFI-source">
  586             <pre><span class="ruby-comment"># File examples/jas.rb, line 273</span>
  587 <span class="ruby-keyword">def</span> <span class="ruby-constant">GFI</span>(<span class="ruby-identifier">m</span>,<span class="ruby-identifier">z</span>=<span class="ruby-value">0</span>)
  588     <span class="ruby-keyword">return</span> <span class="ruby-constant">ZM</span>(<span class="ruby-identifier">m</span>,<span class="ruby-identifier">z</span>,<span class="ruby-keyword">true</span>);
  589 <span class="ruby-keyword">end</span></pre>
  590           </div>
  591           
  592         </div>
  593 
  594         
  595 
  596         
  597       </div>
  598 
  599     
  600       <div id="method-i-GFL" class="method-detail ">
  601         
  602         <div class="method-heading">
  603           <span class="method-name">GFL</span><span
  604             class="method-args">(m,z=0)</span>
  605           
  606           <span class="method-click-advice">click to toggle source</span>
  607           
  608         </div>
  609         
  610 
  611         <div class="method-description">
  612           
  613           <p>Create <a href="JAS.html">JAS</a> ModLong as field element.</p>
  614           
  615           
  616 
  617           
  618           <div class="method-source-code" id="GFL-source">
  619             <pre><span class="ruby-comment"># File examples/jas.rb, line 266</span>
  620 <span class="ruby-keyword">def</span> <span class="ruby-constant">GFL</span>(<span class="ruby-identifier">m</span>,<span class="ruby-identifier">z</span>=<span class="ruby-value">0</span>)
  621     <span class="ruby-keyword">return</span> <span class="ruby-constant">ZM</span>(<span class="ruby-identifier">m</span>,<span class="ruby-identifier">z</span>,<span class="ruby-keyword">true</span>);
  622 <span class="ruby-keyword">end</span></pre>
  623           </div>
  624           
  625         </div>
  626 
  627         
  628 
  629         
  630       </div>
  631 
  632     
  633       <div id="method-i-LC" class="method-detail ">
  634         
  635         <div class="method-heading">
  636           <span class="method-name">LC</span><span
  637             class="method-args">(ideal,d=0,n=1)</span>
  638           
  639           <span class="method-click-advice">click to toggle source</span>
  640           
  641         </div>
  642         
  643 
  644         <div class="method-description">
  645           
  646           <p>Create <a href="JAS.html">JAS</a> polynomial Local as ring element.</p>
  647           
  648           
  649 
  650           
  651           <div class="method-source-code" id="LC-source">
  652             <pre><span class="ruby-comment"># File examples/jas.rb, line 2391</span>
  653 <span class="ruby-keyword">def</span> <span class="ruby-constant">LC</span>(<span class="ruby-identifier">ideal</span>,<span class="ruby-identifier">d</span>=<span class="ruby-value">0</span>,<span class="ruby-identifier">n</span>=<span class="ruby-value">1</span>)
  654     <span class="ruby-keyword">if</span> <span class="ruby-identifier">ideal</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">nil</span>
  655         <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">&quot;No ideal given.&quot;</span>
  656     <span class="ruby-keyword">end</span>
  657     <span class="ruby-keyword">if</span> <span class="ruby-identifier">ideal</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">SimIdeal</span>
  658         <span class="ruby-identifier">ideal</span> = <span class="ruby-constant">Ideal</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ideal</span>.<span class="ruby-identifier">pset</span>);
  659         <span class="ruby-comment">#ideal.doGB();</span>
  660     <span class="ruby-keyword">end</span>
  661     <span class="ruby-comment">#puts &quot;ideal.getList().get(0).ring.ideal = #{ideal.getList().get(0).ring.ideal}\n&quot;;</span>
  662     <span class="ruby-keyword">if</span> <span class="ruby-identifier">ideal</span>.<span class="ruby-identifier">getList</span>().<span class="ruby-identifier">get</span>(<span class="ruby-value">0</span>).<span class="ruby-identifier">ring</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">LocalRing</span>
  663         <span class="ruby-identifier">lc</span> = <span class="ruby-constant">LocalRing</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">ideal</span>.<span class="ruby-identifier">getList</span>().<span class="ruby-identifier">get</span>(<span class="ruby-value">0</span>).<span class="ruby-identifier">ring</span>.<span class="ruby-identifier">ideal</span> );
  664     <span class="ruby-keyword">else</span>
  665         <span class="ruby-identifier">lc</span> = <span class="ruby-constant">LocalRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ideal</span>);
  666     <span class="ruby-keyword">end</span>
  667     <span class="ruby-keyword">if</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span>
  668         <span class="ruby-keyword">if</span> <span class="ruby-identifier">n</span> <span class="ruby-operator">!=</span> <span class="ruby-value">1</span>
  669             <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;#{n} ignored\n&quot;</span>;
  670         <span class="ruby-keyword">end</span>
  671         <span class="ruby-keyword">if</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>
  672             <span class="ruby-identifier">n</span> = <span class="ruby-identifier">d</span>[<span class="ruby-value">1</span>];
  673         <span class="ruby-keyword">end</span>
  674         <span class="ruby-identifier">d</span> = <span class="ruby-identifier">d</span>[<span class="ruby-value">0</span>];
  675     <span class="ruby-keyword">end</span>
  676     <span class="ruby-keyword">if</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
  677         <span class="ruby-identifier">d</span> = <span class="ruby-identifier">d</span>.<span class="ruby-identifier">elem</span>;
  678     <span class="ruby-keyword">end</span>
  679     <span class="ruby-keyword">if</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
  680         <span class="ruby-identifier">n</span> = <span class="ruby-identifier">n</span>.<span class="ruby-identifier">elem</span>;
  681     <span class="ruby-keyword">end</span>
  682     <span class="ruby-keyword">if</span> <span class="ruby-identifier">d</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
  683         <span class="ruby-identifier">r</span> = <span class="ruby-constant">Local</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">lc</span>);
  684     <span class="ruby-keyword">else</span>
  685         <span class="ruby-keyword">if</span> <span class="ruby-identifier">n</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
  686             <span class="ruby-identifier">r</span> = <span class="ruby-constant">Local</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">lc</span>,<span class="ruby-identifier">d</span>);
  687         <span class="ruby-keyword">else</span>
  688             <span class="ruby-identifier">r</span> = <span class="ruby-constant">Local</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">lc</span>,<span class="ruby-identifier">d</span>,<span class="ruby-identifier">n</span>);
  689         <span class="ruby-keyword">end</span>
  690     <span class="ruby-keyword">end</span>
  691     <span class="ruby-keyword">return</span> <span class="ruby-constant">RingElem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">r</span>);
  692 <span class="ruby-keyword">end</span></pre>
  693           </div>
  694           
  695         </div>
  696 
  697         
  698 
  699         
  700       </div>
  701 
  702     
  703       <div id="method-i-MPS" class="method-detail ">
  704         
  705         <div class="method-heading">
  706           <span class="method-name">MPS</span><span
  707             class="method-args">(cofac,names,truncate=nil,&f)</span>
  708           
  709           <span class="method-click-advice">click to toggle source</span>
  710           
  711         </div>
  712         
  713 
  714         <div class="method-description">
  715           
  716           <p>Create <a href="JAS.html">JAS</a> MultiVarPowerSeries as ring element.</p>
  717           
  718           
  719 
  720           
  721           <div class="method-source-code" id="MPS-source">
  722             <pre><span class="ruby-comment"># File examples/jas.rb, line 5426</span>
  723 <span class="ruby-keyword">def</span> <span class="ruby-constant">MPS</span>(<span class="ruby-identifier">cofac</span>,<span class="ruby-identifier">names</span>,<span class="ruby-identifier">truncate</span>=<span class="ruby-keyword">nil</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">f</span>)
  724     <span class="ruby-identifier">cf</span> = <span class="ruby-identifier">cofac</span>;
  725     <span class="ruby-keyword">if</span> <span class="ruby-identifier">cofac</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
  726         <span class="ruby-identifier">cf</span> = <span class="ruby-identifier">cofac</span>.<span class="ruby-identifier">elem</span>.<span class="ruby-identifier">factory</span>();
  727     <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">cofac</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Ring</span>
  728         <span class="ruby-identifier">cf</span> = <span class="ruby-identifier">cofac</span>.<span class="ruby-identifier">ring</span>;
  729     <span class="ruby-keyword">end</span>
  730     <span class="ruby-identifier">vars</span> = <span class="ruby-identifier">names</span>;
  731     <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>
  732        <span class="ruby-identifier">vars</span> = <span class="ruby-constant">GenPolynomialTokenizer</span>.<span class="ruby-identifier">variableList</span>(<span class="ruby-identifier">vars</span>);
  733     <span class="ruby-keyword">end</span>
  734     <span class="ruby-identifier">nv</span> = <span class="ruby-identifier">vars</span>.<span class="ruby-identifier">size</span>;
  735     <span class="ruby-keyword">if</span> <span class="ruby-identifier">truncate</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
  736         <span class="ruby-identifier">truncate</span> = <span class="ruby-identifier">truncate</span>.<span class="ruby-identifier">elem</span>;
  737     <span class="ruby-keyword">end</span>
  738     <span class="ruby-keyword">if</span> <span class="ruby-identifier">truncate</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">nil</span>
  739         <span class="ruby-identifier">ps</span> = <span class="ruby-constant">MultiVarPowerSeriesRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">cf</span>,<span class="ruby-identifier">nv</span>,<span class="ruby-identifier">vars</span>);
  740     <span class="ruby-keyword">else</span>
  741         <span class="ruby-identifier">ps</span> = <span class="ruby-constant">MultiVarPowerSeriesRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">cf</span>,<span class="ruby-identifier">nv</span>,<span class="ruby-identifier">vars</span>,<span class="ruby-identifier">truncate</span>);
  742     <span class="ruby-keyword">end</span>
  743     <span class="ruby-keyword">if</span> <span class="ruby-identifier">f</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">nil</span>
  744         <span class="ruby-identifier">r</span> = <span class="ruby-identifier">ps</span>.<span class="ruby-identifier">getZERO</span>();
  745     <span class="ruby-keyword">else</span>
  746         <span class="ruby-identifier">r</span> = <span class="ruby-constant">MultiVarPowerSeries</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ps</span>,<span class="ruby-constant">MCoeff</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ps</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">f</span>));
  747         <span class="ruby-comment">#puts &quot;r = &quot; + str(r);</span>
  748     <span class="ruby-keyword">end</span>
  749     <span class="ruby-keyword">return</span> <span class="ruby-constant">RingElem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">r</span>);
  750 
  751 <span class="ruby-keyword">end</span></pre>
  752           </div>
  753           
  754         </div>
  755 
  756         
  757 
  758         
  759       </div>
  760 
  761     
  762       <div id="method-i-Mat" class="method-detail ">
  763         
  764         <div class="method-heading">
  765           <span class="method-name">Mat</span><span
  766             class="method-args">(cofac,n,m,v=nil)</span>
  767           
  768           <span class="method-click-advice">click to toggle source</span>
  769           
  770         </div>
  771         
  772 
  773         <div class="method-description">
  774           
  775           <p>Create <a href="JAS.html">JAS</a> GenMatrix ring element.</p>
  776           
  777           
  778 
  779           
  780           <div class="method-source-code" id="Mat-source">
  781             <pre><span class="ruby-comment"># File examples/jas.rb, line 5490</span>
  782 <span class="ruby-keyword">def</span> <span class="ruby-constant">Mat</span>(<span class="ruby-identifier">cofac</span>,<span class="ruby-identifier">n</span>,<span class="ruby-identifier">m</span>,<span class="ruby-identifier">v</span>=<span class="ruby-keyword">nil</span>)
  783     <span class="ruby-identifier">cf</span> = <span class="ruby-identifier">cofac</span>;
  784     <span class="ruby-keyword">if</span> <span class="ruby-identifier">cofac</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
  785         <span class="ruby-identifier">cf</span> = <span class="ruby-identifier">cofac</span>.<span class="ruby-identifier">elem</span>.<span class="ruby-identifier">factory</span>();
  786     <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">cofac</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Ring</span>
  787         <span class="ruby-identifier">cf</span> = <span class="ruby-identifier">cofac</span>.<span class="ruby-identifier">ring</span>;
  788     <span class="ruby-keyword">end</span>
  789     <span class="ruby-keyword">if</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
  790         <span class="ruby-identifier">n</span> = <span class="ruby-identifier">n</span>.<span class="ruby-identifier">elem</span>;
  791     <span class="ruby-keyword">end</span>
  792     <span class="ruby-keyword">if</span> <span class="ruby-identifier">m</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
  793         <span class="ruby-identifier">m</span> = <span class="ruby-identifier">m</span>.<span class="ruby-identifier">elem</span>;
  794     <span class="ruby-keyword">end</span>
  795     <span class="ruby-keyword">if</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
  796         <span class="ruby-identifier">v</span> = <span class="ruby-identifier">v</span>.<span class="ruby-identifier">elem</span>;
  797     <span class="ruby-keyword">end</span>
  798     <span class="ruby-comment">#puts &quot;cf type(#{cf}) = #{cf.class}&quot;;</span>
  799     <span class="ruby-keyword">if</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span>
  800         <span class="ruby-identifier">v</span> = <span class="ruby-identifier">rbarray2arraylist</span>(<span class="ruby-identifier">v</span>,<span class="ruby-identifier">cf</span>,<span class="ruby-identifier">rec</span>=<span class="ruby-value">2</span>);
  801     <span class="ruby-keyword">end</span>
  802     <span class="ruby-identifier">mr</span> = <span class="ruby-constant">GenMatrixRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">cf</span>,<span class="ruby-identifier">n</span>,<span class="ruby-identifier">m</span>);
  803     <span class="ruby-keyword">if</span> <span class="ruby-identifier">v</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">nil</span>
  804         <span class="ruby-identifier">r</span> = <span class="ruby-constant">GenMatrix</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">mr</span>);
  805     <span class="ruby-keyword">else</span>
  806         <span class="ruby-identifier">r</span> = <span class="ruby-constant">GenMatrix</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">mr</span>,<span class="ruby-identifier">v</span>);
  807     <span class="ruby-keyword">end</span>
  808     <span class="ruby-keyword">return</span> <span class="ruby-constant">RingElem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">r</span>);
  809 <span class="ruby-keyword">end</span></pre>
  810           </div>
  811           
  812         </div>
  813 
  814         
  815 
  816         
  817       </div>
  818 
  819     
  820       <div id="method-i-Oct" class="method-detail ">
  821         
  822         <div class="method-heading">
  823           <span class="method-name">Oct</span><span
  824             class="method-args">(ro=0,io=0)</span>
  825           
  826           <span class="method-click-advice">click to toggle source</span>
  827           
  828         </div>
  829         
  830 
  831         <div class="method-description">
  832           
  833           <p>Create <a href="JAS.html">JAS</a> BigOctonion as ring element.</p>
  834           
  835           
  836 
  837           
  838           <div class="method-source-code" id="Oct-source">
  839             <pre><span class="ruby-comment"># File examples/jas.rb, line 479</span>
  840 <span class="ruby-keyword">def</span> <span class="ruby-constant">Oct</span>(<span class="ruby-identifier">ro</span>=<span class="ruby-value">0</span>,<span class="ruby-identifier">io</span>=<span class="ruby-value">0</span>)
  841     <span class="ruby-identifier">cf</span> = <span class="ruby-constant">BigQuaternionRing</span>.<span class="ruby-identifier">new</span>();
  842     <span class="ruby-keyword">if</span> <span class="ruby-identifier">ro</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
  843         <span class="ruby-identifier">ro</span> = <span class="ruby-constant">BigQuaternion</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">cf</span>);
  844     <span class="ruby-keyword">end</span>
  845     <span class="ruby-keyword">if</span> <span class="ruby-identifier">io</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
  846         <span class="ruby-identifier">io</span> = <span class="ruby-constant">BigQuaternion</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">cf</span>);
  847     <span class="ruby-keyword">end</span>
  848     <span class="ruby-keyword">if</span> <span class="ruby-identifier">ro</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span> 
  849         <span class="ruby-keyword">if</span> <span class="ruby-identifier">ro</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span> 
  850             <span class="ruby-keyword">if</span> <span class="ruby-identifier">ro</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>
  851                 <span class="ruby-identifier">io</span> = <span class="ruby-constant">QQ</span>( <span class="ruby-identifier">ro</span>[<span class="ruby-value">1</span>] );
  852             <span class="ruby-keyword">end</span>
  853             <span class="ruby-identifier">ro</span> = <span class="ruby-constant">QQ</span>( <span class="ruby-identifier">ro</span>[<span class="ruby-value">0</span>] );
  854         <span class="ruby-keyword">else</span>
  855             <span class="ruby-identifier">ro</span> = <span class="ruby-constant">QQ</span>(<span class="ruby-identifier">ro</span>);
  856 <span class="ruby-comment">#        re = makeJasArith( re );</span>
  857         <span class="ruby-keyword">end</span>
  858     <span class="ruby-keyword">end</span>
  859     <span class="ruby-keyword">if</span> <span class="ruby-identifier">io</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span> 
  860         <span class="ruby-identifier">io</span> = <span class="ruby-constant">QQ</span>( <span class="ruby-identifier">io</span> );
  861 <span class="ruby-comment">#        im = makeJasArith( im );</span>
  862     <span class="ruby-keyword">end</span>
  863     <span class="ruby-keyword">if</span> <span class="ruby-identifier">ro</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
  864         <span class="ruby-identifier">ro</span> = <span class="ruby-identifier">ro</span>.<span class="ruby-identifier">elem</span>;
  865     <span class="ruby-keyword">end</span>
  866     <span class="ruby-keyword">if</span> <span class="ruby-identifier">io</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
  867         <span class="ruby-identifier">io</span> = <span class="ruby-identifier">io</span>.<span class="ruby-identifier">elem</span>;
  868     <span class="ruby-keyword">end</span>
  869     <span class="ruby-identifier">c</span> = <span class="ruby-constant">BigOctonion</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ro</span>,<span class="ruby-identifier">io</span>);
  870     <span class="ruby-keyword">return</span> <span class="ruby-constant">RingElem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">c</span>);
  871 <span class="ruby-keyword">end</span></pre>
  872           </div>
  873           
  874         </div>
  875 
  876         
  877 
  878         
  879       </div>
  880 
  881     
  882       <div id="method-i-PS" class="method-detail ">
  883         
  884         <div class="method-heading">
  885           <span class="method-name">PS</span><span
  886             class="method-args">(cofac,name,truncate=nil,&f)</span>
  887           
  888           <span class="method-click-advice">click to toggle source</span>
  889           
  890         </div>
  891         
  892 
  893         <div class="method-description">
  894           
  895           <p>Create <a href="JAS.html">JAS</a> UnivPowerSeries as ring element.</p>
  896           
  897           
  898 
  899           
  900           <div class="method-source-code" id="PS-source">
  901             <pre><span class="ruby-comment"># File examples/jas.rb, line 5360</span>
  902 <span class="ruby-keyword">def</span> <span class="ruby-constant">PS</span>(<span class="ruby-identifier">cofac</span>,<span class="ruby-identifier">name</span>,<span class="ruby-identifier">truncate</span>=<span class="ruby-keyword">nil</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">f</span>) <span class="ruby-comment">#=nil,truncate=nil)</span>
  903     <span class="ruby-identifier">cf</span> = <span class="ruby-identifier">cofac</span>;
  904     <span class="ruby-keyword">if</span> <span class="ruby-identifier">cofac</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
  905         <span class="ruby-identifier">cf</span> = <span class="ruby-identifier">cofac</span>.<span class="ruby-identifier">elem</span>.<span class="ruby-identifier">factory</span>();
  906     <span class="ruby-keyword">end</span>
  907     <span class="ruby-keyword">if</span> <span class="ruby-identifier">cofac</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Ring</span>
  908         <span class="ruby-identifier">cf</span> = <span class="ruby-identifier">cofac</span>.<span class="ruby-identifier">ring</span>;
  909     <span class="ruby-keyword">end</span>
  910     <span class="ruby-keyword">if</span> <span class="ruby-identifier">truncate</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
  911         <span class="ruby-identifier">truncate</span> = <span class="ruby-identifier">truncate</span>.<span class="ruby-identifier">elem</span>;
  912     <span class="ruby-keyword">end</span>
  913     <span class="ruby-keyword">if</span> <span class="ruby-identifier">truncate</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">nil</span>
  914         <span class="ruby-identifier">ps</span> = <span class="ruby-constant">UnivPowerSeriesRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">cf</span>,<span class="ruby-identifier">name</span>);
  915     <span class="ruby-keyword">else</span>
  916         <span class="ruby-identifier">ps</span> = <span class="ruby-constant">UnivPowerSeriesRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">cf</span>,<span class="ruby-identifier">truncate</span>,<span class="ruby-identifier">name</span>);
  917     <span class="ruby-keyword">end</span>
  918     <span class="ruby-comment">#puts &quot;ps type(#{ps}) = #{ps.class}\n&quot;;</span>
  919     <span class="ruby-comment">#puts &quot;f  type(#{f}) = #{f.class}\n&quot;;</span>
  920     <span class="ruby-keyword">if</span> <span class="ruby-identifier">f</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">nil</span>
  921         <span class="ruby-identifier">r</span> = <span class="ruby-identifier">ps</span>.<span class="ruby-identifier">getZERO</span>();
  922     <span class="ruby-keyword">else</span>
  923         <span class="ruby-comment">#Bug in JRuby 1.5.6? move outside method</span>
  924         <span class="ruby-identifier">r</span> = <span class="ruby-constant">UnivPowerSeries</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ps</span>,<span class="ruby-constant">Coeff</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">cf</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">f</span>));
  925     <span class="ruby-keyword">end</span>
  926     <span class="ruby-keyword">return</span> <span class="ruby-constant">RingElem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">r</span>);
  927 
  928 <span class="ruby-keyword">end</span></pre>
  929           </div>
  930           
  931         </div>
  932 
  933         
  934 
  935         
  936       </div>
  937 
  938     
  939       <div id="method-i-QQ" class="method-detail ">
  940         
  941         <div class="method-heading">
  942           <span class="method-name">QQ</span><span
  943             class="method-args">(d=0,n=1)</span>
  944           
  945           <span class="method-click-advice">click to toggle source</span>
  946           
  947         </div>
  948         
  949 
  950         <div class="method-description">
  951           
  952           <p>Create <a href="JAS.html">JAS</a> BigRational as ring element.</p>
  953           
  954           
  955 
  956           
  957           <div class="method-source-code" id="QQ-source">
  958             <pre><span class="ruby-comment"># File examples/jas.rb, line 280</span>
  959 <span class="ruby-keyword">def</span> <span class="ruby-constant">QQ</span>(<span class="ruby-identifier">d</span>=<span class="ruby-value">0</span>,<span class="ruby-identifier">n</span>=<span class="ruby-value">1</span>)
  960     <span class="ruby-keyword">if</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Rational</span> 
  961         <span class="ruby-keyword">if</span> <span class="ruby-identifier">n</span> <span class="ruby-operator">!=</span> <span class="ruby-value">1</span>
  962             <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;#{n} ignored\n&quot;</span>;
  963         <span class="ruby-keyword">end</span>
  964         <span class="ruby-keyword">if</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">denominator</span> <span class="ruby-operator">!=</span> <span class="ruby-value">1</span>
  965             <span class="ruby-identifier">n</span> = <span class="ruby-identifier">d</span>.<span class="ruby-identifier">denominator</span>;
  966         <span class="ruby-keyword">end</span>
  967         <span class="ruby-identifier">d</span> = <span class="ruby-identifier">d</span>.<span class="ruby-identifier">numerator</span>;
  968     <span class="ruby-keyword">end</span>
  969     <span class="ruby-keyword">if</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
  970         <span class="ruby-identifier">d</span> = <span class="ruby-identifier">d</span>.<span class="ruby-identifier">elem</span>;
  971     <span class="ruby-keyword">end</span>
  972     <span class="ruby-keyword">if</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
  973         <span class="ruby-identifier">n</span> = <span class="ruby-identifier">n</span>.<span class="ruby-identifier">elem</span>;
  974     <span class="ruby-keyword">end</span>
  975     <span class="ruby-keyword">if</span> <span class="ruby-identifier">n</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
  976         <span class="ruby-keyword">if</span> <span class="ruby-identifier">d</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
  977             <span class="ruby-identifier">r</span> = <span class="ruby-constant">BigRational</span>.<span class="ruby-identifier">new</span>();
  978         <span class="ruby-keyword">else</span>
  979             <span class="ruby-identifier">r</span> = <span class="ruby-constant">BigRational</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">d</span>);
  980         <span class="ruby-keyword">end</span>
  981     <span class="ruby-keyword">else</span>
  982         <span class="ruby-identifier">d</span> = <span class="ruby-constant">BigRational</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">d</span>);
  983         <span class="ruby-identifier">n</span> = <span class="ruby-constant">BigRational</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">n</span>);
  984         <span class="ruby-identifier">r</span> = <span class="ruby-identifier">d</span>.<span class="ruby-identifier">divide</span>(<span class="ruby-identifier">n</span>); <span class="ruby-comment"># BigRational.new(d,n); only for short integers</span>
  985     <span class="ruby-keyword">end</span>
  986     <span class="ruby-keyword">return</span> <span class="ruby-constant">RingElem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">r</span>);
  987 <span class="ruby-keyword">end</span></pre>
  988           </div>
  989           
  990         </div>
  991 
  992         
  993 
  994         
  995       </div>
  996 
  997     
  998       <div id="method-i-Quat" class="method-detail ">
  999         
 1000         <div class="method-heading">
 1001           <span class="method-name">Quat</span><span
 1002             class="method-args">(re=BigRational.new(),im=BigRational.new(),jm=BigRational.new(),km=BigRational.new())</span>
 1003           
 1004           <span class="method-click-advice">click to toggle source</span>
 1005           
 1006         </div>
 1007         
 1008 
 1009         <div class="method-description">
 1010           
 1011           <p>Create <a href="JAS.html">JAS</a> BigQuaternion as ring element.</p>
 1012           
 1013           
 1014 
 1015           
 1016           <div class="method-source-code" id="Quat-source">
 1017             <pre><span class="ruby-comment"># File examples/jas.rb, line 431</span>
 1018 <span class="ruby-keyword">def</span> <span class="ruby-constant">Quat</span>(<span class="ruby-identifier">re</span>=<span class="ruby-constant">BigRational</span>.<span class="ruby-identifier">new</span>(),<span class="ruby-identifier">im</span>=<span class="ruby-constant">BigRational</span>.<span class="ruby-identifier">new</span>(),<span class="ruby-identifier">jm</span>=<span class="ruby-constant">BigRational</span>.<span class="ruby-identifier">new</span>(),<span class="ruby-identifier">km</span>=<span class="ruby-constant">BigRational</span>.<span class="ruby-identifier">new</span>())
 1019     <span class="ruby-keyword">if</span> <span class="ruby-identifier">re</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
 1020         <span class="ruby-identifier">re</span> = <span class="ruby-constant">BigRational</span>.<span class="ruby-identifier">new</span>();
 1021     <span class="ruby-keyword">end</span>
 1022     <span class="ruby-keyword">if</span> <span class="ruby-identifier">im</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
 1023         <span class="ruby-identifier">im</span> = <span class="ruby-constant">BigRational</span>.<span class="ruby-identifier">new</span>();
 1024     <span class="ruby-keyword">end</span>
 1025     <span class="ruby-keyword">if</span> <span class="ruby-identifier">jm</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
 1026         <span class="ruby-identifier">jm</span> = <span class="ruby-constant">BigRational</span>.<span class="ruby-identifier">new</span>();
 1027     <span class="ruby-keyword">end</span>
 1028     <span class="ruby-keyword">if</span> <span class="ruby-identifier">km</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
 1029         <span class="ruby-identifier">km</span> = <span class="ruby-constant">BigRational</span>.<span class="ruby-identifier">new</span>();
 1030     <span class="ruby-keyword">end</span>
 1031     <span class="ruby-keyword">if</span> <span class="ruby-identifier">re</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Numeric</span> 
 1032         <span class="ruby-identifier">re</span> = <span class="ruby-constant">QQ</span>(<span class="ruby-identifier">re</span>);
 1033 <span class="ruby-comment">#        re = makeJasArith( re );</span>
 1034     <span class="ruby-keyword">end</span>
 1035     <span class="ruby-keyword">if</span> <span class="ruby-identifier">im</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Numeric</span> 
 1036         <span class="ruby-identifier">im</span> = <span class="ruby-constant">QQ</span>( <span class="ruby-identifier">im</span> );
 1037     <span class="ruby-keyword">end</span>
 1038     <span class="ruby-keyword">if</span> <span class="ruby-identifier">jm</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Numeric</span>
 1039         <span class="ruby-identifier">jm</span> = <span class="ruby-constant">QQ</span>( <span class="ruby-identifier">jm</span> );
 1040     <span class="ruby-keyword">end</span>
 1041     <span class="ruby-keyword">if</span> <span class="ruby-identifier">km</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Numeric</span>
 1042        <span class="ruby-identifier">kim</span> = <span class="ruby-constant">QQ</span>( <span class="ruby-identifier">km</span> );
 1043 <span class="ruby-comment">#        im = makeJasArith( im );</span>
 1044     <span class="ruby-keyword">end</span>
 1045     <span class="ruby-keyword">if</span> <span class="ruby-identifier">re</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 1046         <span class="ruby-identifier">re</span> = <span class="ruby-identifier">re</span>.<span class="ruby-identifier">elem</span>;
 1047     <span class="ruby-keyword">end</span>
 1048     <span class="ruby-keyword">if</span> <span class="ruby-identifier">im</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 1049         <span class="ruby-identifier">im</span> = <span class="ruby-identifier">im</span>.<span class="ruby-identifier">elem</span>;
 1050     <span class="ruby-keyword">end</span>
 1051     <span class="ruby-keyword">if</span> <span class="ruby-identifier">jm</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 1052         <span class="ruby-identifier">jm</span> = <span class="ruby-identifier">jm</span>.<span class="ruby-identifier">elem</span>;
 1053     <span class="ruby-keyword">end</span>
 1054     <span class="ruby-keyword">if</span> <span class="ruby-identifier">km</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 1055         <span class="ruby-identifier">km</span> = <span class="ruby-identifier">km</span>.<span class="ruby-identifier">elem</span>;
 1056     <span class="ruby-keyword">end</span>
 1057     <span class="ruby-identifier">cf</span> = <span class="ruby-constant">BigQuaternionRing</span>.<span class="ruby-identifier">new</span>();
 1058     <span class="ruby-identifier">c</span> = <span class="ruby-constant">BigQuaternion</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">cf</span>, <span class="ruby-identifier">re</span>,<span class="ruby-identifier">im</span>,<span class="ruby-identifier">jm</span>,<span class="ruby-identifier">km</span>);
 1059     <span class="ruby-keyword">return</span> <span class="ruby-constant">RingElem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">c</span>);
 1060 <span class="ruby-keyword">end</span></pre>
 1061           </div>
 1062           
 1063         </div>
 1064 
 1065         
 1066 
 1067         
 1068       </div>
 1069 
 1070     
 1071       <div id="method-i-RC" class="method-detail ">
 1072         
 1073         <div class="method-heading">
 1074           <span class="method-name">RC</span><span
 1075             class="method-args">(ideal,r=0)</span>
 1076           
 1077           <span class="method-click-advice">click to toggle source</span>
 1078           
 1079         </div>
 1080         
 1081 
 1082         <div class="method-description">
 1083           
 1084           <p>Create <a href="JAS.html">JAS</a> polynomial Residue as ring element.</p>
 1085           
 1086           
 1087 
 1088           
 1089           <div class="method-source-code" id="RC-source">
 1090             <pre><span class="ruby-comment"># File examples/jas.rb, line 2360</span>
 1091 <span class="ruby-keyword">def</span> <span class="ruby-constant">RC</span>(<span class="ruby-identifier">ideal</span>,<span class="ruby-identifier">r</span>=<span class="ruby-value">0</span>)
 1092     <span class="ruby-keyword">if</span> <span class="ruby-identifier">ideal</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">nil</span>
 1093         <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">&quot;No ideal given.&quot;</span>
 1094     <span class="ruby-keyword">end</span>
 1095     <span class="ruby-keyword">if</span> <span class="ruby-identifier">ideal</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">SimIdeal</span>
 1096         <span class="ruby-comment">#puts &quot;ideal.pset = &quot; + str(ideal.pset) + &quot;\n&quot;;</span>
 1097         <span class="ruby-comment">#ideal = Java::EduJasApplication::Ideal.new(ideal.ring,ideal.list);</span>
 1098         <span class="ruby-identifier">ideal</span> = <span class="ruby-constant">Ideal</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ideal</span>.<span class="ruby-identifier">pset</span>);
 1099         <span class="ruby-comment">#ideal.doGB();</span>
 1100     <span class="ruby-keyword">end</span>
 1101     <span class="ruby-comment">#puts &quot;ideal.getList().get(0).ring.ideal = #{ideal.getList().get(0).ring.ideal}\n&quot;;</span>
 1102     <span class="ruby-keyword">if</span> <span class="ruby-identifier">ideal</span>.<span class="ruby-identifier">getList</span>().<span class="ruby-identifier">get</span>(<span class="ruby-value">0</span>).<span class="ruby-identifier">ring</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">ResidueRing</span>
 1103         <span class="ruby-identifier">rc</span> = <span class="ruby-constant">ResidueRing</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">ideal</span>.<span class="ruby-identifier">getList</span>().<span class="ruby-identifier">get</span>(<span class="ruby-value">0</span>).<span class="ruby-identifier">ring</span>.<span class="ruby-identifier">ideal</span> );
 1104     <span class="ruby-keyword">else</span>
 1105         <span class="ruby-identifier">rc</span> = <span class="ruby-constant">ResidueRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ideal</span>);
 1106     <span class="ruby-keyword">end</span>
 1107     <span class="ruby-keyword">if</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 1108         <span class="ruby-identifier">r</span> = <span class="ruby-identifier">r</span>.<span class="ruby-identifier">elem</span>;
 1109     <span class="ruby-keyword">end</span>
 1110     <span class="ruby-keyword">if</span> <span class="ruby-identifier">r</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
 1111         <span class="ruby-identifier">r</span> = <span class="ruby-constant">Residue</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">rc</span>);
 1112     <span class="ruby-keyword">else</span>
 1113         <span class="ruby-identifier">r</span> = <span class="ruby-constant">Residue</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">rc</span>,<span class="ruby-identifier">r</span>);
 1114     <span class="ruby-keyword">end</span>
 1115     <span class="ruby-keyword">return</span> <span class="ruby-constant">RingElem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">r</span>);
 1116 <span class="ruby-keyword">end</span></pre>
 1117           </div>
 1118           
 1119         </div>
 1120 
 1121         
 1122 
 1123         
 1124       </div>
 1125 
 1126     
 1127       <div id="method-i-RF" class="method-detail ">
 1128         
 1129         <div class="method-heading">
 1130           <span class="method-name">RF</span><span
 1131             class="method-args">(pr,d=0,n=1)</span>
 1132           
 1133           <span class="method-click-advice">click to toggle source</span>
 1134           
 1135         </div>
 1136         
 1137 
 1138         <div class="method-description">
 1139           
 1140           <p>Create <a href="JAS.html">JAS</a> rational function Quotient as ring
 1141 element.</p>
 1142           
 1143           
 1144 
 1145           
 1146           <div class="method-source-code" id="RF-source">
 1147             <pre><span class="ruby-comment"># File examples/jas.rb, line 2258</span>
 1148 <span class="ruby-keyword">def</span> <span class="ruby-constant">RF</span>(<span class="ruby-identifier">pr</span>,<span class="ruby-identifier">d</span>=<span class="ruby-value">0</span>,<span class="ruby-identifier">n</span>=<span class="ruby-value">1</span>)
 1149     <span class="ruby-keyword">if</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span>
 1150         <span class="ruby-keyword">if</span> <span class="ruby-identifier">n</span> <span class="ruby-operator">!=</span> <span class="ruby-value">1</span>
 1151             <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;#{} ignored\n&quot;</span>;
 1152         <span class="ruby-keyword">end</span>
 1153         <span class="ruby-keyword">if</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>
 1154             <span class="ruby-identifier">n</span> = <span class="ruby-identifier">d</span>[<span class="ruby-value">1</span>];
 1155         <span class="ruby-keyword">end</span>
 1156         <span class="ruby-identifier">d</span> = <span class="ruby-identifier">d</span>[<span class="ruby-value">0</span>];
 1157     <span class="ruby-keyword">end</span>
 1158     <span class="ruby-keyword">if</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 1159         <span class="ruby-identifier">d</span> = <span class="ruby-identifier">d</span>.<span class="ruby-identifier">elem</span>;
 1160     <span class="ruby-keyword">end</span>
 1161     <span class="ruby-keyword">if</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 1162         <span class="ruby-identifier">n</span> = <span class="ruby-identifier">n</span>.<span class="ruby-identifier">elem</span>;
 1163     <span class="ruby-keyword">end</span>
 1164     <span class="ruby-keyword">if</span> <span class="ruby-identifier">pr</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 1165         <span class="ruby-identifier">pr</span> = <span class="ruby-identifier">pr</span>.<span class="ruby-identifier">elem</span>;
 1166     <span class="ruby-keyword">end</span>
 1167     <span class="ruby-keyword">if</span> <span class="ruby-identifier">pr</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Ring</span>
 1168         <span class="ruby-identifier">pr</span> = <span class="ruby-identifier">pr</span>.<span class="ruby-identifier">ring</span>;
 1169     <span class="ruby-keyword">end</span>
 1170     <span class="ruby-identifier">qr</span> = <span class="ruby-constant">QuotientRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">pr</span>);
 1171     <span class="ruby-keyword">if</span> <span class="ruby-identifier">d</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
 1172         <span class="ruby-identifier">r</span> = <span class="ruby-constant">Quotient</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">qr</span>);
 1173     <span class="ruby-keyword">else</span>
 1174         <span class="ruby-keyword">if</span> <span class="ruby-identifier">n</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
 1175             <span class="ruby-identifier">r</span> = <span class="ruby-constant">Quotient</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">qr</span>,<span class="ruby-identifier">d</span>);
 1176         <span class="ruby-keyword">else</span>
 1177             <span class="ruby-identifier">r</span> = <span class="ruby-constant">Quotient</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">qr</span>,<span class="ruby-identifier">d</span>,<span class="ruby-identifier">n</span>);
 1178         <span class="ruby-keyword">end</span>
 1179     <span class="ruby-keyword">end</span>
 1180     <span class="ruby-keyword">return</span> <span class="ruby-constant">RingElem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">r</span>);
 1181 <span class="ruby-keyword">end</span></pre>
 1182           </div>
 1183           
 1184         </div>
 1185 
 1186         
 1187 
 1188         
 1189       </div>
 1190 
 1191     
 1192       <div id="method-i-RR" class="method-detail ">
 1193         
 1194         <div class="method-heading">
 1195           <span class="method-name">RR</span><span
 1196             class="method-args">(flist,n=1,r=0)</span>
 1197           
 1198           <span class="method-click-advice">click to toggle source</span>
 1199           
 1200         </div>
 1201         
 1202 
 1203         <div class="method-description">
 1204           
 1205           <p>Create <a href="JAS.html">JAS</a> regular ring Product as ring element.</p>
 1206           
 1207           
 1208 
 1209           
 1210           <div class="method-source-code" id="RR-source">
 1211             <pre><span class="ruby-comment"># File examples/jas.rb, line 2562</span>
 1212 <span class="ruby-keyword">def</span> <span class="ruby-constant">RR</span>(<span class="ruby-identifier">flist</span>,<span class="ruby-identifier">n</span>=<span class="ruby-value">1</span>,<span class="ruby-identifier">r</span>=<span class="ruby-value">0</span>)
 1213     <span class="ruby-keyword">if</span> <span class="ruby-keyword">not</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Integer</span>
 1214         <span class="ruby-identifier">r</span> = <span class="ruby-identifier">n</span>;
 1215         <span class="ruby-identifier">n</span> = <span class="ruby-value">1</span>;
 1216     <span class="ruby-keyword">end</span>
 1217     <span class="ruby-keyword">if</span> <span class="ruby-identifier">flist</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">nil</span>
 1218         <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">&quot;No list given.&quot;</span>
 1219     <span class="ruby-keyword">end</span>
 1220     <span class="ruby-keyword">if</span> <span class="ruby-identifier">flist</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span>
 1221         <span class="ruby-identifier">flist</span> = <span class="ruby-identifier">rbarray2arraylist</span>( <span class="ruby-identifier">flist</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">factory</span>() }, <span class="ruby-identifier">rec</span>=<span class="ruby-value">1</span>);
 1222         <span class="ruby-identifier">ncop</span> = <span class="ruby-value">0</span>;
 1223     <span class="ruby-keyword">else</span>
 1224         <span class="ruby-identifier">ncop</span> = <span class="ruby-identifier">n</span>;
 1225     <span class="ruby-keyword">end</span>
 1226     <span class="ruby-keyword">if</span> <span class="ruby-identifier">flist</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 1227         <span class="ruby-identifier">flist</span> = <span class="ruby-identifier">flist</span>.<span class="ruby-identifier">elem</span>;
 1228         <span class="ruby-identifier">flist</span> = <span class="ruby-identifier">flist</span>.<span class="ruby-identifier">factory</span>();
 1229         <span class="ruby-identifier">ncop</span> = <span class="ruby-identifier">n</span>;
 1230     <span class="ruby-keyword">end</span>
 1231     <span class="ruby-comment">#puts &quot;flist = &quot; + str(flist);</span>
 1232     <span class="ruby-comment">#puts &quot;ncop  = &quot; + str(ncop);</span>
 1233     <span class="ruby-keyword">if</span> <span class="ruby-identifier">ncop</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
 1234         <span class="ruby-identifier">pr</span> = <span class="ruby-constant">ProductRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">flist</span>);
 1235     <span class="ruby-keyword">else</span>
 1236         <span class="ruby-identifier">pr</span> = <span class="ruby-constant">ProductRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">flist</span>,<span class="ruby-identifier">ncop</span>);
 1237     <span class="ruby-keyword">end</span>
 1238     <span class="ruby-comment">#puts &quot;r type(#{r}) = #{r.class}\n&quot;;</span>
 1239     <span class="ruby-keyword">if</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 1240         <span class="ruby-identifier">r</span> = <span class="ruby-identifier">r</span>.<span class="ruby-identifier">elem</span>;
 1241     <span class="ruby-keyword">end</span>
 1242     <span class="ruby-keyword">begin</span>
 1243         <span class="ruby-comment">#puts &quot;r.class() = #{r.class}\n&quot;;</span>
 1244         <span class="ruby-keyword">if</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Product</span>
 1245             <span class="ruby-comment">#puts &quot;r.val = #{r.val}\n&quot;;</span>
 1246             <span class="ruby-identifier">r</span> = <span class="ruby-identifier">r</span>.<span class="ruby-identifier">val</span>;
 1247         <span class="ruby-keyword">end</span>
 1248     <span class="ruby-keyword">rescue</span>
 1249         <span class="ruby-comment">#pass;</span>
 1250     <span class="ruby-keyword">end</span>
 1251     <span class="ruby-comment">#puts &quot;r = &quot; + r.to_s;</span>
 1252     <span class="ruby-keyword">if</span> <span class="ruby-identifier">r</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
 1253         <span class="ruby-identifier">r</span> = <span class="ruby-constant">Product</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">pr</span>);
 1254     <span class="ruby-keyword">else</span>
 1255         <span class="ruby-identifier">r</span> = <span class="ruby-constant">Product</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">pr</span>,<span class="ruby-identifier">r</span>);
 1256     <span class="ruby-keyword">end</span>
 1257     <span class="ruby-keyword">return</span> <span class="ruby-constant">RingElem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">r</span>);
 1258 <span class="ruby-keyword">end</span></pre>
 1259           </div>
 1260           
 1261         </div>
 1262 
 1263         
 1264 
 1265         
 1266       </div>
 1267 
 1268     
 1269       <div id="method-i-RealN" class="method-detail ">
 1270         
 1271         <div class="method-heading">
 1272           <span class="method-name">RealN</span><span
 1273             class="method-args">(m,i,r=0)</span>
 1274           
 1275           <span class="method-click-advice">click to toggle source</span>
 1276           
 1277         </div>
 1278         
 1279 
 1280         <div class="method-description">
 1281           
 1282           <p>Create <a href="JAS.html">JAS</a> RealAlgebraicNumber as ring element.</p>
 1283           
 1284           
 1285 
 1286           
 1287           <div class="method-source-code" id="RealN-source">
 1288             <pre><span class="ruby-comment"># File examples/jas.rb, line 2214</span>
 1289 <span class="ruby-keyword">def</span> <span class="ruby-constant">RealN</span>(<span class="ruby-identifier">m</span>,<span class="ruby-identifier">i</span>,<span class="ruby-identifier">r</span>=<span class="ruby-value">0</span>)
 1290     <span class="ruby-keyword">if</span> <span class="ruby-identifier">m</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 1291         <span class="ruby-identifier">m</span> = <span class="ruby-identifier">m</span>.<span class="ruby-identifier">elem</span>;
 1292     <span class="ruby-keyword">end</span>
 1293     <span class="ruby-keyword">if</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 1294         <span class="ruby-identifier">r</span> = <span class="ruby-identifier">r</span>.<span class="ruby-identifier">elem</span>;
 1295     <span class="ruby-keyword">end</span>
 1296     <span class="ruby-keyword">if</span> <span class="ruby-identifier">i</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span>
 1297         <span class="ruby-identifier">il</span> = <span class="ruby-constant">BigRational</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">i</span>[<span class="ruby-value">0</span>]);
 1298         <span class="ruby-identifier">ir</span> = <span class="ruby-constant">BigRational</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">i</span>[<span class="ruby-value">1</span>]);
 1299         <span class="ruby-identifier">i</span> = <span class="ruby-constant">Interval</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">il</span>,<span class="ruby-identifier">ir</span>);
 1300     <span class="ruby-keyword">end</span>
 1301     <span class="ruby-comment">#puts &quot;m.getClass() = &quot; + m.getClass().getName().to_s;</span>
 1302     <span class="ruby-keyword">if</span> <span class="ruby-identifier">m</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RealAlgebraicNumber</span>
 1303         <span class="ruby-identifier">mf</span> = <span class="ruby-constant">RealAlgebraicRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">m</span>.<span class="ruby-identifier">factory</span>().<span class="ruby-identifier">algebraic</span>.<span class="ruby-identifier">modul</span>,<span class="ruby-identifier">i</span>);
 1304     <span class="ruby-keyword">else</span>
 1305         <span class="ruby-identifier">mf</span> = <span class="ruby-constant">RealAlgebraicRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">m</span>,<span class="ruby-identifier">i</span>);
 1306     <span class="ruby-keyword">end</span>
 1307     <span class="ruby-keyword">if</span> <span class="ruby-identifier">r</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
 1308         <span class="ruby-identifier">rr</span> = <span class="ruby-constant">RealAlgebraicNumber</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">mf</span>);
 1309     <span class="ruby-keyword">else</span>
 1310         <span class="ruby-identifier">rr</span> = <span class="ruby-constant">RealAlgebraicNumber</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">mf</span>,<span class="ruby-identifier">r</span>);
 1311     <span class="ruby-keyword">end</span>
 1312     <span class="ruby-keyword">return</span> <span class="ruby-constant">RingElem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">rr</span>);
 1313 <span class="ruby-keyword">end</span></pre>
 1314           </div>
 1315           
 1316         </div>
 1317 
 1318         
 1319 
 1320         
 1321       </div>
 1322 
 1323     
 1324       <div id="method-i-SLC" class="method-detail ">
 1325         
 1326         <div class="method-heading">
 1327           <span class="method-name">SLC</span><span
 1328             class="method-args">(ideal,d=0,n=1)</span>
 1329           
 1330           <span class="method-click-advice">click to toggle source</span>
 1331           
 1332         </div>
 1333         
 1334 
 1335         <div class="method-description">
 1336           
 1337           <p>Create <a href="JAS.html">JAS</a> polynomial SolvableLocal as ring element.</p>
 1338           
 1339           
 1340 
 1341           
 1342           <div class="method-source-code" id="SLC-source">
 1343             <pre><span class="ruby-comment"># File examples/jas.rb, line 2467</span>
 1344 <span class="ruby-keyword">def</span> <span class="ruby-constant">SLC</span>(<span class="ruby-identifier">ideal</span>,<span class="ruby-identifier">d</span>=<span class="ruby-value">0</span>,<span class="ruby-identifier">n</span>=<span class="ruby-value">1</span>)
 1345     <span class="ruby-keyword">if</span> <span class="ruby-identifier">ideal</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">nil</span>
 1346         <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">&quot;No ideal given.&quot;</span>
 1347     <span class="ruby-keyword">end</span>
 1348     <span class="ruby-keyword">if</span> <span class="ruby-identifier">ideal</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">SolvIdeal</span>
 1349         <span class="ruby-identifier">ideal</span> = <span class="ruby-constant">SolvableIdeal</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ideal</span>.<span class="ruby-identifier">pset</span>);
 1350         <span class="ruby-comment">#ideal.doGB();</span>
 1351     <span class="ruby-keyword">end</span>
 1352     <span class="ruby-comment">#puts &quot;ideal.getList().get(0).ring.ideal = #{ideal.getList().get(0).ring.ideal}\n&quot;;</span>
 1353     <span class="ruby-keyword">if</span> <span class="ruby-identifier">ideal</span>.<span class="ruby-identifier">getList</span>().<span class="ruby-identifier">get</span>(<span class="ruby-value">0</span>).<span class="ruby-identifier">ring</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">SolvableLocalRing</span>
 1354         <span class="ruby-identifier">lc</span> = <span class="ruby-constant">SolvableLocalRing</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">ideal</span>.<span class="ruby-identifier">getList</span>().<span class="ruby-identifier">get</span>(<span class="ruby-value">0</span>).<span class="ruby-identifier">ring</span>.<span class="ruby-identifier">ideal</span> );
 1355     <span class="ruby-keyword">else</span>
 1356         <span class="ruby-identifier">lc</span> = <span class="ruby-constant">SolvableLocalRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ideal</span>);
 1357     <span class="ruby-keyword">end</span>
 1358     <span class="ruby-keyword">if</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span>
 1359         <span class="ruby-keyword">if</span> <span class="ruby-identifier">n</span> <span class="ruby-operator">!=</span> <span class="ruby-value">1</span>
 1360             <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;#{n} ignored\n&quot;</span>;
 1361         <span class="ruby-keyword">end</span>
 1362         <span class="ruby-keyword">if</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>
 1363             <span class="ruby-identifier">n</span> = <span class="ruby-identifier">d</span>[<span class="ruby-value">1</span>];
 1364         <span class="ruby-keyword">end</span>
 1365         <span class="ruby-identifier">d</span> = <span class="ruby-identifier">d</span>[<span class="ruby-value">0</span>];
 1366     <span class="ruby-keyword">end</span>
 1367     <span class="ruby-keyword">if</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 1368         <span class="ruby-identifier">d</span> = <span class="ruby-identifier">d</span>.<span class="ruby-identifier">elem</span>;
 1369     <span class="ruby-keyword">end</span>
 1370     <span class="ruby-keyword">if</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 1371         <span class="ruby-identifier">n</span> = <span class="ruby-identifier">n</span>.<span class="ruby-identifier">elem</span>;
 1372     <span class="ruby-keyword">end</span>
 1373     <span class="ruby-keyword">if</span> <span class="ruby-identifier">d</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
 1374         <span class="ruby-identifier">r</span> = <span class="ruby-constant">SolvableLocal</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">lc</span>);
 1375     <span class="ruby-keyword">else</span>
 1376         <span class="ruby-keyword">if</span> <span class="ruby-identifier">n</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
 1377             <span class="ruby-identifier">r</span> = <span class="ruby-constant">SolvableLocal</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">lc</span>,<span class="ruby-identifier">d</span>);
 1378         <span class="ruby-keyword">else</span>
 1379             <span class="ruby-identifier">r</span> = <span class="ruby-constant">SolvableLocal</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">lc</span>,<span class="ruby-identifier">d</span>,<span class="ruby-identifier">n</span>);
 1380         <span class="ruby-keyword">end</span>
 1381     <span class="ruby-keyword">end</span>
 1382     <span class="ruby-keyword">return</span> <span class="ruby-constant">RingElem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">r</span>);
 1383 <span class="ruby-keyword">end</span></pre>
 1384           </div>
 1385           
 1386         </div>
 1387 
 1388         
 1389 
 1390         
 1391       </div>
 1392 
 1393     
 1394       <div id="method-i-SLR" class="method-detail ">
 1395         
 1396         <div class="method-heading">
 1397           <span class="method-name">SLR</span><span
 1398             class="method-args">(ideal,d=0,n=1)</span>
 1399           
 1400           <span class="method-click-advice">click to toggle source</span>
 1401           
 1402         </div>
 1403         
 1404 
 1405         <div class="method-description">
 1406           
 1407           <p>Create <a href="JAS.html">JAS</a> polynomial SolvableLocalResidue as ring
 1408 element.</p>
 1409           
 1410           
 1411 
 1412           
 1413           <div class="method-source-code" id="SLR-source">
 1414             <pre><span class="ruby-comment"># File examples/jas.rb, line 2512</span>
 1415 <span class="ruby-keyword">def</span> <span class="ruby-constant">SLR</span>(<span class="ruby-identifier">ideal</span>,<span class="ruby-identifier">d</span>=<span class="ruby-value">0</span>,<span class="ruby-identifier">n</span>=<span class="ruby-value">1</span>)
 1416     <span class="ruby-keyword">if</span> <span class="ruby-identifier">ideal</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">nil</span>
 1417         <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">&quot;No ideal given.&quot;</span>
 1418     <span class="ruby-keyword">end</span>
 1419     <span class="ruby-keyword">if</span> <span class="ruby-identifier">ideal</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">SolvIdeal</span>
 1420         <span class="ruby-identifier">ideal</span> = <span class="ruby-constant">SolvableIdeal</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ideal</span>.<span class="ruby-identifier">pset</span>);
 1421         <span class="ruby-comment">#ideal.doGB();</span>
 1422     <span class="ruby-keyword">end</span>
 1423     <span class="ruby-identifier">cfr</span> = <span class="ruby-identifier">ideal</span>.<span class="ruby-identifier">getList</span>().<span class="ruby-identifier">get</span>(<span class="ruby-value">0</span>).<span class="ruby-identifier">ring</span>;
 1424     <span class="ruby-comment">#puts &quot;ideal.getList().get(0).ring.ideal = #{ideal.getList().get(0).ring.ideal}\n&quot;;</span>
 1425     <span class="ruby-keyword">if</span> <span class="ruby-identifier">n</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">true</span>
 1426        <span class="ruby-identifier">isfield</span> = <span class="ruby-keyword">true</span>;
 1427        <span class="ruby-identifier">n</span> = <span class="ruby-value">1</span>;
 1428     <span class="ruby-keyword">end</span>
 1429     <span class="ruby-keyword">if</span> <span class="ruby-identifier">cfr</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">SolvableLocalResidueRing</span>
 1430         <span class="ruby-identifier">lc</span> = <span class="ruby-constant">SolvableLocalResidueRing</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">cfr</span>.<span class="ruby-identifier">ideal</span> );
 1431     <span class="ruby-keyword">else</span>
 1432         <span class="ruby-identifier">lc</span> = <span class="ruby-constant">SolvableLocalResidueRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ideal</span>);
 1433     <span class="ruby-keyword">end</span>
 1434     <span class="ruby-keyword">if</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span>
 1435         <span class="ruby-keyword">if</span> <span class="ruby-identifier">n</span> <span class="ruby-operator">!=</span> <span class="ruby-value">1</span>
 1436             <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;#{n} ignored\n&quot;</span>;
 1437         <span class="ruby-keyword">end</span>
 1438         <span class="ruby-keyword">if</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>
 1439             <span class="ruby-identifier">n</span> = <span class="ruby-identifier">d</span>[<span class="ruby-value">1</span>];
 1440         <span class="ruby-keyword">end</span>
 1441         <span class="ruby-identifier">d</span> = <span class="ruby-identifier">d</span>[<span class="ruby-value">0</span>];
 1442     <span class="ruby-keyword">end</span>
 1443     <span class="ruby-keyword">if</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 1444         <span class="ruby-identifier">d</span> = <span class="ruby-identifier">d</span>.<span class="ruby-identifier">elem</span>;
 1445     <span class="ruby-keyword">end</span>
 1446     <span class="ruby-keyword">if</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 1447         <span class="ruby-identifier">n</span> = <span class="ruby-identifier">n</span>.<span class="ruby-identifier">elem</span>;
 1448     <span class="ruby-keyword">end</span>
 1449     <span class="ruby-keyword">if</span> <span class="ruby-identifier">d</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
 1450         <span class="ruby-identifier">r</span> = <span class="ruby-constant">SolvableLocalResidue</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">lc</span>);
 1451     <span class="ruby-keyword">else</span>
 1452         <span class="ruby-keyword">if</span> <span class="ruby-identifier">n</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
 1453             <span class="ruby-identifier">r</span> = <span class="ruby-constant">SolvableLocalResidue</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">lc</span>,<span class="ruby-identifier">d</span>);
 1454         <span class="ruby-keyword">else</span>
 1455             <span class="ruby-identifier">r</span> = <span class="ruby-constant">SolvableLocalResidue</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">lc</span>,<span class="ruby-identifier">d</span>,<span class="ruby-identifier">n</span>);
 1456         <span class="ruby-keyword">end</span>
 1457     <span class="ruby-keyword">end</span>
 1458     <span class="ruby-keyword">return</span> <span class="ruby-constant">RingElem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">r</span>);
 1459 <span class="ruby-keyword">end</span></pre>
 1460           </div>
 1461           
 1462         </div>
 1463 
 1464         
 1465 
 1466         
 1467       </div>
 1468 
 1469     
 1470       <div id="method-i-SRC" class="method-detail ">
 1471         
 1472         <div class="method-heading">
 1473           <span class="method-name">SRC</span><span
 1474             class="method-args">(ideal,r=0)</span>
 1475           
 1476           <span class="method-click-advice">click to toggle source</span>
 1477           
 1478         </div>
 1479         
 1480 
 1481         <div class="method-description">
 1482           
 1483           <p>Create <a href="JAS.html">JAS</a> polynomial SolvableResidue as ring
 1484 element.</p>
 1485           
 1486           
 1487 
 1488           
 1489           <div class="method-source-code" id="SRC-source">
 1490             <pre><span class="ruby-comment"># File examples/jas.rb, line 2436</span>
 1491 <span class="ruby-keyword">def</span> <span class="ruby-constant">SRC</span>(<span class="ruby-identifier">ideal</span>,<span class="ruby-identifier">r</span>=<span class="ruby-value">0</span>)
 1492     <span class="ruby-keyword">if</span> <span class="ruby-identifier">ideal</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">nil</span>
 1493         <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">&quot;No ideal given.&quot;</span>
 1494     <span class="ruby-keyword">end</span>
 1495     <span class="ruby-keyword">if</span> <span class="ruby-identifier">ideal</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">SolvIdeal</span>
 1496         <span class="ruby-comment">#puts &quot;ideal.pset = &quot; + str(ideal.pset) + &quot;\n&quot;;</span>
 1497         <span class="ruby-comment">#ideal = Java::EduJasApplication::Ideal.new(ideal.ring,ideal.list);</span>
 1498         <span class="ruby-identifier">ideal</span> = <span class="ruby-constant">SolvableIdeal</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ideal</span>.<span class="ruby-identifier">pset</span>);
 1499         <span class="ruby-comment">#ideal.doGB();</span>
 1500     <span class="ruby-keyword">end</span>
 1501     <span class="ruby-comment">#puts &quot;ideal.getList().get(0).ring.ideal = #{ideal.getList().get(0).ring.ideal}\n&quot;;</span>
 1502     <span class="ruby-keyword">if</span> <span class="ruby-identifier">ideal</span>.<span class="ruby-identifier">getList</span>().<span class="ruby-identifier">get</span>(<span class="ruby-value">0</span>).<span class="ruby-identifier">ring</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">SolvableResidueRing</span>
 1503         <span class="ruby-identifier">rc</span> = <span class="ruby-constant">SolvableResidueRing</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">ideal</span>.<span class="ruby-identifier">getList</span>().<span class="ruby-identifier">get</span>(<span class="ruby-value">0</span>).<span class="ruby-identifier">ring</span>.<span class="ruby-identifier">ideal</span> );
 1504     <span class="ruby-keyword">else</span>
 1505         <span class="ruby-identifier">rc</span> = <span class="ruby-constant">SolvableResidueRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ideal</span>);
 1506     <span class="ruby-keyword">end</span>
 1507     <span class="ruby-keyword">if</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 1508         <span class="ruby-identifier">r</span> = <span class="ruby-identifier">r</span>.<span class="ruby-identifier">elem</span>;
 1509     <span class="ruby-keyword">end</span>
 1510     <span class="ruby-keyword">if</span> <span class="ruby-identifier">r</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
 1511         <span class="ruby-identifier">r</span> = <span class="ruby-constant">SolvableResidue</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">rc</span>);
 1512     <span class="ruby-keyword">else</span>
 1513         <span class="ruby-identifier">r</span> = <span class="ruby-constant">SolvableResidue</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">rc</span>,<span class="ruby-identifier">r</span>);
 1514     <span class="ruby-keyword">end</span>
 1515     <span class="ruby-keyword">return</span> <span class="ruby-constant">RingElem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">r</span>);
 1516 <span class="ruby-keyword">end</span></pre>
 1517           </div>
 1518           
 1519         </div>
 1520 
 1521         
 1522 
 1523         
 1524       </div>
 1525 
 1526     
 1527       <div id="method-i-SRF" class="method-detail ">
 1528         
 1529         <div class="method-heading">
 1530           <span class="method-name">SRF</span><span
 1531             class="method-args">(pr,d=0,n=1)</span>
 1532           
 1533           <span class="method-click-advice">click to toggle source</span>
 1534           
 1535         </div>
 1536         
 1537 
 1538         <div class="method-description">
 1539           
 1540           <p>Create <a href="JAS.html">JAS</a> rational function SolvableQuotient as
 1541 ring element.</p>
 1542           
 1543           
 1544 
 1545           
 1546           <div class="method-source-code" id="SRF-source">
 1547             <pre><span class="ruby-comment"># File examples/jas.rb, line 2297</span>
 1548 <span class="ruby-keyword">def</span> <span class="ruby-constant">SRF</span>(<span class="ruby-identifier">pr</span>,<span class="ruby-identifier">d</span>=<span class="ruby-value">0</span>,<span class="ruby-identifier">n</span>=<span class="ruby-value">1</span>)
 1549     <span class="ruby-keyword">if</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span>
 1550         <span class="ruby-keyword">if</span> <span class="ruby-identifier">n</span> <span class="ruby-operator">!=</span> <span class="ruby-value">1</span>
 1551             <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;#{} ignored\n&quot;</span>;
 1552         <span class="ruby-keyword">end</span>
 1553         <span class="ruby-keyword">if</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>
 1554             <span class="ruby-identifier">n</span> = <span class="ruby-identifier">d</span>[<span class="ruby-value">1</span>];
 1555         <span class="ruby-keyword">end</span>
 1556         <span class="ruby-identifier">d</span> = <span class="ruby-identifier">d</span>[<span class="ruby-value">0</span>];
 1557     <span class="ruby-keyword">end</span>
 1558     <span class="ruby-keyword">if</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 1559         <span class="ruby-identifier">d</span> = <span class="ruby-identifier">d</span>.<span class="ruby-identifier">elem</span>;
 1560     <span class="ruby-keyword">end</span>
 1561     <span class="ruby-keyword">if</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 1562         <span class="ruby-identifier">n</span> = <span class="ruby-identifier">n</span>.<span class="ruby-identifier">elem</span>;
 1563     <span class="ruby-keyword">end</span>
 1564     <span class="ruby-keyword">if</span> <span class="ruby-identifier">pr</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 1565         <span class="ruby-identifier">pr</span> = <span class="ruby-identifier">pr</span>.<span class="ruby-identifier">elem</span>;
 1566     <span class="ruby-keyword">end</span>
 1567     <span class="ruby-keyword">if</span> <span class="ruby-identifier">pr</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Ring</span>
 1568         <span class="ruby-identifier">pr</span> = <span class="ruby-identifier">pr</span>.<span class="ruby-identifier">ring</span>;
 1569     <span class="ruby-keyword">end</span>
 1570     <span class="ruby-identifier">qr</span> = <span class="ruby-constant">SolvableQuotientRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">pr</span>);
 1571     <span class="ruby-comment">#puts &quot;qr is associative: &quot; + qr.isAssociative().to_s;</span>
 1572     <span class="ruby-comment">#if not qr.isAssociative()</span>
 1573     <span class="ruby-comment">#   puts &quot;warning: qr is not associative&quot;;</span>
 1574     <span class="ruby-comment">#end</span>
 1575     <span class="ruby-keyword">if</span> <span class="ruby-identifier">d</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
 1576         <span class="ruby-identifier">r</span> = <span class="ruby-constant">SolvableQuotient</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">qr</span>);
 1577     <span class="ruby-keyword">else</span>
 1578         <span class="ruby-keyword">if</span> <span class="ruby-identifier">n</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
 1579             <span class="ruby-identifier">r</span> = <span class="ruby-constant">SolvableQuotient</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">qr</span>,<span class="ruby-identifier">d</span>);
 1580         <span class="ruby-keyword">else</span>
 1581             <span class="ruby-identifier">r</span> = <span class="ruby-constant">SolvableQuotient</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">qr</span>,<span class="ruby-identifier">d</span>,<span class="ruby-identifier">n</span>);
 1582         <span class="ruby-keyword">end</span>
 1583     <span class="ruby-keyword">end</span>
 1584     <span class="ruby-keyword">return</span> <span class="ruby-constant">RingElem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">r</span>);
 1585 <span class="ruby-keyword">end</span></pre>
 1586           </div>
 1587           
 1588         </div>
 1589 
 1590         
 1591 
 1592         
 1593       </div>
 1594 
 1595     
 1596       <div id="method-i-Vec" class="method-detail ">
 1597         
 1598         <div class="method-heading">
 1599           <span class="method-name">Vec</span><span
 1600             class="method-args">(cofac,n,v=nil)</span>
 1601           
 1602           <span class="method-click-advice">click to toggle source</span>
 1603           
 1604         </div>
 1605         
 1606 
 1607         <div class="method-description">
 1608           
 1609           <p>Create <a href="JAS.html">JAS</a> GenVector ring element.</p>
 1610           
 1611           
 1612 
 1613           
 1614           <div class="method-source-code" id="Vec-source">
 1615             <pre><span class="ruby-comment"># File examples/jas.rb, line 5465</span>
 1616 <span class="ruby-keyword">def</span> <span class="ruby-constant">Vec</span>(<span class="ruby-identifier">cofac</span>,<span class="ruby-identifier">n</span>,<span class="ruby-identifier">v</span>=<span class="ruby-keyword">nil</span>)
 1617     <span class="ruby-identifier">cf</span> = <span class="ruby-identifier">cofac</span>;
 1618     <span class="ruby-keyword">if</span> <span class="ruby-identifier">cofac</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 1619         <span class="ruby-identifier">cf</span> = <span class="ruby-identifier">cofac</span>.<span class="ruby-identifier">elem</span>.<span class="ruby-identifier">factory</span>();
 1620     <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">cofac</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Ring</span>
 1621         <span class="ruby-identifier">cf</span> = <span class="ruby-identifier">cofac</span>.<span class="ruby-identifier">ring</span>;
 1622     <span class="ruby-keyword">end</span>
 1623     <span class="ruby-keyword">if</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 1624         <span class="ruby-identifier">n</span> = <span class="ruby-identifier">n</span>.<span class="ruby-identifier">elem</span>;
 1625     <span class="ruby-keyword">end</span>
 1626     <span class="ruby-keyword">if</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 1627         <span class="ruby-identifier">v</span> = <span class="ruby-identifier">v</span>.<span class="ruby-identifier">elem</span>;
 1628     <span class="ruby-keyword">end</span>
 1629     <span class="ruby-identifier">vr</span> = <span class="ruby-constant">GenVectorModul</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">cf</span>,<span class="ruby-identifier">n</span>);
 1630     <span class="ruby-keyword">if</span> <span class="ruby-identifier">v</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">nil</span>
 1631         <span class="ruby-identifier">r</span> = <span class="ruby-constant">GenVector</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">vr</span>);
 1632     <span class="ruby-keyword">else</span>
 1633         <span class="ruby-identifier">r</span> = <span class="ruby-constant">GenVector</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">vr</span>,<span class="ruby-identifier">v</span>);
 1634     <span class="ruby-keyword">end</span>
 1635     <span class="ruby-keyword">return</span> <span class="ruby-constant">RingElem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">r</span>);
 1636 <span class="ruby-keyword">end</span></pre>
 1637           </div>
 1638           
 1639         </div>
 1640 
 1641         
 1642 
 1643         
 1644       </div>
 1645 
 1646     
 1647       <div id="method-i-WRC" class="method-detail ">
 1648         
 1649         <div class="method-heading">
 1650           <span class="method-name">WRC</span><span
 1651             class="method-args">(ideal,r=0)</span>
 1652           
 1653           <span class="method-click-advice">click to toggle source</span>
 1654           
 1655         </div>
 1656         
 1657 
 1658         <div class="method-description">
 1659           
 1660           <p>Create <a href="JAS.html">JAS</a> polynomial WordResidue as ring element.</p>
 1661           
 1662           
 1663 
 1664           
 1665           <div class="method-source-code" id="WRC-source">
 1666             <pre><span class="ruby-comment"># File examples/jas.rb, line 5914</span>
 1667 <span class="ruby-keyword">def</span> <span class="ruby-constant">WRC</span>(<span class="ruby-identifier">ideal</span>,<span class="ruby-identifier">r</span>=<span class="ruby-value">0</span>)
 1668     <span class="ruby-keyword">if</span> <span class="ruby-identifier">ideal</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">nil</span>
 1669         <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">&quot;No ideal given.&quot;</span>
 1670     <span class="ruby-keyword">end</span>
 1671     <span class="ruby-keyword">if</span> <span class="ruby-identifier">ideal</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">WordPolyIdeal</span>
 1672         <span class="ruby-comment">#puts &quot;ideal = &quot; + str(ideal) + &quot;\n&quot;;</span>
 1673         <span class="ruby-comment">#ideal = Java::EduJasApplication::WordIdeal.new(ideal.ring,ideal.list);</span>
 1674         <span class="ruby-identifier">ideal</span> = <span class="ruby-identifier">ideal</span>.<span class="ruby-identifier">ideal</span>;
 1675         <span class="ruby-comment">#ideal.doGB();</span>
 1676     <span class="ruby-keyword">end</span>
 1677     <span class="ruby-keyword">if</span> <span class="ruby-keyword">not</span> <span class="ruby-identifier">ideal</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">WordIdeal</span>
 1678         <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">&quot;No word ideal given.&quot;</span>
 1679     <span class="ruby-keyword">end</span>
 1680     <span class="ruby-comment">#puts &quot;ideal.getList().get(0).ring.ideal = #{ideal.getList().get(0).ring.ideal}\n&quot;;</span>
 1681     <span class="ruby-keyword">if</span> <span class="ruby-identifier">ideal</span>.<span class="ruby-identifier">getList</span>().<span class="ruby-identifier">get</span>(<span class="ruby-value">0</span>).<span class="ruby-identifier">ring</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">WordResidueRing</span>
 1682         <span class="ruby-identifier">rc</span> = <span class="ruby-constant">WordResidueRing</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">ideal</span>.<span class="ruby-identifier">getList</span>().<span class="ruby-identifier">get</span>(<span class="ruby-value">0</span>).<span class="ruby-identifier">ring</span>.<span class="ruby-identifier">ideal</span> );
 1683     <span class="ruby-keyword">else</span>
 1684         <span class="ruby-identifier">rc</span> = <span class="ruby-constant">WordResidueRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ideal</span>);
 1685     <span class="ruby-keyword">end</span>
 1686     <span class="ruby-keyword">if</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 1687         <span class="ruby-identifier">r</span> = <span class="ruby-identifier">r</span>.<span class="ruby-identifier">elem</span>;
 1688     <span class="ruby-keyword">end</span>
 1689     <span class="ruby-keyword">if</span> <span class="ruby-identifier">r</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
 1690         <span class="ruby-identifier">r</span> = <span class="ruby-constant">WordResidue</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">rc</span>);
 1691     <span class="ruby-keyword">else</span>
 1692         <span class="ruby-identifier">r</span> = <span class="ruby-constant">WordResidue</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">rc</span>,<span class="ruby-identifier">r</span>);
 1693     <span class="ruby-keyword">end</span>
 1694     <span class="ruby-keyword">return</span> <span class="ruby-constant">RingElem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">r</span>);
 1695 <span class="ruby-keyword">end</span></pre>
 1696           </div>
 1697           
 1698         </div>
 1699 
 1700         
 1701 
 1702         
 1703       </div>
 1704 
 1705     
 1706       <div id="method-i-ZM" class="method-detail ">
 1707         
 1708         <div class="method-heading">
 1709           <span class="method-name">ZM</span><span
 1710             class="method-args">(m,z=0,field=false)</span>
 1711           
 1712           <span class="method-click-advice">click to toggle source</span>
 1713           
 1714         </div>
 1715         
 1716 
 1717         <div class="method-description">
 1718           
 1719           <p>Create <a href="JAS.html">JAS</a> ModInteger as ring element.</p>
 1720           
 1721           
 1722 
 1723           
 1724           <div class="method-source-code" id="ZM-source">
 1725             <pre><span class="ruby-comment"># File examples/jas.rb, line 204</span>
 1726 <span class="ruby-keyword">def</span> <span class="ruby-constant">ZM</span>(<span class="ruby-identifier">m</span>,<span class="ruby-identifier">z</span>=<span class="ruby-value">0</span>,<span class="ruby-identifier">field</span>=<span class="ruby-keyword">false</span>)
 1727     <span class="ruby-keyword">if</span> <span class="ruby-identifier">m</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 1728         <span class="ruby-identifier">m</span> = <span class="ruby-identifier">m</span>.<span class="ruby-identifier">elem</span>;
 1729     <span class="ruby-keyword">end</span>
 1730     <span class="ruby-keyword">if</span> <span class="ruby-identifier">z</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 1731         <span class="ruby-identifier">z</span> = <span class="ruby-identifier">z</span>.<span class="ruby-identifier">elem</span>;
 1732     <span class="ruby-keyword">end</span>
 1733     <span class="ruby-keyword">if</span> <span class="ruby-identifier">z</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span> <span class="ruby-keyword">and</span> ( <span class="ruby-identifier">z</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">true</span> <span class="ruby-keyword">or</span> <span class="ruby-identifier">z</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">false</span> )
 1734         <span class="ruby-identifier">field</span> = <span class="ruby-identifier">z</span>;
 1735         <span class="ruby-identifier">z</span> = <span class="ruby-value">0</span>;
 1736     <span class="ruby-keyword">end</span>
 1737     <span class="ruby-keyword">if</span> <span class="ruby-identifier">m</span> <span class="ruby-operator">&lt;</span> <span class="ruby-constant">ModLongRing</span><span class="ruby-operator">::</span><span class="ruby-constant">MAX_LONG</span> 
 1738       <span class="ruby-keyword">if</span> <span class="ruby-identifier">m</span> <span class="ruby-operator">&lt;</span> <span class="ruby-constant">ModIntRing</span><span class="ruby-operator">::</span><span class="ruby-constant">MAX_INT</span>
 1739         <span class="ruby-keyword">if</span> <span class="ruby-identifier">field</span>
 1740           <span class="ruby-identifier">mf</span> = <span class="ruby-constant">ModIntRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">m</span>,<span class="ruby-identifier">field</span>);
 1741         <span class="ruby-keyword">else</span>
 1742           <span class="ruby-identifier">mf</span> = <span class="ruby-constant">ModIntRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">m</span>);
 1743         <span class="ruby-keyword">end</span>
 1744         <span class="ruby-identifier">r</span> = <span class="ruby-constant">ModInt</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">mf</span>,<span class="ruby-identifier">z</span>);
 1745       <span class="ruby-keyword">else</span>
 1746         <span class="ruby-keyword">if</span> <span class="ruby-identifier">field</span>
 1747           <span class="ruby-identifier">mf</span> = <span class="ruby-constant">ModLongRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">m</span>,<span class="ruby-identifier">field</span>);
 1748         <span class="ruby-keyword">else</span>
 1749           <span class="ruby-identifier">mf</span> = <span class="ruby-constant">ModLongRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">m</span>);
 1750         <span class="ruby-keyword">end</span>
 1751         <span class="ruby-identifier">r</span> = <span class="ruby-constant">ModLong</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">mf</span>,<span class="ruby-identifier">z</span>);
 1752       <span class="ruby-keyword">end</span>
 1753     <span class="ruby-keyword">else</span>
 1754        <span class="ruby-keyword">if</span> <span class="ruby-identifier">field</span>
 1755           <span class="ruby-identifier">mf</span> = <span class="ruby-constant">ModIntegerRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">m</span>,<span class="ruby-identifier">field</span>);
 1756        <span class="ruby-keyword">else</span>
 1757           <span class="ruby-identifier">mf</span> = <span class="ruby-constant">ModIntegerRing</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">m</span>);
 1758        <span class="ruby-keyword">end</span>
 1759        <span class="ruby-identifier">r</span> = <span class="ruby-constant">ModInteger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">mf</span>,<span class="ruby-identifier">z</span>);
 1760     <span class="ruby-keyword">end</span>
 1761     <span class="ruby-keyword">return</span> <span class="ruby-constant">RingElem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">r</span>);
 1762 <span class="ruby-keyword">end</span></pre>
 1763           </div>
 1764           
 1765         </div>
 1766 
 1767         
 1768 
 1769         
 1770       </div>
 1771 
 1772     
 1773       <div id="method-i-ZMI" class="method-detail ">
 1774         
 1775         <div class="method-heading">
 1776           <span class="method-name">ZMI</span><span
 1777             class="method-args">(m,z=0,field=false)</span>
 1778           
 1779           <span class="method-click-advice">click to toggle source</span>
 1780           
 1781         </div>
 1782         
 1783 
 1784         <div class="method-description">
 1785           
 1786           <p>Create <a href="JAS.html">JAS</a> ModInt as ring element.</p>
 1787           
 1788           
 1789 
 1790           
 1791           <div class="method-source-code" id="ZMI-source">
 1792             <pre><span class="ruby-comment"># File examples/jas.rb, line 252</span>
 1793 <span class="ruby-keyword">def</span> <span class="ruby-constant">ZMI</span>(<span class="ruby-identifier">m</span>,<span class="ruby-identifier">z</span>=<span class="ruby-value">0</span>,<span class="ruby-identifier">field</span>=<span class="ruby-keyword">false</span>)
 1794     <span class="ruby-keyword">return</span> <span class="ruby-constant">ZM</span>(<span class="ruby-identifier">m</span>,<span class="ruby-identifier">z</span>,<span class="ruby-identifier">field</span>);
 1795 <span class="ruby-keyword">end</span></pre>
 1796           </div>
 1797           
 1798         </div>
 1799 
 1800         
 1801 
 1802         
 1803       </div>
 1804 
 1805     
 1806       <div id="method-i-ZML" class="method-detail ">
 1807         
 1808         <div class="method-heading">
 1809           <span class="method-name">ZML</span><span
 1810             class="method-args">(m,z=0,field=false)</span>
 1811           
 1812           <span class="method-click-advice">click to toggle source</span>
 1813           
 1814         </div>
 1815         
 1816 
 1817         <div class="method-description">
 1818           
 1819           <p>Create <a href="JAS.html">JAS</a> ModLong as ring element.</p>
 1820           
 1821           
 1822 
 1823           
 1824           <div class="method-source-code" id="ZML-source">
 1825             <pre><span class="ruby-comment"># File examples/jas.rb, line 245</span>
 1826 <span class="ruby-keyword">def</span> <span class="ruby-constant">ZML</span>(<span class="ruby-identifier">m</span>,<span class="ruby-identifier">z</span>=<span class="ruby-value">0</span>,<span class="ruby-identifier">field</span>=<span class="ruby-keyword">false</span>)
 1827     <span class="ruby-keyword">return</span> <span class="ruby-constant">ZM</span>(<span class="ruby-identifier">m</span>,<span class="ruby-identifier">z</span>,<span class="ruby-identifier">field</span>);
 1828 <span class="ruby-keyword">end</span></pre>
 1829           </div>
 1830           
 1831         </div>
 1832 
 1833         
 1834 
 1835         
 1836       </div>
 1837 
 1838     
 1839       <div id="method-i-ZZ" class="method-detail ">
 1840         
 1841         <div class="method-heading">
 1842           <span class="method-name">ZZ</span><span
 1843             class="method-args">(z=0)</span>
 1844           
 1845           <span class="method-click-advice">click to toggle source</span>
 1846           
 1847         </div>
 1848         
 1849 
 1850         <div class="method-description">
 1851           
 1852           <p>Create <a href="JAS.html">JAS</a> BigInteger as ring element.</p>
 1853           
 1854           
 1855 
 1856           
 1857           <div class="method-source-code" id="ZZ-source">
 1858             <pre><span class="ruby-comment"># File examples/jas.rb, line 187</span>
 1859 <span class="ruby-keyword">def</span> <span class="ruby-constant">ZZ</span>(<span class="ruby-identifier">z</span>=<span class="ruby-value">0</span>)
 1860     <span class="ruby-keyword">if</span> <span class="ruby-identifier">z</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 1861         <span class="ruby-identifier">z</span> = <span class="ruby-identifier">z</span>.<span class="ruby-identifier">elem</span>;
 1862     <span class="ruby-keyword">end</span>
 1863     <span class="ruby-keyword">if</span> <span class="ruby-identifier">z</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span> 
 1864        <span class="ruby-identifier">r</span> = <span class="ruby-constant">Java</span><span class="ruby-operator">::</span><span class="ruby-constant">EduJasArith</span><span class="ruby-operator">::</span><span class="ruby-constant">BigInteger</span>.<span class="ruby-identifier">new</span>();
 1865     <span class="ruby-keyword">else</span>
 1866        <span class="ruby-comment">#puts &quot;z = #{z} : #{z.class} &quot; </span>
 1867        <span class="ruby-identifier">r</span> = <span class="ruby-constant">Java</span><span class="ruby-operator">::</span><span class="ruby-constant">EduJasArith</span><span class="ruby-operator">::</span><span class="ruby-constant">BigInteger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">z</span>);
 1868     <span class="ruby-keyword">end</span>
 1869     <span class="ruby-keyword">return</span> <span class="ruby-constant">RingElem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">r</span>);
 1870 <span class="ruby-keyword">end</span></pre>
 1871           </div>
 1872           
 1873         </div>
 1874 
 1875         
 1876 
 1877         
 1878       </div>
 1879 
 1880     
 1881       <div id="method-i-inject_gens" class="method-detail ">
 1882         
 1883         <div class="method-heading">
 1884           <span class="method-name">inject_gens</span><span
 1885             class="method-args">(env)</span>
 1886           
 1887           <span class="method-click-advice">click to toggle source</span>
 1888           
 1889         </div>
 1890         
 1891 
 1892         <div class="method-description">
 1893           
 1894           <p>Inject variables for generators in given environment.</p>
 1895           
 1896           
 1897 
 1898           
 1899           <div class="method-source-code" id="inject_gens-source">
 1900             <pre><span class="ruby-comment"># File examples/jas.rb, line 64</span>
 1901 <span class="ruby-keyword">def</span> <span class="ruby-identifier">inject_gens</span>(<span class="ruby-identifier">env</span>) 
 1902     <span class="ruby-identifier">env</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">instance_eval</span>( <span class="ruby-string">&quot;attr_accessor :generators;&quot;</span> )
 1903     <span class="ruby-keyword">if</span> <span class="ruby-identifier">env</span>.<span class="ruby-identifier">generators</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">nil</span>
 1904        <span class="ruby-identifier">env</span>.<span class="ruby-identifier">generators</span> = {};
 1905     <span class="ruby-keyword">end</span>
 1906     <span class="ruby-comment">#puts &quot;existing generators: &quot; + env.generators.keys().join(&quot;, &quot;);  </span>
 1907     <span class="ruby-identifier">redef</span> = []
 1908     <span class="ruby-keyword">for</span> <span class="ruby-identifier">i</span> <span class="ruby-keyword">in</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">gens</span>()
 1909        <span class="ruby-keyword">begin</span> 
 1910           <span class="ruby-identifier">ivs</span> = <span class="ruby-identifier">nameFromValue</span>(<span class="ruby-identifier">i</span>);
 1911           <span class="ruby-keyword">if</span> <span class="ruby-identifier">ivs</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">nil</span>
 1912              <span class="ruby-keyword">next</span>
 1913           <span class="ruby-keyword">end</span>;
 1914           <span class="ruby-comment">#puts &quot;string2: #{ivs} = &quot; + ivs.class.to_s;</span>
 1915           <span class="ruby-comment">#puts &quot;string3: #{ivs} = &quot; + (env.instance_eval( &quot;#{ivs};&quot; ));</span>
 1916           <span class="ruby-keyword">if</span> <span class="ruby-identifier">env</span>.<span class="ruby-identifier">generators</span>[ <span class="ruby-identifier">ivs</span> ] <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
 1917              <span class="ruby-comment">#puts &quot;redefining global variable #{ivs}&quot;;</span>
 1918              <span class="ruby-identifier">redef</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">ivs</span>;
 1919           <span class="ruby-keyword">end</span>
 1920           <span class="ruby-identifier">env</span>.<span class="ruby-identifier">generators</span>[ <span class="ruby-identifier">ivs</span> ] = <span class="ruby-identifier">i</span>;
 1921           <span class="ruby-identifier">env</span>.<span class="ruby-identifier">instance_eval</span>( <span class="ruby-node">&quot;def #{ivs}; @generators[ &#39;#{ivs}&#39; ]; end&quot;</span> )
 1922           <span class="ruby-comment">#puts &quot;def #{ivs}; @generators[ &#39;#{ivs}&#39; ]; end&quot;</span>
 1923           <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">auto_lowervar</span> 
 1924              <span class="ruby-identifier">first</span> = <span class="ruby-identifier">ivs</span>.<span class="ruby-identifier">slice</span>(<span class="ruby-value">0</span>,<span class="ruby-value">1</span>);
 1925              <span class="ruby-keyword">if</span> <span class="ruby-identifier">first</span>.<span class="ruby-identifier">count</span>(<span class="ruby-string">&#39;A-Z&#39;</span>) <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
 1926                 <span class="ruby-identifier">first</span> = <span class="ruby-identifier">first</span>.<span class="ruby-identifier">downcase</span>
 1927                 <span class="ruby-identifier">ivl</span> = <span class="ruby-identifier">first</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">ivs</span>.<span class="ruby-identifier">slice</span>(<span class="ruby-value">1</span>,<span class="ruby-identifier">ivs</span>.<span class="ruby-identifier">length</span>);
 1928                 <span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;warning: &#39;&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">str</span>(<span class="ruby-identifier">ivs</span>) <span class="ruby-operator">+</span> <span class="ruby-string">&quot;&#39; additionaly renamed to &#39;&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">str</span>(<span class="ruby-identifier">ivl</span>) <span class="ruby-operator">+</span> <span class="ruby-string">&quot;&#39; to avoid constant semantics&quot;</span>
 1929                 <span class="ruby-keyword">if</span> <span class="ruby-identifier">env</span>.<span class="ruby-identifier">generators</span>[ <span class="ruby-identifier">ivl</span> ] <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
 1930                    <span class="ruby-comment">#puts &quot;redefining global variable #{ivl}&quot;;</span>
 1931                    <span class="ruby-identifier">redef</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">ivl</span>;
 1932                 <span class="ruby-keyword">end</span>
 1933                 <span class="ruby-identifier">env</span>.<span class="ruby-identifier">instance_eval</span>( <span class="ruby-node">&quot;def #{ivl}; @generators[ &#39;#{ivs}&#39; ]; end&quot;</span> )
 1934              <span class="ruby-keyword">end</span>
 1935           <span class="ruby-keyword">end</span>
 1936        <span class="ruby-keyword">rescue</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span> 
 1937           <span class="ruby-comment">#puts &quot;error: #{ivs} = &quot; + i.to_s + &quot;, class = &quot; + i.class.to_s;</span>
 1938           <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;error: #{ivs} = &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">i</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-string">&quot;, e = &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">to_s</span>;
 1939        <span class="ruby-keyword">end</span>
 1940     <span class="ruby-keyword">end</span>
 1941     <span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;globally defined variables: &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">env</span>.<span class="ruby-identifier">generators</span>.<span class="ruby-identifier">keys</span>().<span class="ruby-identifier">join</span>(<span class="ruby-string">&quot;, &quot;</span>);  
 1942     <span class="ruby-keyword">if</span> <span class="ruby-identifier">redef</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
 1943        <span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;WARN: redefined variables: &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">redef</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">&quot;, &quot;</span>);  
 1944     <span class="ruby-keyword">end</span>
 1945  <span class="ruby-keyword">end</span></pre>
 1946           </div>
 1947           
 1948         </div>
 1949 
 1950         
 1951 
 1952         
 1953       </div>
 1954 
 1955     
 1956       <div id="method-i-makeJasArith" class="method-detail ">
 1957         
 1958         <div class="method-heading">
 1959           <span class="method-name">makeJasArith</span><span
 1960             class="method-args">(item)</span>
 1961           
 1962           <span class="method-click-advice">click to toggle source</span>
 1963           
 1964         </div>
 1965         
 1966 
 1967         <div class="method-description">
 1968           
 1969           <p>Construct a jas.arith object.</p>
 1970 
 1971 <p>If item is an ruby array then a BigComplex is constructed.  If item is a
 1972 ruby float then a BigDecimal is constructed.</p>
 1973           
 1974           
 1975 
 1976           
 1977           <div class="method-source-code" id="makeJasArith-source">
 1978             <pre><span class="ruby-comment"># File examples/jas.rb, line 2661</span>
 1979 <span class="ruby-keyword">def</span> <span class="ruby-identifier">makeJasArith</span>(<span class="ruby-identifier">item</span>)
 1980     <span class="ruby-comment">#puts &quot;item type(#{item}) = #{item.class}\n&quot;;</span>
 1981     <span class="ruby-keyword">if</span> <span class="ruby-identifier">item</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Integer</span>
 1982         <span class="ruby-keyword">return</span> <span class="ruby-constant">BigInteger</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">item</span> );
 1983     <span class="ruby-keyword">end</span>
 1984     <span class="ruby-keyword">if</span> <span class="ruby-identifier">item</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Rational</span>
 1985         <span class="ruby-keyword">return</span> <span class="ruby-constant">BigRational</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">item</span>.<span class="ruby-identifier">numerator</span> ).<span class="ruby-identifier">divide</span>( <span class="ruby-constant">BigRational</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">item</span>.<span class="ruby-identifier">denominator</span> ) );
 1986     <span class="ruby-keyword">end</span>
 1987     <span class="ruby-keyword">if</span> <span class="ruby-identifier">item</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Float</span>  <span class="ruby-comment"># ?? what to do ??</span>
 1988         <span class="ruby-keyword">return</span> <span class="ruby-constant">BigDecimal</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">item</span>.<span class="ruby-identifier">to_s</span> );
 1989     <span class="ruby-keyword">end</span>
 1990     <span class="ruby-keyword">if</span> <span class="ruby-identifier">item</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span>
 1991         <span class="ruby-keyword">if</span> <span class="ruby-identifier">item</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">2</span>
 1992             <span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;len(item) &gt; 2, remaining items ignored\n&quot;</span>;
 1993         <span class="ruby-keyword">end</span>
 1994         <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;item[0] type(#{item[0]}) = #{item[0].class}\n&quot;</span>;
 1995         <span class="ruby-keyword">if</span> <span class="ruby-identifier">item</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>
 1996             <span class="ruby-identifier">re</span> = <span class="ruby-identifier">makeJasArith</span>( <span class="ruby-identifier">item</span>[<span class="ruby-value">0</span>] );
 1997             <span class="ruby-keyword">if</span> <span class="ruby-keyword">not</span> <span class="ruby-identifier">re</span>.<span class="ruby-identifier">isField</span>()
 1998                 <span class="ruby-identifier">re</span> = <span class="ruby-constant">BigRational</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">re</span>.<span class="ruby-identifier">val</span> );
 1999             <span class="ruby-keyword">end</span>
 2000             <span class="ruby-identifier">im</span> = <span class="ruby-identifier">makeJasArith</span>( <span class="ruby-identifier">item</span>[<span class="ruby-value">1</span>] );
 2001             <span class="ruby-keyword">if</span> <span class="ruby-keyword">not</span> <span class="ruby-identifier">im</span>.<span class="ruby-identifier">isField</span>()
 2002                 <span class="ruby-identifier">im</span> = <span class="ruby-constant">BigRational</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">im</span>.<span class="ruby-identifier">val</span> );
 2003             <span class="ruby-keyword">end</span>
 2004             <span class="ruby-identifier">jasArith</span> = <span class="ruby-constant">BigComplex</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">re</span>, <span class="ruby-identifier">im</span> );
 2005         <span class="ruby-keyword">else</span>
 2006             <span class="ruby-identifier">re</span> = <span class="ruby-identifier">makeJasArith</span>( <span class="ruby-identifier">item</span>[<span class="ruby-value">0</span>] );
 2007             <span class="ruby-keyword">if</span> <span class="ruby-keyword">not</span> <span class="ruby-identifier">re</span>.<span class="ruby-identifier">isField</span>()
 2008                 <span class="ruby-identifier">re</span> = <span class="ruby-constant">BigRational</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">re</span>.<span class="ruby-identifier">val</span> );
 2009             <span class="ruby-keyword">end</span>
 2010             <span class="ruby-identifier">jasArith</span> = <span class="ruby-constant">BigComplex</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">re</span> );
 2011         <span class="ruby-keyword">end</span>
 2012         <span class="ruby-keyword">return</span> <span class="ruby-identifier">jasArith</span>;
 2013     <span class="ruby-keyword">end</span>
 2014     <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;unknown item type(#{item}) = #{item.class}\n&quot;</span>;
 2015     <span class="ruby-keyword">return</span> <span class="ruby-identifier">item</span>;
 2016 <span class="ruby-keyword">end</span></pre>
 2017           </div>
 2018           
 2019         </div>
 2020 
 2021         
 2022 
 2023         
 2024       </div>
 2025 
 2026     
 2027       <div id="method-i-nameFromValue" class="method-detail ">
 2028         
 2029         <div class="method-heading">
 2030           <span class="method-name">nameFromValue</span><span
 2031             class="method-args">(i)</span>
 2032           
 2033           <span class="method-click-advice">click to toggle source</span>
 2034           
 2035         </div>
 2036         
 2037 
 2038         <div class="method-description">
 2039           
 2040           <p>Get a meaningful name from a value.</p>
 2041 
 2042 <p>i ist the given value.</p>
 2043           
 2044           
 2045 
 2046           
 2047           <div class="method-source-code" id="nameFromValue-source">
 2048             <pre><span class="ruby-comment"># File examples/jas.rb, line 115</span>
 2049 <span class="ruby-keyword">def</span> <span class="ruby-identifier">nameFromValue</span>(<span class="ruby-identifier">i</span>) 
 2050     <span class="ruby-identifier">ivs</span> = <span class="ruby-identifier">i</span>.<span class="ruby-identifier">to_s</span>
 2051     <span class="ruby-comment">#puts &quot;string1: #{ivs} = &quot; + ivs.class.to_s;</span>
 2052     <span class="ruby-identifier">ivs</span> = <span class="ruby-identifier">ivs</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-string">&quot; &quot;</span>,<span class="ruby-string">&quot;&quot;</span>);
 2053     <span class="ruby-identifier">ivs</span> = <span class="ruby-identifier">ivs</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-string">&quot;\n&quot;</span>,<span class="ruby-string">&quot;&quot;</span>);
 2054     <span class="ruby-identifier">ivs</span> = <span class="ruby-identifier">ivs</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-string">&quot;,&quot;</span>,<span class="ruby-string">&quot;&quot;</span>);
 2055     <span class="ruby-identifier">ivs</span> = <span class="ruby-identifier">ivs</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-string">&quot;(&quot;</span>,<span class="ruby-string">&quot;&quot;</span>);
 2056     <span class="ruby-identifier">ivs</span> = <span class="ruby-identifier">ivs</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-string">&quot;)&quot;</span>,<span class="ruby-string">&quot;&quot;</span>);
 2057     <span class="ruby-identifier">ivs</span> = <span class="ruby-identifier">ivs</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-string">&quot;+&quot;</span>,<span class="ruby-string">&quot;&quot;</span>);
 2058     <span class="ruby-comment">#ivs = ivs.gsub(&quot;*&quot;,&quot;&quot;);</span>
 2059     <span class="ruby-identifier">ivs</span> = <span class="ruby-identifier">ivs</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-string">&quot;/&quot;</span>,<span class="ruby-string">&quot;div&quot;</span>);
 2060     <span class="ruby-comment">#ivs = ivs.gsub(&quot;|&quot;,&quot;div&quot;);</span>
 2061     <span class="ruby-identifier">ivs</span> = <span class="ruby-identifier">ivs</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-string">&quot;{&quot;</span>,<span class="ruby-string">&quot;&quot;</span>);
 2062     <span class="ruby-identifier">ivs</span> = <span class="ruby-identifier">ivs</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-string">&quot;}&quot;</span>,<span class="ruby-string">&quot;&quot;</span>);
 2063     <span class="ruby-identifier">ivs</span> = <span class="ruby-identifier">ivs</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-string">&quot;[&quot;</span>,<span class="ruby-string">&quot;&quot;</span>);
 2064     <span class="ruby-identifier">ivs</span> = <span class="ruby-identifier">ivs</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-string">&quot;]&quot;</span>,<span class="ruby-string">&quot;&quot;</span>);
 2065     <span class="ruby-identifier">i</span> = <span class="ruby-identifier">ivs</span>.<span class="ruby-identifier">index</span>(<span class="ruby-string">&quot;BigO&quot;</span>);
 2066     <span class="ruby-keyword">if</span> <span class="ruby-identifier">i</span> <span class="ruby-comment">#and i &gt; 0</span>
 2067        <span class="ruby-identifier">ivs</span> = <span class="ruby-identifier">ivs</span>[<span class="ruby-value">0</span>,<span class="ruby-identifier">i</span>];
 2068        <span class="ruby-comment">#puts &quot;BigO index = #{i}&quot;;</span>
 2069     <span class="ruby-keyword">end</span>
 2070     <span class="ruby-keyword">if</span> <span class="ruby-identifier">ivs</span> <span class="ruby-operator">==</span> <span class="ruby-string">&quot;1&quot;</span>
 2071        <span class="ruby-identifier">ivs</span> = <span class="ruby-string">&quot;one&quot;</span>
 2072     <span class="ruby-keyword">end</span>
 2073     <span class="ruby-keyword">if</span> <span class="ruby-identifier">ivs</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;1&quot;</span>[<span class="ruby-value">0</span>] <span class="ruby-keyword">and</span> <span class="ruby-keyword">not</span> <span class="ruby-identifier">ivs</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp">/\A[0-9].*/</span>)
 2074        <span class="ruby-identifier">r</span> = <span class="ruby-identifier">ivs</span>[<span class="ruby-value">1</span>,<span class="ruby-identifier">ivs</span>.<span class="ruby-identifier">size</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>].<span class="ruby-identifier">to_s</span>;
 2075        <span class="ruby-identifier">ivs</span> = <span class="ruby-string">&quot;one&quot;</span>
 2076        <span class="ruby-keyword">if</span> <span class="ruby-identifier">r</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span> 
 2077           <span class="ruby-identifier">ivs</span> = <span class="ruby-identifier">ivs</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">r</span>
 2078        <span class="ruby-keyword">end</span>
 2079     <span class="ruby-keyword">end</span>
 2080     <span class="ruby-comment">#if ivs[0,2] == &quot;0i1&quot;[0,2] or ivs[0,2] == &quot;0I1&quot;[0,2] </span>
 2081     <span class="ruby-keyword">if</span> <span class="ruby-identifier">ivs</span> <span class="ruby-operator">==</span> <span class="ruby-string">&quot;0i1&quot;</span> <span class="ruby-keyword">or</span> <span class="ruby-identifier">ivs</span> <span class="ruby-operator">==</span> <span class="ruby-string">&quot;0I1&quot;</span>
 2082        <span class="ruby-identifier">ivs</span> = <span class="ruby-string">&quot;i&quot;</span>
 2083     <span class="ruby-keyword">end</span>
 2084     <span class="ruby-comment">#puts &quot;string: #{ivs} of &quot; + i.to_s;</span>
 2085     <span class="ruby-keyword">if</span> <span class="ruby-identifier">ivs</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-string">&quot;|&quot;</span>) <span class="ruby-keyword">or</span> <span class="ruby-identifier">ivs</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp">/\A[0-9].*/</span>)
 2086        <span class="ruby-comment">#puts &quot;string2: #{ivs} = &quot; + ivs.class.to_s;</span>
 2087        <span class="ruby-identifier">ivs</span> = <span class="ruby-keyword">nil</span>
 2088     <span class="ruby-keyword">end</span>
 2089     <span class="ruby-keyword">return</span> <span class="ruby-identifier">ivs</span>
 2090 <span class="ruby-keyword">end</span></pre>
 2091           </div>
 2092           
 2093         </div>
 2094 
 2095         
 2096 
 2097         
 2098       </div>
 2099 
 2100     
 2101       <div id="method-i-noThreads" class="method-detail ">
 2102         
 2103         <div class="method-heading">
 2104           <span class="method-name">noThreads</span><span
 2105             class="method-args">()</span>
 2106           
 2107           <span class="method-click-advice">click to toggle source</span>
 2108           
 2109         </div>
 2110         
 2111 
 2112         <div class="method-description">
 2113           
 2114           <p>Turn off automatic parallel threads usage.</p>
 2115           
 2116           
 2117 
 2118           
 2119           <div class="method-source-code" id="noThreads-source">
 2120             <pre><span class="ruby-comment"># File examples/jas.rb, line 54</span>
 2121 <span class="ruby-keyword">def</span> <span class="ruby-identifier">noThreads</span>()
 2122     <span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;nt = &quot;</span>, <span class="ruby-constant">ComputerThreads</span>.<span class="ruby-constant">NO_THREADS</span>;
 2123     <span class="ruby-constant">ComputerThreads</span>.<span class="ruby-identifier">setNoThreads</span>(); <span class="ruby-comment">#NO_THREADS = #0; #1; #true;</span>
 2124     <span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;\nnt = &quot;</span>, <span class="ruby-constant">ComputerThreads</span>.<span class="ruby-constant">NO_THREADS</span>;
 2125     <span class="ruby-identifier">puts</span>
 2126 <span class="ruby-keyword">end</span></pre>
 2127           </div>
 2128           
 2129         </div>
 2130 
 2131         
 2132 
 2133         
 2134       </div>
 2135 
 2136     
 2137       <div id="method-i-rbarray2arraylist" class="method-detail ">
 2138         
 2139         <div class="method-heading">
 2140           <span class="method-name">rbarray2arraylist</span><span
 2141             class="method-args">(list,fac=nil,rec=1)</span>
 2142           
 2143           <span class="method-click-advice">click to toggle source</span>
 2144           
 2145         </div>
 2146         
 2147 
 2148         <div class="method-description">
 2149           
 2150           <p>Convert a Ruby array to a Java ArrayList.</p>
 2151 
 2152 <p>If list is a Ruby array, it is converted, else list is left unchanged.</p>
 2153           
 2154           
 2155 
 2156           
 2157           <div class="method-source-code" id="rbarray2arraylist-source">
 2158             <pre><span class="ruby-comment"># File examples/jas.rb, line 2616</span>
 2159 <span class="ruby-keyword">def</span> <span class="ruby-identifier">rbarray2arraylist</span>(<span class="ruby-identifier">list</span>,<span class="ruby-identifier">fac</span>=<span class="ruby-keyword">nil</span>,<span class="ruby-identifier">rec</span>=<span class="ruby-value">1</span>)
 2160     <span class="ruby-comment">#puts &quot;list type(#{list}) = #{list.class}\n&quot;;</span>
 2161     <span class="ruby-keyword">if</span> <span class="ruby-identifier">list</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span>
 2162        <span class="ruby-identifier">ll</span> = <span class="ruby-constant">ArrayList</span>.<span class="ruby-identifier">new</span>();
 2163        <span class="ruby-keyword">for</span> <span class="ruby-identifier">e</span> <span class="ruby-keyword">in</span> <span class="ruby-identifier">list</span>
 2164            <span class="ruby-identifier">t</span> = <span class="ruby-keyword">true</span>;
 2165            <span class="ruby-keyword">if</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">RingElem</span>
 2166                <span class="ruby-identifier">t</span> = <span class="ruby-keyword">false</span>;
 2167                <span class="ruby-identifier">e</span> = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">elem</span>;
 2168            <span class="ruby-keyword">end</span>
 2169            <span class="ruby-keyword">if</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span>
 2170                <span class="ruby-keyword">if</span> <span class="ruby-identifier">rec</span> <span class="ruby-operator">&lt;=</span> <span class="ruby-value">1</span>
 2171                    <span class="ruby-identifier">e</span> = <span class="ruby-identifier">makeJasArith</span>(<span class="ruby-identifier">e</span>);
 2172                <span class="ruby-keyword">else</span>
 2173                    <span class="ruby-identifier">t</span> = <span class="ruby-keyword">false</span>;
 2174                    <span class="ruby-identifier">e</span> = <span class="ruby-identifier">rbarray2arraylist</span>(<span class="ruby-identifier">e</span>,<span class="ruby-identifier">fac</span>,<span class="ruby-identifier">rec</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>);
 2175                <span class="ruby-keyword">end</span>
 2176            <span class="ruby-keyword">end</span>
 2177            <span class="ruby-keyword">begin</span>
 2178                <span class="ruby-comment">#n = e.getClass().getSimpleName();</span>
 2179                <span class="ruby-keyword">if</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">ArrayList</span>
 2180                    <span class="ruby-identifier">t</span> = <span class="ruby-keyword">false</span>;
 2181                <span class="ruby-keyword">end</span>
 2182            <span class="ruby-keyword">rescue</span>
 2183                <span class="ruby-comment">#pass;</span>
 2184            <span class="ruby-keyword">end</span>
 2185            <span class="ruby-keyword">if</span> <span class="ruby-identifier">t</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">fac</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
 2186                <span class="ruby-comment">#puts &quot;e.p(#{e}) = #{e.class}\n&quot;;</span>
 2187                <span class="ruby-identifier">e</span> = <span class="ruby-identifier">fac</span>.<span class="ruby-identifier">parse</span>( <span class="ruby-identifier">str</span>(<span class="ruby-identifier">e</span>) ); <span class="ruby-comment">#or makeJasArith(e) ?</span>
 2188            <span class="ruby-keyword">end</span>
 2189            <span class="ruby-identifier">ll</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">e</span>);
 2190        <span class="ruby-keyword">end</span>
 2191        <span class="ruby-identifier">list</span> = <span class="ruby-identifier">ll</span>;
 2192     <span class="ruby-keyword">end</span>
 2193     <span class="ruby-comment">#puts &quot;list type(#{list}) = #{list.class}\n&quot;;</span>
 2194     <span class="ruby-keyword">return</span> <span class="ruby-identifier">list</span>
 2195 <span class="ruby-keyword">end</span></pre>
 2196           </div>
 2197           
 2198         </div>
 2199 
 2200         
 2201 
 2202         
 2203       </div>
 2204 
 2205     
 2206       <div id="method-i-startLog" class="method-detail ">
 2207         
 2208         <div class="method-heading">
 2209           <span class="method-name">startLog</span><span
 2210             class="method-args">()</span>
 2211           
 2212           <span class="method-click-advice">click to toggle source</span>
 2213           
 2214         </div>
 2215         
 2216 
 2217         <div class="method-description">
 2218           
 2219           <p>Configure the log4j system and start logging.</p>
 2220 
 2221 <p>BasicConfigurator from log4j version 1 is no more supported, please use
 2222 log4j2 configuration.</p>
 2223           
 2224           
 2225 
 2226           
 2227           <div class="method-source-code" id="startLog-source">
 2228             <pre><span class="ruby-comment"># File examples/jas.rb, line 27</span>
 2229 <span class="ruby-keyword">def</span> <span class="ruby-identifier">startLog</span>()
 2230     <span class="ruby-comment">#puts &quot;BasicConfigurator from log4j version 1 is no more supported, please use log4j2 configuration&quot;;</span>
 2231 <span class="ruby-keyword">end</span></pre>
 2232           </div>
 2233           
 2234         </div>
 2235 
 2236         
 2237 
 2238         
 2239       </div>
 2240 
 2241     
 2242       <div id="method-i-str" class="method-detail ">
 2243         
 2244         <div class="method-heading">
 2245           <span class="method-name">str</span><span
 2246             class="method-args">(s)</span>
 2247           
 2248           <span class="method-click-advice">click to toggle source</span>
 2249           
 2250         </div>
 2251         
 2252 
 2253         <div class="method-description">
 2254           
 2255           <p>Mimic Python str() function.</p>
 2256           
 2257           
 2258 
 2259           
 2260           <div class="method-source-code" id="str-source">
 2261             <pre><span class="ruby-comment"># File examples/jas.rb, line 36</span>
 2262 <span class="ruby-keyword">def</span> <span class="ruby-identifier">str</span>(<span class="ruby-identifier">s</span>)
 2263     <span class="ruby-keyword">return</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">to_s</span>;
 2264 <span class="ruby-keyword">end</span></pre>
 2265           </div>
 2266           
 2267         </div>
 2268 
 2269         
 2270 
 2271         
 2272       </div>
 2273 
 2274     
 2275       <div id="method-i-terminate" class="method-detail ">
 2276         
 2277         <div class="method-heading">
 2278           <span class="method-name">terminate</span><span
 2279             class="method-args">()</span>
 2280           
 2281           <span class="method-click-advice">click to toggle source</span>
 2282           
 2283         </div>
 2284         
 2285 
 2286         <div class="method-description">
 2287           
 2288           <p>Terminate the running thread pools.</p>
 2289           
 2290           
 2291 
 2292           
 2293           <div class="method-source-code" id="terminate-source">
 2294             <pre><span class="ruby-comment"># File examples/jas.rb, line 45</span>
 2295 <span class="ruby-keyword">def</span> <span class="ruby-identifier">terminate</span>()
 2296     <span class="ruby-constant">ComputerThreads</span>.<span class="ruby-identifier">terminate</span>();
 2297 <span class="ruby-keyword">end</span></pre>
 2298           </div>
 2299           
 2300         </div>
 2301 
 2302         
 2303 
 2304         
 2305       </div>
 2306 
 2307     
 2308     </section>
 2309   
 2310   </section>
 2311 </main>
 2312 
 2313 
 2314 <footer id="validator-badges" role="contentinfo">
 2315   <p><a href="http://validator.w3.org/check/referer">Validate</a>
 2316   <p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
 2317   <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
 2318 </footer>
 2319