Sophie

Sophie

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

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: Archetypes in LinBox</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 class="current"><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><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>
<div class="header">
  <div class="headertitle">
<div class="title">Archetypes in <a class="el" href="namespace_lin_box.html" title="Namespace in which all linbox code resides.">LinBox</a> </div>  </div>
</div>
<div class="contents">
<div class="textblock"><p>LinBox uses common object interfaces and archetypical instantiations.</p>
<p>This is done for several key concepts including blackbox matrices, fields, random iterators, and vectors.</p>
<p>LinBox objects and algorithms are parameterized by types which must meet the interface requirements described here. Parameterization is via C++ templates. The interface concepts are specified in classes called archetypes.</p>
<p>The archetype classes are similar in spirit to Java interfaces. However most of them are also instantiable and their instances are concrete objects. Originally archetypes were pure virtual classes and algorithms with archetype arguments could be written and separately compiled. However virtual classes cannot also provide templated member functions, and LinBox is moving to greater use of template member functions. In some cases, we forgo the separate complation and code bloat avoidance mechanism in favor of speed and flexibility using template members.</p>
<p>Archetypes exist for fields, field elements, random iterators, vectors, blackbox matrices, dense matrices, and sparse matrices.</p>
<ul>
<li>Blackbox matrix archetype <code><a class="el" href="class_lin_box_1_1_blackbox_archetype.html" title="showing the member functions provided by all blackbox matrix classes.">LinBox::BlackboxArchetype</a></code> in <code><a class="el" href="blackbox_2archetype_8h.html" title="NO DOC.">linbox/blackbox/archetype.h</a></code> specifies this interface in detail. It is a parent class from which the various blackbox classes inherit.</li>
</ul>
<ul>
<li>Sparse Matrix interface. This extends the blackbox interface and provides facilities for some direct methods.</li>
</ul>
<ul>
<li>Dense Matrix interface. This extends the blackbox interface and provides facilities for some direct methods and block methods (dense matrices in lieu of vectors as arguments to black box apply).</li>
</ul>
<ul>
<li>Field archetype. This provides the basic arithmetic functionality of a field. The interface is used more generally for representations of commutative rings with 1. <code><a class="el" href="class_lin_box_1_1_field_archetype.html" title="field specification and archetypical instance.">LinBox::FieldArchetype</a></code> in <code><a class="el" href="field_2archetype_8h.html" title="NO DOC.">linbox/field/archetype.h</a></code> specifies this interface in detail and sets it up in such a way that algorithms can be compiled once against the field archetype. Alternatively, and with some performance gain, one can compile an algorithm separately against each field class used. For a listing of the field implementations see <a class="el" href="class_lin_box_1_1_field_interface.html" title="This field base class exists solely to aid documentation organization.">LinBox::FieldInterface</a> .</li>
</ul>
<ul>
<li>Random iterator archetype. LinBox fields (and rings) provide a random iterator type. Objects of this type can be used to generate elements at random. <code><a class="el" href="class_lin_box_1_1_rand_iter_archetype.html" title="Random field element generator archetype.">LinBox::RandIterArchetype</a></code> in <code><a class="el" href="randiter_2archetype_8h.html" title="NO DOC.">linbox/randiter/archetype.h</a></code> specifies this interface in detail.</li>
</ul>
<ul>
<li>Element archetype. To allow for high performance, it must be possible to use any C++ type to represent elments of fields and rings. This includes the primitive types such as int and float. To support this, our element type requires only: a public default constructor, a copy constructor, an assignment operator, and a destructor. <code><a class="el" href="class_lin_box_1_1_element_archetype.html" title="Field and Ring element interface specification and archetypical instance class.">LinBox::ElementArchetype</a></code> in <code><a class="el" href="element_2archetype_8h.html" title="NO DOC.">linbox/element/archetype.h</a></code> specifies this interface in detail.</li>
</ul>
<ul>
<li>Dense vector interface. This is the interface for vectors to which blackboxes are applied (the vector of a matrix vector product). This is simply the <code>std::vector&lt;Elt&gt;</code> interface, where <code>Elt</code> is the element type of the field involved. But we do not use the functionality concerning resizing vectors, <code>resize</code>, <code>push_back</code>, etc. An example of a class meeting this interface is <code>LinBox::SubVector</code> .</li>
</ul>
<ul>
<li>Sparse vector interfaces. We are experimenting with two or three variant interfaces for manipulation of sparse vectors.</li>
</ul>
<ul>
<li>Random Iterator archetypes. <a class="el" href="random_i_g_a.html">Random Iterator Generator Archetype</a>. <a class="el" href="random_f_e_g_w.html">Random field element generator wrappers</a></li>
</ul>
<p>These additional interfaces are under construction.</p>
<ul>
<li>Target Domain interface. This extends the field (or ring) interface. It has members dealing with the ring as a module over another. This interface is designed primarily with three applications in mind.<ul>
<li>finite field extensions <img class="formulaInl" alt="$K \subset F$" src="form_21.png"/>.</li>
<li><img class="formulaInl" alt="$Z \rightarrow Zp$" src="form_22.png"/>.</li>
<li>conversions among isomorphic representations, as used for instance in implementing the Toeplitz matrix class.</li>
</ul>
</li>
</ul>
<ul>
<li>Ring homomorphism interface. This is used by the target rings.</li>
</ul>
<ul>
<li>Polynomial interface. This may become the <code>std::vector</code> interface (including the resizing functionality) together with a handful of functions for manipulating polynomials. LinBox' design intentions are to exploit other software for any serious polynomial manipulation.</li>
</ul>
<p>In general, there are three uses for the archetypes classes:</p>
<ul>
<li>To define the common object interface of the concept, i.e., specify what an classes must have to meet the interface.</li>
</ul>
<ul>
<li>To allow distribution of compiled code and prototype library components. Thus it is possible to compile algorithms with the archetypes as parameters and call the compiled code with objects of other classes meeting the interface.</li>
</ul>
<ul>
<li>To control code bloat. (by means of separate compilation as sketched in the item above) </li>
</ul>
</div></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>