Sophie

Sophie

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

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: Butterfly&lt; _Field, Switch &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_butterfly.html">Butterfly</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">Butterfly&lt; _Field, Switch &gt; Class Template Reference<div class="ingroups"><a class="el" href="group__blackbox.html">blackbox</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="LinBox::Butterfly" --><!-- doxytag: inherits="LinBox::BlackboxInterface" -->
<p>Switching Network based BlackBox Matrix.  
 <a href="class_lin_box_1_1_butterfly.html#details">More...</a></p>

<p><code>#include &lt;butterfly.h&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png"/> Inheritance diagram for Butterfly&lt; _Field, Switch &gt;:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
 <div class="center">
  <img src="class_lin_box_1_1_butterfly.png" usemap="#Butterfly&lt; _Field, Switch &gt;_map" alt=""/>
  <map id="Butterfly&lt; _Field, Switch &gt;_map" name="Butterfly&lt; _Field, Switch &gt;_map">
<area href="class_lin_box_1_1_blackbox_interface.html" title="This blackbox base class exists solely to aid documentation organization." alt="BlackboxInterface" shape="rect" coords="0,0,164,24"/>
</map>
 </div></div>
<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="a6426a173d92b96723d807c0346e1f1a7"></a><!-- doxytag: member="LinBox::Butterfly::Butterfly" ref="a6426a173d92b96723d807c0346e1f1a7" args="(const Field &amp;F, size_t n)" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_butterfly.html#a6426a173d92b96723d807c0346e1f1a7">Butterfly</a> (const Field &amp;F, size_t n)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">No-Op Constructor. <br/></td></tr>
<tr><td colspan="2"><h2><a name="member-group"></a>
Butterfly</h2></td></tr>
<tr><td class="ititle" colspan="2"><p><a class="anchor" id="amgrp29ecfc45c7bd93061222062f86d4161d"></a><a class="el" href="class_lin_box_1_1_butterfly.html" title="Switching Network based BlackBox Matrix.">Butterfly</a> preconditioner and supporting function </p>
</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_butterfly.html#a9f1a4a175b0248542826ced823892d6a">Butterfly</a> (const Field &amp;F, size_t n, typename Switch::Factory &amp;factory)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor from an integer and a switch object.  <a href="#a9f1a4a175b0248542826ced823892d6a"></a><br/></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;class OutVector , class InVector &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">OutVector &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_butterfly.html#a22e1212a30992f86725ea253be15fd7a">apply</a> (OutVector &amp;y, const InVector &amp;x) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Application of BlackBox matrix.  <a href="#a22e1212a30992f86725ea253be15fd7a"></a><br/></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;class OutVector , class InVector &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">OutVector &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_butterfly.html#a3f755f6bddc7b852393c3107eedf0fe8">applyTranspose</a> (OutVector &amp;y, const InVector &amp;x) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Application of BlackBox matrix transpose.  <a href="#a3f755f6bddc7b852393c3107eedf0fe8"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><h3>template&lt;class _Field, class Switch&gt;<br/>
class LinBox::Butterfly&lt; _Field, Switch &gt;</h3>

<p>Switching Network based BlackBox Matrix. </p>
<p>A good preconditioner.</p>
<p>Implements butterfly switching network on a <a class="el" href="namespace_lin_box.html" title="Namespace in which all linbox code resides.">LinBox</a> vector as a black box matrix through the use of a switch object.</p>
<p>This is a blackbox matrix object, and it implements all purely virtual methods of the abstract base class. See <a class="el" href="class_lin_box_1_1_blackbox_archetype.html">BlackboxArchetype</a> for the specification of these methods.</p>
<p>This matrix requires a dense vector to be used. Sparse vectors must somehow be converted to dense vectors before this matrix may be applied to them.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">Vector</td><td><a class="el" href="namespace_lin_box.html" title="Namespace in which all linbox code resides.">LinBox</a> dense vector type </td></tr>
    <tr><td class="paramname">Switch</td><td>switch object type </td></tr>
  </table>
  </dd>
</dl>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a9f1a4a175b0248542826ced823892d6a"></a><!-- doxytag: member="LinBox::Butterfly::Butterfly" ref="a9f1a4a175b0248542826ced823892d6a" args="(const Field &amp;F, size_t n, typename Switch::Factory &amp;factory)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_lin_box_1_1_butterfly.html">Butterfly</a> </td>
          <td>(</td>
          <td class="paramtype">const Field &amp;&#160;</td>
          <td class="paramname"><em>F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">typename Switch::Factory &amp;&#160;</td>
          <td class="paramname"><em>factory</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructor from an integer and a switch object. </p>
<p>The switch object is an object that is applied to two references to elements to switch them. It must have both an apply and an applyTranspose method. It must contain all information needed by the switch other than the elements themselves. This includes any random numbers or sequences of values. It must also be able to be applied as many times as needed. In particular, it must be able to create new random elements or repeat a stored sequence of values. This is not required by the abstract base class. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">n</td><td>integer size of vectors to be applied to </td></tr>
    <tr><td class="paramname">F</td><td></td></tr>
    <tr><td class="paramname">factory</td><td>switch predicate object object </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a22e1212a30992f86725ea253be15fd7a"></a><!-- doxytag: member="LinBox::Butterfly::apply" ref="a22e1212a30992f86725ea253be15fd7a" args="(OutVector &amp;y, const InVector &amp;x) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">OutVector &amp; apply </td>
          <td>(</td>
          <td class="paramtype">OutVector &amp;&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const InVector &amp;&#160;</td>
          <td class="paramname"><em>x</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Application of BlackBox matrix. </p>
<p><code>y = A*x</code>. Requires one vector conforming to the <a class="el" href="namespace_lin_box.html">LinBox</a> vector <a class="el" href="_archetypes.html">archetype</a>. Required by abstract base class. For this matrix, this involves applying each switch in order to the input vector. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>reference to vector y containing output (after switching). </dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>constant reference to vector to contain input (before switching) </td></tr>
    <tr><td class="paramname">y</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a3f755f6bddc7b852393c3107eedf0fe8"></a><!-- doxytag: member="LinBox::Butterfly::applyTranspose" ref="a3f755f6bddc7b852393c3107eedf0fe8" args="(OutVector &amp;y, const InVector &amp;x) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">OutVector &amp; applyTranspose </td>
          <td>(</td>
          <td class="paramtype">OutVector &amp;&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const InVector &amp;&#160;</td>
          <td class="paramname"><em>x</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Application of BlackBox matrix transpose. </p>
<p><code>y = transpose (A)*x</code>. Requires one vector conforming to the <a class="el" href="namespace_lin_box.html">LinBox</a> vector <a class="el" href="_archetypes.html">archetype</a>. Required by abstract base class. For this matrix, this involves applying the transpose of each switch to the input vector in the reverse order of the apply function. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>reference to vector y containing output (after switching). </dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>constant reference to vector to contain input (before switching) </td></tr>
    <tr><td class="paramname">y</td><td></td></tr>
  </table>
  </dd>
</dl>

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