⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gf2xvec.txt

📁 数值算法库for Unix
💻 TXT
字号:
/**************************************************************************\MODULE: GF2XVecSUMMARY:The class GF2XVec implements vectors of fixed-length GF2X's.  You canallocate a vector of GF2X's of a specified length, where the maximumsize of each GF2X is also specified.  These parameters can be specifiedonce, either with a constructor, or with SetSize.  It is an error totry to re-size a vector, or store a GF2X that doesn't fit.  The spacecan be released with "kill", and then you are free to call SetSizeagain.  If you want more flexible---but less efficient---vectors, usevec_GF2X.\**************************************************************************/#include <NTL/GF2X.h>class GF2XVec {public:   GF2XVec();   GF2XVec& operator=(const GF2XVec&);    // first kill()'s destination (unless source and destination are   // identical)   GF2XVec(const GF2XVec&);    ~GF2XVec();   GF2XVec(long n, long d);   // sets length to n and max size of each element to d,   // where the size d measures the number of words    void SetSize(long n, long d);   // sets length to n and max size of each element to d,   // where the size d measures the number of words    long length() const;   // length of vector   long BaseSize() const;   // max size of each element   void kill();   // release space   GF2X* elts();   const GF2X* elts() const;   // pointer to first element   GF2X& operator[](long i);   const GF2X& operator[](long i) const;   // indexing operator; starts at 0; no range checking};void swap(GF2XVec& x, GF2XVec& y);// swaps x and y by swapping pointers

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -