Codebase list ntl / 644bf16a-366d-4aa0-b5fe-20cc5b9e76b7/main doc / GF2XVec.cpp.html
644bf16a-366d-4aa0-b5fe-20cc5b9e76b7/main

Tree @644bf16a-366d-4aa0-b5fe-20cc5b9e76b7/main (Download .tar.gz)

GF2XVec.cpp.html @644bf16a-366d-4aa0-b5fe-20cc5b9e76b7/mainraw · history · blame

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>~/ntl-11.4.2/doc/GF2XVec.cpp.html</title>
<meta name="Generator" content="Vim/8.0">
<meta name="plugin-version" content="vim7.4_v2">
<meta name="syntax" content="cpp">
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
<meta name="colorscheme" content="macvim">
<style type="text/css">
<!--
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
body { font-family: monospace; color: #000000; background-color: #ffffff; }
* { font-size: 1em; }
.String { color: #4a708b; }
.PreProc { color: #1874cd; }
.Statement { color: #b03060; font-weight: bold; }
.Comment { color: #0000ee; font-style: italic; }
.Type { color: #008b00; font-weight: bold; }
-->
</style>

<script type='text/javascript'>
<!--

-->
</script>
</head>
<body>
<pre id='vimCodeElement'>

<span class="Comment">/*</span><span class="Comment">*************************************************************************\</span>

<span class="Comment">MODULE: GF2XVec</span>

<span class="Comment">SUMMARY:</span>

<span class="Comment">The class GF2XVec implements vectors of fixed-length GF2X's.  You can</span>
<span class="Comment">allocate a vector of GF2X's of a specified length, where the maximum</span>
<span class="Comment">size of each GF2X is also specified.  These parameters can be specified</span>
<span class="Comment">either with a constructor, or with SetSize.  It is an error to</span>
<span class="Comment">try to re-size a vector of non-xero , or store a GF2X that doesn't fit.  </span>
<span class="Comment">The space can be released with &quot;kill&quot;, and then you are free to call SetSize</span>
<span class="Comment">again.  If you want more flexible---but less efficient---vectors, use</span>
<span class="Comment">vec_GF2X.</span>

<span class="Comment">\*************************************************************************</span><span class="Comment">*/</span>

<span class="PreProc">#include </span><span class="String">&lt;NTL/GF2X.h&gt;</span>


<span class="Type">class</span> GF2XVec {
<span class="Statement">public</span>:
   GF2XVec();

   GF2XVec&amp; <span class="Statement">operator</span>=(<span class="Type">const</span> GF2XVec&amp;);
   <span class="Comment">// first kill()'s destination (unless source and destination are</span>
   <span class="Comment">// identical)</span>

   GF2XVec(<span class="Type">const</span> GF2XVec&amp;);

   ~GF2XVec();

   GF2XVec(GF2XVec&amp;&amp; other) <span class="Statement">noexcept</span>;
   GF2XVec&amp; <span class="Statement">operator</span>=(GF2XVec&amp;&amp; other) <span class="Statement">noexcept</span>;


   GF2XVec(<span class="Type">long</span> n, <span class="Type">long</span> d);
   <span class="Comment">// sets length to n and max size of each element to d,</span>
   <span class="Comment">// where the size d measures the number of words </span>

   <span class="Type">void</span> SetSize(<span class="Type">long</span> n, <span class="Type">long</span> d);
   <span class="Comment">// sets length to n and max size of each element to d,</span>
   <span class="Comment">// where the size d measures the number of words </span>

   <span class="Type">long</span> length() <span class="Type">const</span>;
   <span class="Comment">// length of vector</span>

   <span class="Type">long</span> BaseSize() <span class="Type">const</span>;
   <span class="Comment">// max size of each element</span>

   <span class="Type">void</span> kill();
   <span class="Comment">// release space</span>


   GF2X* elts();
   <span class="Type">const</span> GF2X* elts() <span class="Type">const</span>;
   <span class="Comment">// pointer to first element</span>

   GF2X&amp; <span class="Statement">operator</span>[](<span class="Type">long</span> i);
   <span class="Type">const</span> GF2X&amp; <span class="Statement">operator</span>[](<span class="Type">long</span> i) <span class="Type">const</span>;
   <span class="Comment">// indexing operator; starts at 0; no range checking</span>

   swap(GF2XVec&amp; x);
   <span class="Comment">// swap with x by swapping pointers</span>

   <span class="Type">void</span> move(GF2XVec&amp; other);
   <span class="Comment">// quick move other to *this</span>
};


<span class="Type">void</span> swap(GF2XVec&amp; x, GF2XVec&amp; y);
<span class="Comment">// swaps x and y by swapping pointers</span>

</pre>
</body>
</html>
<!-- vim: set foldmethod=manual : -->