Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > c5653a35bb94fee65ffe21230992c863 > files > 138

linbox-doc-1.2.1-1.fc15.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>linbox: GMPRationalElement Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript">
function hasClass(ele,cls) {
  return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'));
}

function addClass(ele,cls) {
  if (!this.hasClass(ele,cls)) ele.className += " "+cls;
}

function removeClass(ele,cls) {
  if (hasClass(ele,cls)) {
    var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)');
    ele.className=ele.className.replace(reg,' ');
  }
}

function toggleVisibility(linkObj) {
 var base = linkObj.getAttribute('id');
 var summary = document.getElementById(base + '-summary');
 var content = document.getElementById(base + '-content');
 var trigger = document.getElementById(base + '-trigger');
 if ( hasClass(linkObj,'closed') ) {
   summary.style.display = 'none';
   content.style.display = 'block';
   trigger.src = 'open.png';
   removeClass(linkObj,'closed');
   addClass(linkObj,'opened');
 } else if ( hasClass(linkObj,'opened') ) {
   summary.style.display = 'block';
   content.style.display = 'none';
   trigger.src = 'closed.png';
   removeClass(linkObj,'opened');
   addClass(linkObj,'closed');
 }
 return false;
}
</script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">linbox</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespace_lin_box.html">LinBox</a>      </li>
      <li class="navelem"><a class="el" href="class_lin_box_1_1_g_m_p_rational_element.html">GMPRationalElement</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">GMPRationalElement Class Reference<div class="ingroups"><a class="el" href="group__element.html">element</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="LinBox::GMPRationalElement" -->
<p>elements of GMP_Rationals.  
 <a href="class_lin_box_1_1_g_m_p_rational_element.html#details">More...</a></p>

<p><code>#include &lt;gmp-rational.h&gt;</code></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Common Object Interface for LinBox Field elements.</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>These methods are required of all <a class="el" href="namespace_lin_box.html">LinBox</a> <a class="el" href="group___fields.html">field</a> elements. </p>
</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_g_m_p_rational_element.html#a2192fd925583a31f386ebf1dcffcab28">GMPRationalElement</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="#a2192fd925583a31f386ebf1dcffcab28"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_g_m_p_rational_element.html#a8f9a998653f01284414e9c45a9126577">GMPRationalElement</a> (const <a class="el" href="class_lin_box_1_1_g_m_p_rational_element.html">GMPRationalElement</a> &amp;a)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor.  <a href="#a8f9a998653f01284414e9c45a9126577"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_g_m_p_rational_element.html#a041923786efda78d3b6296d560cccf50">~GMPRationalElement</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#a041923786efda78d3b6296d560cccf50"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_lin_box_1_1_g_m_p_rational_element.html">GMPRationalElement</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_g_m_p_rational_element.html#a3ef89d39ec0d921a9a8053b63662555e">operator=</a> (const <a class="el" href="class_lin_box_1_1_g_m_p_rational_element.html">GMPRationalElement</a> &amp;a)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Assignment operator.  <a href="#a3ef89d39ec0d921a9a8053b63662555e"></a><br/></td></tr>
<tr><td colspan="2"><div class="groupHeader">Implementation-Specific Methods.</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>These methods are not required of all <a class="el" href="namespace_lin_box.html" title="Namespace in which all linbox code resides.">LinBox</a> field elements and are included only for this implementation of the archetype. </p>
</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_g_m_p_rational_element.html#a2ad76c4bada8a9a1ea733a9e848a291d">GMPRationalElement</a> (mpq_t _rep)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#a2ad76c4bada8a9a1ea733a9e848a291d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_g_m_p_rational_element.html#a04a896131e3fb5251a76511010a02b1f">GMPRationalElement</a> (const <a class="el" href="group__integers.html#gad62eceb96963b157a2357aba991f6d6e">integer</a> &amp;num, const <a class="el" href="group__integers.html#gad62eceb96963b157a2357aba991f6d6e">integer</a> &amp;den)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#a04a896131e3fb5251a76511010a02b1f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_g_m_p_rational_element.html#a79571c91934bb71dbce896ecf195e653">GMPRationalElement</a> (const <a class="el" href="group__integers.html#gad62eceb96963b157a2357aba991f6d6e">integer</a> &amp;num)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#a79571c91934bb71dbce896ecf195e653"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af6369024decf3906e80f4259d7ceb287"></a><!-- doxytag: member="LinBox::GMPRationalElement::get_rep" ref="af6369024decf3906e80f4259d7ceb287" args="()" -->
mpq_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_g_m_p_rational_element.html#af6369024decf3906e80f4259d7ceb287">get_rep</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">access representation <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>elements of GMP_Rationals. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a2192fd925583a31f386ebf1dcffcab28"></a><!-- doxytag: member="LinBox::GMPRationalElement::GMPRationalElement" ref="a2192fd925583a31f386ebf1dcffcab28" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_lin_box_1_1_g_m_p_rational_element.html">GMPRationalElement</a> </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Default constructor. </p>
<p>This constructor is required to allow <a class="el" href="group___fields.html">field</a> elements to be primitive C++ types. Because constructor does not know what <a class="el" href="group___fields.html">field</a> the element belongs to, it cannot actually construct the element. In this implementation, the constructor it sets _elem_ptr to the null pointer. Initialization of the element is done through the field function init where the field is known. </p>

</div>
</div>
<a class="anchor" id="a8f9a998653f01284414e9c45a9126577"></a><!-- doxytag: member="LinBox::GMPRationalElement::GMPRationalElement" ref="a8f9a998653f01284414e9c45a9126577" args="(const GMPRationalElement &amp;a)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_lin_box_1_1_g_m_p_rational_element.html">GMPRationalElement</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_lin_box_1_1_g_m_p_rational_element.html">GMPRationalElement</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Copy constructor. </p>
<p>This constructor is required to allow <a class="el" href="group___fields.html">field</a> elements to be primitive C++ types, and to allow field elements to be passed by value into functions. Constructs <a class="el" href="group___fields.html">field</a> element by copying the <a class="el" href="group___fields.html">field</a> element. In this implementation, this means copying the element to which a._elem_ptr points. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>field element. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a041923786efda78d3b6296d560cccf50"></a><!-- doxytag: member="LinBox::GMPRationalElement::~GMPRationalElement" ref="a041923786efda78d3b6296d560cccf50" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">~<a class="el" href="class_lin_box_1_1_g_m_p_rational_element.html">GMPRationalElement</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destructor. </p>
<p>In this implementation, this destroys element by deleting field element to which _elem_ptr points. </p>

</div>
</div>
<a class="anchor" id="a2ad76c4bada8a9a1ea733a9e848a291d"></a><!-- doxytag: member="LinBox::GMPRationalElement::GMPRationalElement" ref="a2ad76c4bada8a9a1ea733a9e848a291d" args="(mpq_t _rep)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_lin_box_1_1_g_m_p_rational_element.html">GMPRationalElement</a> </td>
          <td>(</td>
          <td class="paramtype">mpq_t&#160;</td>
          <td class="paramname"><em>_rep</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructor. </p>
<p>Constructs field element from an mpq_t Not part of the interface. Creates new copy of element object in dynamic memory. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">_rep</td><td>pointer to <a class="el" href="class_lin_box_1_1_element_abstract.html">ElementAbstract</a> </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a04a896131e3fb5251a76511010a02b1f"></a><!-- doxytag: member="LinBox::GMPRationalElement::GMPRationalElement" ref="a04a896131e3fb5251a76511010a02b1f" args="(const integer &amp;num, const integer &amp;den)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_lin_box_1_1_g_m_p_rational_element.html">GMPRationalElement</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__integers.html#gad62eceb96963b157a2357aba991f6d6e">integer</a> &amp;&#160;</td>
          <td class="paramname"><em>num</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__integers.html#gad62eceb96963b157a2357aba991f6d6e">integer</a> &amp;&#160;</td>
          <td class="paramname"><em>den</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructor. </p>
<p>Initialize from numerator and denominator </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">num,den</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a79571c91934bb71dbce896ecf195e653"></a><!-- doxytag: member="LinBox::GMPRationalElement::GMPRationalElement" ref="a79571c91934bb71dbce896ecf195e653" args="(const integer &amp;num)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_lin_box_1_1_g_m_p_rational_element.html">GMPRationalElement</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__integers.html#gad62eceb96963b157a2357aba991f6d6e">integer</a> &amp;&#160;</td>
          <td class="paramname"><em>num</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructor. </p>
<p>Initalizes from a single integer, (which is assumed to be the numerator, with the denominator being 1) </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">num</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a3ef89d39ec0d921a9a8053b63662555e"></a><!-- doxytag: member="LinBox::GMPRationalElement::operator=" ref="a3ef89d39ec0d921a9a8053b63662555e" args="(const GMPRationalElement &amp;a)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_lin_box_1_1_g_m_p_rational_element.html">GMPRationalElement</a>&amp; operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_lin_box_1_1_g_m_p_rational_element.html">GMPRationalElement</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Assignment operator. </p>
<p>Assigns element a to element. In this implementation, this is done by copying field element to which _elem_ptr points. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>field element. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>element/gmp-rational.h</li>
</ul>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Tue Aug 30 2011 for linbox by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>