/usr/share/doc/NTL/ZZVec.txt is in libntl-dev 5.4.2-4.1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | /**************************************************************************\
MODULE: ZZVec
SUMMARY:
The class ZZVec implements vectors of fixed-length ZZ's. You can
allocate a vector of ZZ's of a specified length, where the maximum
size of each ZZ is also specified. The size is measured in terms
of the number of zzigits.
These parameters can be specified either with a constructor
or with SetSize. It is an error to try to re-size a vector of non-zero length,
or store a ZZ that doesn't fit. The space can be released with "kill",
and then you are free to call SetSize again.
If you want more flexible---but less efficient---vectors, use vec_ZZ.
\**************************************************************************/
#include <NTL/ZZ.h>
class ZZVec {
public:
ZZVec();
ZZVec& operator=(const ZZVec&);
// first kill()'s destination (unless source and destination are
// identical)
ZZVec(const ZZVec&);
~ZZVec();
ZZVec(long n, long d);
// sets length to n and max size of each element to d
void SetSize(long n, long d);
// sets length to n and max size of each element to d
long length() const;
// length of vector
long BaseSize() const;
// max size of each element
void kill();
// release space
ZZ* elts();
const ZZ* elts() const;
// pointer to first element
ZZ& operator[](long i);
const ZZ& operator[](long i) const;
// indexing operator; starts at 0; no range checking
};
void swap(ZZVec& x, ZZVec& y);
// swaps x and y by swapping pointers
|