-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGF2XVec.cpp.html
89 lines (68 loc) · 3.9 KB
/
GF2XVec.cpp.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<!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>/Volumes/Unix/unix-files.noindex/ntl-new/ntl-9.6.0/doc/GF2XVec.cpp.html</title>
<meta name="Generator" content="Vim/7.3">
<meta name="plugin-version" content="vim7.3_v6">
<meta name="syntax" content="cpp">
<meta name="settings" content="use_css">
<style type="text/css">
<!--
pre { font-family: monospace; color: #000000; background-color: #ffffff; }
body { font-family: monospace; color: #000000; background-color: #ffffff; }
.Statement { color: #b03060; font-weight: bold; }
.Type { color: #008b00; font-weight: bold; }
.String { color: #4a708b; }
.PreProc { color: #1874cd; }
.Comment { color: #0000ee; font-style: italic; }
-->
</style>
</head>
<body>
<pre>
<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 "kill", 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"><NTL/GF2X.h></span>
<span class="Type">class</span> GF2XVec {
<span class="Statement">public</span>:
GF2XVec();
GF2XVec& <span class="Statement">operator</span>=(<span class="Type">const</span> GF2XVec&);
<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&);
~GF2XVec();
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& <span class="Statement">operator</span>[](<span class="Type">long</span> i);
<span class="Type">const</span> GF2X& <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>
};
<span class="Type">void</span> swap(GF2XVec& x, GF2XVec& y);
<span class="Comment">// swaps x and y by swapping pointers</span>
</pre>
</body>
</html>