Sophie

Sophie

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

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: VectorFraction&lt; Domain &gt; Class Template 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_vector_fraction.html">VectorFraction</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">VectorFraction&lt; Domain &gt; Class Template Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="LinBox::VectorFraction" -->
<p>VectorFraction&lt;Domain&gt; is a vector of rational elements with common reduced denominator.  
 <a href="class_lin_box_1_1_vector_fraction.html#details">More...</a></p>

<p><code>#include &lt;vector-fraction.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 class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaacac93f437e011e3ad072eee3ad2f33"></a><!-- doxytag: member="LinBox::VectorFraction::VectorFraction" ref="aaacac93f437e011e3ad072eee3ad2f33" args="(const Domain &amp;D, FVector &amp;frac)" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_vector_fraction.html#aaacac93f437e011e3ad072eee3ad2f33">VectorFraction</a> (const Domain &amp;D, FVector &amp;frac)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">constructor from vector of rational numbers reduces individual pairs in-place first unless alreadyReduced=true <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_vector_fraction.html#a4526ef5b0b77f88d0be5c1e323851913">VectorFraction</a> (const Domain &amp;D, size_t n)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">allocating constructor, returns [0, 0, ...  <a href="#a4526ef5b0b77f88d0be5c1e323851913"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a83d6ec84cacbd24b198b0293383f4837"></a><!-- doxytag: member="LinBox::VectorFraction::VectorFraction" ref="a83d6ec84cacbd24b198b0293383f4837" args="(const VectorFraction&lt; Domain &gt; &amp;VF)" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_vector_fraction.html#a83d6ec84cacbd24b198b0293383f4837">VectorFraction</a> (const <a class="el" href="class_lin_box_1_1_vector_fraction.html">VectorFraction</a>&lt; Domain &gt; &amp;VF)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">copy constructor <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a176e5daedec6bdeb1dd0e496cb0f8110"></a><!-- doxytag: member="LinBox::VectorFraction::copy" ref="a176e5daedec6bdeb1dd0e496cb0f8110" args="(const VectorFraction&lt; Domain &gt; &amp;VF)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_vector_fraction.html#a176e5daedec6bdeb1dd0e496cb0f8110">copy</a> (const <a class="el" href="class_lin_box_1_1_vector_fraction.html">VectorFraction</a>&lt; Domain &gt; &amp;VF)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">copy without construction <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aeded70a4e018895bf2eeb34d7caa3198"></a><!-- doxytag: member="LinBox::VectorFraction::clearAndResize" ref="aeded70a4e018895bf2eeb34d7caa3198" args="(size_t size)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_vector_fraction.html#aeded70a4e018895bf2eeb34d7caa3198">clearAndResize</a> (size_t size)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">clear and resize without construction <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a19e4963b18bcfdda70275db6f391a72b"></a><!-- doxytag: member="LinBox::VectorFraction::combineSolution" ref="a19e4963b18bcfdda70275db6f391a72b" args="(const VectorFraction&lt; Domain &gt; &amp;other)" -->
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_vector_fraction.html#a19e4963b18bcfdda70275db6f391a72b">combineSolution</a> (const <a class="el" href="class_lin_box_1_1_vector_fraction.html">VectorFraction</a>&lt; Domain &gt; &amp;other)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Replaces *this with a linear combination of *this and other such that the result has denominator == gcd(this-&gt;denom, other.denom) see Mulders+Storjohann : 'Certified Dense Linear System Solving' Lemma 2.1 return value of true means that there was some improvement (ie denom was reduced) <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaee1b76dcef5d1a0d86f152884b06e41"></a><!-- doxytag: member="LinBox::VectorFraction::boundedCombineSolution" ref="aaee1b76dcef5d1a0d86f152884b06e41" args="(const VectorFraction&lt; Domain &gt; &amp;other, const Element &amp;denBound, Element &amp;g)" -->
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_vector_fraction.html#aaee1b76dcef5d1a0d86f152884b06e41">boundedCombineSolution</a> (const <a class="el" href="class_lin_box_1_1_vector_fraction.html">VectorFraction</a>&lt; Domain &gt; &amp;other, const Element &amp;denBound, Element &amp;g)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds in-place to *this a multiple of other such that the result has gcd(denominator, denBound) == gcd(this-&gt;denom, other.denom, denBound) see Mulders+Storjohann : 'Certified Dense Linear System Solving' Lemma 6.1 return value of true means that there was some improvement (ie gcd(denom, denBound) was reduced) g is gcd(denom, denBound), and is updated by this function when there is improvement. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_vector_fraction.html#a83465a73add196a0b6f67f4cc510f4b0">combineCertificate</a> (const <a class="el" href="class_lin_box_1_1_vector_fraction.html">VectorFraction</a>&lt; Domain &gt; &amp;other, Element &amp;n1, Element &amp;d1, const Element &amp;n2, const Element d2)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds in-place to *this a multiple of other to create an improved certificate ("z") n1/d1 = *this .  <a href="#a83465a73add196a0b6f67f4cc510f4b0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_lin_box_1_1_vector_fraction.html">VectorFraction</a>&lt; Domain &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_vector_fraction.html#a811bc9235c0a10467ef5655240c16fb6">axpyin</a> (Element &amp;a, const <a class="el" href="class_lin_box_1_1_vector_fraction.html">VectorFraction</a>&lt; Domain &gt; &amp;x)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">this += a * x.  <a href="#a811bc9235c0a10467ef5655240c16fb6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acd22def76f55c19076bb6c86104beaf0"></a><!-- doxytag: member="LinBox::VectorFraction::write" ref="acd22def76f55c19076bb6c86104beaf0" args="(std::ostream &amp;os) const " -->
std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_vector_fraction.html#acd22def76f55c19076bb6c86104beaf0">write</a> (std::ostream &amp;os) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">write to a stream <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4b471843489d3625a9ec39ab679c4860"></a><!-- doxytag: member="LinBox::VectorFraction::toFVector" ref="a4b471843489d3625a9ec39ab679c4860" args="(FVector &amp;result) const " -->
FVector &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_vector_fraction.html#a4b471843489d3625a9ec39ab679c4860">toFVector</a> (FVector &amp;result) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">convert to 'answer' type of lifting container <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a652f2a5cfcb68550d5a5a0ab0a998060"></a><!-- doxytag: member="LinBox::VectorFraction::simplify" ref="a652f2a5cfcb68550d5a5a0ab0a998060" args="()" -->
<a class="el" href="class_lin_box_1_1_vector_fraction.html">VectorFraction</a>&lt; Domain &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_vector_fraction.html#a652f2a5cfcb68550d5a5a0ab0a998060">simplify</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">reduces to simplest form, returns (*this) <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><h3>template&lt;class Domain&gt;<br/>
class LinBox::VectorFraction&lt; Domain &gt;</h3>

<p>VectorFraction&lt;Domain&gt; is a vector of rational elements with common reduced denominator. </p>
<p>Here Domain is a ring supporting the gcd, eg <a class="el" href="class_lin_box_1_1_n_t_l___z_z.html" title="the integer ring.">NTL_ZZ</a> or <a class="el" href="class_lin_box_1_1_p_i_d__integer.html" title="Domain for integer operations.">PID_integer</a> For compatability with the return type of rationalSolver, it allows conversion from/to std::vector&lt;std::pair&lt;Domain::Element&gt; &gt;. All functions will return the fraction in reduced form, calling reduce() if necessary. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a4526ef5b0b77f88d0be5c1e323851913"></a><!-- doxytag: member="LinBox::VectorFraction::VectorFraction" ref="a4526ef5b0b77f88d0be5c1e323851913" args="(const Domain &amp;D, size_t n)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_lin_box_1_1_vector_fraction.html">VectorFraction</a> </td>
          <td>(</td>
          <td class="paramtype">const Domain &amp;&#160;</td>
          <td class="paramname"><em>D</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>n</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>allocating constructor, returns [0, 0, ... </p>
<p>0]/1 </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a83465a73add196a0b6f67f4cc510f4b0"></a><!-- doxytag: member="LinBox::VectorFraction::combineCertificate" ref="a83465a73add196a0b6f67f4cc510f4b0" args="(const VectorFraction&lt; Domain &gt; &amp;other, Element &amp;n1, Element &amp;d1, const Element &amp;n2, const Element d2)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool combineCertificate </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_lin_box_1_1_vector_fraction.html">VectorFraction</a>&lt; Domain &gt; &amp;&#160;</td>
          <td class="paramname"><em>other</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Element &amp;&#160;</td>
          <td class="paramname"><em>n1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Element &amp;&#160;</td>
          <td class="paramname"><em>d1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const Element &amp;&#160;</td>
          <td class="paramname"><em>n2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const Element&#160;</td>
          <td class="paramname"><em>d2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Adds in-place to *this a multiple of other to create an improved certificate ("z") n1/d1 = *this . </p>
<p>b, n2/d2 = other . b in reduced form n1/d1 are updated so that new denominator is lcm(d1, d2); see Mulders+Storjohann : 'Certified Dense Linear System Solving' Lemma 6.2 return value of true means that there was some improvement (ie d1 was increased) </p>

</div>
</div>
<a class="anchor" id="a811bc9235c0a10467ef5655240c16fb6"></a><!-- doxytag: member="LinBox::VectorFraction::axpyin" ref="a811bc9235c0a10467ef5655240c16fb6" args="(Element &amp;a, const VectorFraction&lt; Domain &gt; &amp;x)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_lin_box_1_1_vector_fraction.html">VectorFraction</a>&lt;Domain&gt;&amp; axpyin </td>
          <td>(</td>
          <td class="paramtype">Element &amp;&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_lin_box_1_1_vector_fraction.html">VectorFraction</a>&lt; Domain &gt; &amp;&#160;</td>
          <td class="paramname"><em>x</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>this += a * x. </p>
<p>performs a rational axpy with an integer multiplier returns (*this) </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>vector-fraction.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>