Sophie

Sophie

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

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: RandIterArchetype 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_rand_iter_archetype.html">RandIterArchetype</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">RandIterArchetype Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="LinBox::RandIterArchetype" -->
<p>Random field element generator archetype.  
 <a href="class_lin_box_1_1_rand_iter_archetype.html#details">More...</a></p>

<p><code>#include &lt;archetype.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">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> random field element generators 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_rand_iter_archetype.html#a361b9067b235bb2fd67f326649a7dfdf">RandIterArchetype</a> (<a class="el" href="class_lin_box_1_1_rand_iter_abstract.html">RandIterAbstract</a> *randIter_ptr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#a361b9067b235bb2fd67f326649a7dfdf"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="member-group"></a>
Common Object Interface.</h2></td></tr>
<tr><td class="ititle" colspan="2"><p><a class="anchor" id="amgrp3e56614df595c8ae7715d6e2d35c3e26"></a>These methods are required of all <a class="el" href="namespace_lin_box.html" title="Namespace in which all linbox code resides.">LinBox</a> field element generators. </p>
</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0d5b68118c6cec7d27664e4749dafa72"></a><!-- doxytag: member="LinBox::RandIterArchetype::Element" ref="a0d5b68118c6cec7d27664e4749dafa72" args="" -->
typedef <a class="el" href="class_lin_box_1_1_element_archetype.html">ElementArchetype</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_rand_iter_archetype.html#a0d5b68118c6cec7d27664e4749dafa72">Element</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">element type <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_rand_iter_archetype.html#a416f92ba0c7c3e7de602075ee1124490">RandIterArchetype</a> (const <a class="el" href="class_lin_box_1_1_field_archetype.html">FieldArchetype</a> &amp;F, const <a class="el" href="group__integers.html#gad62eceb96963b157a2357aba991f6d6e">integer</a> &amp;size=0, const <a class="el" href="group__integers.html#gad62eceb96963b157a2357aba991f6d6e">integer</a> &amp;seed=0)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor from field, sampling size, and seed.  <a href="#a416f92ba0c7c3e7de602075ee1124490"></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_rand_iter_archetype.html#a5129ee0229918991ad57f56cc8fe5f88">RandIterArchetype</a> (const <a class="el" href="class_lin_box_1_1_rand_iter_archetype.html">RandIterArchetype</a> &amp;R)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor.  <a href="#a5129ee0229918991ad57f56cc8fe5f88"></a><br/></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;class Field_qcq &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_rand_iter_archetype.html#aeed407c65698600cfd2ce6ee6b57c439">RandIterArchetype</a> (Field_qcq *f, const <a class="el" href="group__integers.html#gad62eceb96963b157a2357aba991f6d6e">integer</a> &amp;size=0, const <a class="el" href="group__integers.html#gad62eceb96963b157a2357aba991f6d6e">integer</a> &amp;seed=0)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#aeed407c65698600cfd2ce6ee6b57c439"></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_rand_iter_archetype.html#a060722bb1ac49040deb96778f555475c">~RandIterArchetype</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#a060722bb1ac49040deb96778f555475c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_lin_box_1_1_rand_iter_archetype.html">RandIterArchetype</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_rand_iter_archetype.html#a47230c616d849483879dcf94af55cb65">operator=</a> (const <a class="el" href="class_lin_box_1_1_rand_iter_archetype.html">RandIterArchetype</a> &amp;R)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Assignment operator.  <a href="#a47230c616d849483879dcf94af55cb65"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_lin_box_1_1_element_archetype.html">Element</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_rand_iter_archetype.html#a5d14896944481a69181ca8b871d46f7f">random</a> (<a class="el" href="class_lin_box_1_1_element_archetype.html">Element</a> &amp;a) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Random field element creator.  <a href="#a5d14896944481a69181ca8b871d46f7f"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Random field element generator archetype. </p>
<p>This encapsulated class is a generator of random field elements for the encapsulating field. It is required to contain constructors from a field object and two integers. The first integer being a cardinality of a set to draw the random elements from, and the second being a seed for the random number generator. It is also required to contain a copy constructor, a destructor, and an operator () which acts on a reference to a field element. In this operator (), the random element is placed into the input field element and also returned as a reference. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a416f92ba0c7c3e7de602075ee1124490"></a><!-- doxytag: member="LinBox::RandIterArchetype::RandIterArchetype" ref="a416f92ba0c7c3e7de602075ee1124490" args="(const FieldArchetype &amp;F, const integer &amp;size=0, const integer &amp;seed=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_lin_box_1_1_rand_iter_archetype.html">RandIterArchetype</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_lin_box_1_1_field_archetype.html">FieldArchetype</a> &amp;&#160;</td>
          <td class="paramname"><em>F</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>size</em> = <code>0</code>, </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>seed</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructor from field, sampling size, and seed. </p>
<p>The random field element iterator works in the field F, is seeded by seed, and it returns any one element with probability no more than 1/min (size, F.cardinality (c)).</p>
<p>A sampling size of zero means to sample from the entire field. A seed of zero means to use some arbitrary seed for the generator. In this implementation, this means copying the field to which <code>F._field_ptr</code> points, the element to which <code>F._elem_ptr</code> points, and the random element generator to which <code>F._randIter_ptr</code> points.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">F</td><td><a class="el" href="namespace_lin_box.html" title="Namespace in which all linbox code resides.">LinBox</a> field archetype object in which to do arithmetic </td></tr>
    <tr><td class="paramname">size</td><td>constant integer reference of sample size from which to sample (default = 0) </td></tr>
    <tr><td class="paramname">seed</td><td>constant integer reference from which to seed random number generator (default = 0) </td></tr>
  </table>
  </dd>
</dl>

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

<p>Copy constructor. </p>
<p>Constructs <a class="el" href="class_lin_box_1_1_rand_iter_archetype.html" title="Random field element generator archetype.">RandIterArchetype</a> object by copying the random field element generator. This is required to allow generator objects to be passed by value into functions. In this implementation, this means copying the random field element generator to which <code>R._randIter_ptr</code> points. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">R</td><td><a class="el" href="class_lin_box_1_1_rand_iter_archetype.html" title="Random field element generator archetype.">RandIterArchetype</a> object. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aeed407c65698600cfd2ce6ee6b57c439"></a><!-- doxytag: member="LinBox::RandIterArchetype::RandIterArchetype" ref="aeed407c65698600cfd2ce6ee6b57c439" args="(Field_qcq *f, const integer &amp;size=0, const integer &amp;seed=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_lin_box_1_1_rand_iter_archetype.html">RandIterArchetype</a> </td>
          <td>(</td>
          <td class="paramtype">Field_qcq *&#160;</td>
          <td class="paramname"><em>f</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>size</em> = <code>0</code>, </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>seed</em> = <code>0</code>&#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>Constructs <a class="el" href="class_lin_box_1_1_rand_iter_archetype.html" title="Random field element generator archetype.">RandIterArchetype</a> from ANYTHING matching the interface using the enveloppe as a <a class="el" href="class_lin_box_1_1_field_abstract.html">FieldAbstract</a> and its encapsulated element and random element generator if needed. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td></td></tr>
    <tr><td class="paramname">size</td><td></td></tr>
    <tr><td class="paramname">seed</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a060722bb1ac49040deb96778f555475c"></a><!-- doxytag: member="LinBox::RandIterArchetype::~RandIterArchetype" ref="a060722bb1ac49040deb96778f555475c" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">~<a class="el" href="class_lin_box_1_1_rand_iter_archetype.html">RandIterArchetype</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>This destructs the random field element generator object. In this implementation, this destroys the generator by deleting the random generator object to which <code>_randIter_ptr</code> points. </p>

</div>
</div>
<a class="anchor" id="a361b9067b235bb2fd67f326649a7dfdf"></a><!-- doxytag: member="LinBox::RandIterArchetype::RandIterArchetype" ref="a361b9067b235bb2fd67f326649a7dfdf" args="(RandIterAbstract *randIter_ptr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_lin_box_1_1_rand_iter_archetype.html">RandIterArchetype</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_lin_box_1_1_rand_iter_abstract.html">RandIterAbstract</a> *&#160;</td>
          <td class="paramname"><em>randIter_ptr</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructor. </p>
<p>Constructs field from pointer to <a class="el" href="class_lin_box_1_1_rand_iter_abstract.html">RandIterAbstract</a>. Not part of the interface. Creates new copies of random iterator generator object in dynamic memory. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">randIter_ptr</td><td>pointer to <a class="el" href="class_lin_box_1_1_rand_iter_abstract.html">RandIterAbstract</a> </td></tr>
  </table>
  </dd>
</dl>

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

<p>Assignment operator. </p>
<p>Assigns <a class="el" href="class_lin_box_1_1_rand_iter_archetype.html" title="Random field element generator archetype.">RandIterArchetype</a> object R to generator. In this implementation, this means copying the generator to which <code>R._randIter_ptr</code> points.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">R</td><td><a class="el" href="class_lin_box_1_1_rand_iter_archetype.html" title="Random field element generator archetype.">RandIterArchetype</a> object. </td></tr>
  </table>
  </dd>
</dl>

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

<p>Random field element creator. </p>
<p>This returns a random field element from the information supplied at the creation of the generator. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>reference to random field element </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="randiter_2archetype_8h.html">randiter/archetype.h</a></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>