Sophie

Sophie

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

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: ZeroOne&lt; _Field &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_zero_one.html">ZeroOne</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">ZeroOne&lt; _Field &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::ZeroOne" --><!-- doxytag: inherits="LinBox::BlackboxInterface,LinBox::BlackboxInterface" -->
<p>Time and space efficient representation of sparse {0,1}-matrices.  
 <a href="class_lin_box_1_1_zero_one.html#details">More...</a></p>

<p><code>#include &lt;zo.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 ZeroOne&lt; _Field &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_zero_one.png" usemap="#ZeroOne&lt; _Field &gt;_map" alt=""/>
  <map id="ZeroOne&lt; _Field &gt;_map" name="ZeroOne&lt; _Field &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,123,24"/>
<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="133,0,256,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_zero_one_1_1_raw_index_iterator.html">RawIndexIterator</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_lin_box_1_1_zero_one_1_1_raw_index_iterator.html" title="RawIndexIterator.">RawIndexIterator</a>.  <a href="class_lin_box_1_1_zero_one_1_1_raw_index_iterator.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_zero_one_1_1_raw_iterator.html">RawIterator</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Raw iterator.  <a href="class_lin_box_1_1_zero_one_1_1_raw_iterator.html#details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></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_zero_one.html#a22e1212a30992f86725ea253be15fd7a">apply</a> (OutVector &amp;y, const InVector &amp;x) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">apply.  <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_zero_one.html#a3f755f6bddc7b852393c3107eedf0fe8">applyTranspose</a> (OutVector &amp;y, const InVector &amp;x) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">applyTranspose.  <a href="#a3f755f6bddc7b852393c3107eedf0fe8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">std::istream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_zero_one.html#a7f1e7ece6c12a9a3feb091f90c7c9ac1">read</a> (std::istream &amp;is)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Read the matrix from a stream in the JGD's SMS format.  <a href="#a7f1e7ece6c12a9a3feb091f90c7c9ac1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa362a72ec9f232a93e1f0c30196d26a3"></a><!-- doxytag: member="LinBox::ZeroOne::ZeroOne" ref="aa362a72ec9f232a93e1f0c30196d26a3" args="(Field &amp;F, Index *rowP, Index *colP, Index rows, Index cols, Index NNz)" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_zero_one.html#aa362a72ec9f232a93e1f0c30196d26a3">ZeroOne</a> (Field &amp;F, Index *rowP, Index *colP, Index rows, Index cols, Index NNz)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The real constructor /todo give docs here assuming entries are sorted in lexicographic order by (row,col) pair. <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_zero_one.html#aa37d57c030b1db0c198478268aa3cc15">apply</a> (OutVector &amp;y, const InVector &amp;x) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Uses one of the three private utility functions.  <a href="#aa37d57c030b1db0c198478268aa3cc15"></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_zero_one.html#ac1a9817268900b78faa5a6eb17d9badf">applyTranspose</a> (OutVector &amp;y, const InVector &amp;x) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Uses one of the three private utility functions, in the manner described above.  <a href="#ac1a9817268900b78faa5a6eb17d9badf"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">std::istream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_zero_one.html#a7f1e7ece6c12a9a3feb091f90c7c9ac1">read</a> (std::istream &amp;is)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Read the matrix from a stream in the JGD's SMS format.  <a href="#a7f1e7ece6c12a9a3feb091f90c7c9ac1"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_zero_one.html#a15b2dcf40649ddbe91a50b1d4a66c71c">rowSort</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Tells the number of nonzero entries.  <a href="#a15b2dcf40649ddbe91a50b1d4a66c71c"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><h3>template&lt;class _Field&gt;<br/>
class LinBox::ZeroOne&lt; _Field &gt;</h3>

<p>Time and space efficient representation of sparse {0,1}-matrices. </p>
<p>A 0-1 matrix is a matrix with all 0's and 1's as entries. We're using a NAG-sparse format. Applies can be performed fast, using only additions. When initalizing this class, you only need to build 2 arrays of equal length: an array of the row indices for the non-zero (1's) entries, and an array of the column indices for the non-zero (1's) entries.</p>
<p>A {0, 1,-1} matrix can be effecively represented as the <a class="el" href="class_lin_box_1_1_dif.html">Dif</a> of two ZeroOne's.</p>
<p>A 0-1 matrix is a matrix with all 0's and 1's as entries. We're using a comp-col or comp-row format. That is we have an array of col indices and an array of pointers indicating where the col indices for each row begins within the col index array. (or vice versa if we have sorted by columns.</p>
<p>Applies can be performed fast, using only additions. When initalizing this class, you only need to build 2 arrays of equal length: an array of the row indices for the non-zero (1's) entries, and an array of the column indices for the non-zero (1's) entries.</p>
<p>A {0, 1,-1} matrix can be effecively represented as the <a class="el" href="class_lin_box_1_1_dif.html">Dif</a> of two ZeroOne's. </p>
<dl><dt><b>Examples: </b></dt><dd>
<p><a class="el" href="examples_2smithvalence_8_c-example.html#_a5">examples/smithvalence.C</a>.</p>
</dd>
</dl></div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a22e1212a30992f86725ea253be15fd7a"></a><!-- doxytag: member="LinBox::ZeroOne::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>apply. </p>
<p>Uses one of the three private utility functions. It calls the generalized utility function _apply if there is no special ordering, _fyapply if there is C_ordering or _fxapply if there is fortran_ordering </p>

</div>
</div>
<a class="anchor" id="a3f755f6bddc7b852393c3107eedf0fe8"></a><!-- doxytag: member="LinBox::ZeroOne::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>applyTranspose. </p>
<p>Uses one of the three private utility functions, in the manner described above. Worthy of note is the fact that applyTranspose works by passing the column positions to the _apply functions as if they were rows, and row positions as if they were columns, as if the matrix had been transposed. </p>

</div>
</div>
<a class="anchor" id="a7f1e7ece6c12a9a3feb091f90c7c9ac1"></a><!-- doxytag: member="LinBox::ZeroOne::read" ref="a7f1e7ece6c12a9a3feb091f90c7c9ac1" args="(std::istream &amp;is)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::istream&amp; read </td>
          <td>(</td>
          <td class="paramtype">std::istream &amp;&#160;</td>
          <td class="paramname"><em>is</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Read the matrix from a stream in the JGD's SMS format. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">is</td><td>Input stream from which to read the matrix </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Reference to input stream </dd></dl>

</div>
</div>
<a class="anchor" id="a15b2dcf40649ddbe91a50b1d4a66c71c"></a><!-- doxytag: member="LinBox::ZeroOne::rowSort" ref="a15b2dcf40649ddbe91a50b1d4a66c71c" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rowSort </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Tells the number of nonzero entries. </p>
<p>Non blackbox function. </p>

</div>
</div>
<a class="anchor" id="aa37d57c030b1db0c198478268aa3cc15"></a><!-- doxytag: member="LinBox::ZeroOne::apply" ref="aa37d57c030b1db0c198478268aa3cc15" 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</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Uses one of the three private utility functions. </p>
<p>It calls the generalized utility function _apply if there is no special ordering, _fyapply if there is C_ordering or _fxapply if there is fortran_ordering </p>

</div>
</div>
<a class="anchor" id="ac1a9817268900b78faa5a6eb17d9badf"></a><!-- doxytag: member="LinBox::ZeroOne::applyTranspose" ref="ac1a9817268900b78faa5a6eb17d9badf" 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</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Uses one of the three private utility functions, in the manner described above. </p>
<p>Worthy of note is the fact that applyTranspose works by passing the column positions to the _apply functions as if they were rows, and row positions as if they were columns, as if the matrix had been transposed. </p>

</div>
</div>
<a class="anchor" id="a7f1e7ece6c12a9a3feb091f90c7c9ac1"></a><!-- doxytag: member="LinBox::ZeroOne::read" ref="a7f1e7ece6c12a9a3feb091f90c7c9ac1" args="(std::istream &amp;is)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::istream&amp; read </td>
          <td>(</td>
          <td class="paramtype">std::istream &amp;&#160;</td>
          <td class="paramname"><em>is</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Read the matrix from a stream in the JGD's SMS format. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">is</td><td>Input stream from which to read the matrix </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Reference to input stream </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>zero-one.h</li>
<li><a class="el" href="zo_8h.html">zo.h</a></li>
<li><a class="el" href="zero-one_8inl.html">zero-one.inl</a></li>
<li>zo.inl</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>