亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? vector.txt

?? 一個比較通用的大數運算庫
?? TXT
字號:


/**************************************************************************\

MODULE: vector

SUMMARY:

Macros are defined providing template-like classes for dynamic-sized
arrays.

The macro NTL_vector_decl(T,vec_T) declares a class vec_T, whose
implementation can be instantiated with NTL_vector_impl(T,vec_T).  It is
presumed that the underlying type have a public default constructor, copy
constructor, assignment operator, and a destructor (this is
normally the case for most types).

Note that the type T must be a type name (you'll need to make
a typedef for the type if this is not the case).

If the type T supports I/O operator << and >>, then vec_T can be
made to support these operators as well using NTL_io_vector_decl(T,vec_T) and
NTL_io_vector_impl(T,vec_T).

The same goes for equality operators == and != using 
NTL_eq_vector_decl(T,vec_T) and NTL_eq_vector_impl(T,vec_T).

The declaration

   vec_T v;

creates a zero-length vector.  To grow this vector to length n,
execute

   v.SetLength(n)

This causes space to be allocated for (at least) n elements, and also
causes the delault constructor for T to be called to initialize these
elements.

The current length of a vector is available as v.length().

The i-th vector element (counting from 0) is accessed as v[i].  If the
macro NTL_RANGE_CHECK is defined, code is emitted to test if 0 <= i <
v.length().  This check is not performed by default.

For old-time FORTRAN programmers, the i-th vector element (counting
from 1) is accessed as v(i).

Let n = v.length().  Calling v.SetLength(m) with m <= n sets the
current length of v to m (but does not call any destructors or free
any space).  Calling v.SetLength(m) with m > n will allocate space and
initialize as necessary, but will leave the values of the already
allocated elements unchanged (although their addresses may change).
Initializations are performed using T's default constructor.

v.MaxLength() is the largest value of n for which v.SetLength(n) was invoked,
and is equal to the number of entries that have been initialized.
v.SetMaxLength(n) will allocate space for and
initialize up to n elements, without changing v.length().

When v's destructor is called, all constructed elements will be
destructed, and all space will be relinquished.

Space is managed using malloc, realloc, and free.  When a vector is
grown, a bit more space may be allocated than was requested for
efficiency reasons.

Note that when a vector is grown, the space is reallocated using
realloc, and thus the addresses of vector elements may change,
possibly creating dangling references to vector elements.  One has to
be especially careful of this when using vectors passed as reference
parameters that may alias one another.

Because realloc is used to grow a vector, the objects stored
in a vector should be "relocatable"---that is, they shouldn't care
what their actual address is, which may change over time.
Most reasonable objects satisfy this constraint.

v.allocated() is the number of elements which have been allocated,
which may be more than the number elements initialized.
Note that if n <= v.allocated(), then v.SetLength(n) is guaranteed
not to cause any memory allocation, or movement of objects.

\**************************************************************************/

class vec_T {  
public:  

   vec_T();  // initially length 0

   vec_T(const vec_T& a); 
   // copy constructor;  currently, this is implemented by
   // initializing elements using T's defaults constructor and 
   // copying elements from a using T's assigment operator.

   vec_T& operator=(const vec_T& a);  
   // assignment...performs an element-wise assignment
   // using T's assignment operator.

   ~vec_T();  
  
   void SetLength(long n);  
   // set current length to n, growing vector if necessary

   long length() const;
   // current length
   // SIZE INVARIANT: length()*sizeof(T) < 2^(NTL_BITS_PER_LONG-4)
  
   T& operator[](long i);
   const T& operator[](long i) const;
   // indexing operation, starting from 0.
   // The first version is applied to non-const vec_T,
   // and returns a non-const reference to a T, while the second version
   // is applied to a const vec_T and returns a const reference to a T.
  
   T& operator()(long i);
   const T& operator()(long i) const;
   // indexing operation, starting from 1
   // The first version is applied to non-const vec_T,
   // and returns a non-const reference to a T, while the second version
   // is applied to a const vec_T and returns a const reference to a T.
  
   T* elts();
   const T* elts() const;
   // returns address of first vector element (or 0 if no space has
   // been allocated for this vector).  If a vector potentially has
   // length 0, it is safer to write v.elts() instead of &v[0].
   // The first version is applied to non-const vec_T,
   // and returns a non-const pointer to a T, while the second version
   // is applied to a const vec_T and returns a const reference to a T.


   // the remaining member functions are a bit esoteric (skip on first
   // reading):

   vec_T(INIT_SIZE_TYPE, long n);
   // vec_T(INIT_SIZE, n) initializes with an intial length of n.

   void kill(); 
   // release space and set to length 0

   void SetMaxLength(long n); 
   // allocates space and initializes up to n elements. Does not change
   // current length

   void FixLength(long n);
   // sets length to n and prohibits all future length changes.
   // FixLength may only be invoked immediately after the default
   // construction or kill.

   // The kill operation is also subsequently prohibited, and swap is
   // allowed on fixed length vectors of the same length.

   // FixLength is provided mainly to implement mat_T, to enforce
   // the restriction that all rows have the same length.

   long fixed() const;
   // test if length has been fixed by FixLength().

   long MaxLength() const;
   // maximum length, i.e., number of allocated and initialized elements

   long allocated() const;
   // the number of objects for which space has been allocated, but not
   // necessarily initialized;  this may be larger than MaxLength().

   T& RawGet(long i);
   const T& RawGet(long i) const;
   // indexing with no range checking

   long position(const T& a) const;
   // returns position of a in the vector, or -1 if it is not there.
   // The search is conducted from position 0 to MaxAlloc()-1 of the vector, 
   // and an error is raised if the object is found at position MaxLength()
   // or higher (in which case a references an uninitialized object).
   // Note that if NTL_CLEAN_PTR flag is set, this routine takes
   // linear time, and otherwise, it takes constant time.

   long position1(const T& a) const;
   // returns position of a in the vector, or -1 if it is not there.
   // The search is conducted from position 0 to length()-1 of the vector.
   // Note that if NTL_CLEAN_PTR flag is set, this routine takes
   // linear time, and otherwise, it takes constant time.
         
};   


/**************************************************************************\

                       Some utility routines

\**************************************************************************/

   
void swap(vec_T& x, vec_T& y);
// swaps x & y by swapping pointers

void append(vec_T& v, const T& a); 
// appends a to the end of v

void append(vec_T& v, const vec_T& w);
// appends w to the end of v




/**************************************************************************\

                             Input/Output

The I/O operators can be declared with NTL_io_vector_decl(T,vec_T), and
implemented using NTL_io_vector_impl(T,vec_T).  Elements are read and written
using the underlying I/O operators << and >> for T.

The I/O format for a vector v with n elements is:

   [v[0] v[1] ... v[n-1]]

\**************************************************************************/

istream& operator>>(istream&, vec_T&);  
ostream& operator<<(ostream&, const vec_T&);  



/**************************************************************************\

                              Equality Testing

The equality testing operators == and != can be declared
with NTL_eq_vector_decl(T,vec_T) and implemented with 
NTL_eq_vector_impl(T,vec_T).
The tests are performed using the underlying operator == for T.

\**************************************************************************/


long operator==(const vec_T& a, const vec_T& b);  
long operator!=(const vec_T& a, const vec_T& b);


/**************************************************************************\

                  Customized Constructors and Destructors
 
Esoteric: skip on first reading

When new elements in a vector need to be constructed, the routine

   void BlockConstruct(T* p, long n);

is called, whose default implementation invokes the default
constructor for T n times.  Likewise, when a vector is destroyed, the
routine

   void BlockDestroy(T* p, long n);

is called, whose default implementation invokes the default destructor
for T n times.

Both of these default implementations can be overridden as follows.
Instead of implementing vec_T with NTL_vector_impl(T,vec_T), implement it
with NTL_vector_impl_plain(T,vec_T), and then write your own BlockConstruct and
BlockDestroy.

For an example of this, see vec_ZZ_p.c.

\**************************************************************************/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产综合色在线视频区| 日韩视频一区二区在线观看| 欧美美女激情18p| 久久久久久免费网| 亚洲一区二区三区视频在线| 国产成人免费在线观看| 51精品秘密在线观看| 成人欧美一区二区三区1314 | 亚洲在线中文字幕| 国产在线一区二区| 这里是久久伊人| 亚洲免费av高清| 99re热视频这里只精品| 欧美精品一区二区三| 日本不卡一二三区黄网| 欧美亚洲综合色| 亚洲精品欧美二区三区中文字幕| 国产成人夜色高潮福利影视| 欧美电视剧免费观看| 香蕉久久夜色精品国产使用方法| 99久久免费国产| 亚洲国产精品成人久久综合一区| 蜜桃视频在线观看一区二区| 欧美精品xxxxbbbb| 水野朝阳av一区二区三区| 欧美亚洲自拍偷拍| 亚洲男人天堂一区| 99国产精品久久久久| 国产精品国产三级国产三级人妇| 国产伦精品一区二区三区在线观看 | 色婷婷综合久久久久中文一区二区 | 精品国产污网站| 国内精品国产三级国产a久久| 欧美日韩国产大片| 日韩av电影一区| 日韩亚洲欧美在线| 精品在线免费观看| 久久久久久久久久久久久女国产乱 | 欧美成人女星排名| 久久99久久精品欧美| 欧美大片拔萝卜| 蜜臀99久久精品久久久久久软件| 91精选在线观看| 理论电影国产精品| 久久久亚洲精品一区二区三区| 国产一区二区免费视频| 国产欧美日本一区二区三区| 99在线精品一区二区三区| 亚洲三级电影全部在线观看高清| 色88888久久久久久影院野外| 一区二区三区丝袜| 日韩一级免费观看| 成人毛片老司机大片| 亚洲欧美一区二区三区国产精品| 欧美在线看片a免费观看| 日韩不卡一二三区| 国产亚洲福利社区一区| 91丨porny丨蝌蚪视频| 亚洲第一激情av| 精品久久久久久亚洲综合网| 国产91精品一区二区麻豆网站| 亚洲日本va午夜在线影院| 欧美视频中文一区二区三区在线观看| 石原莉奈在线亚洲二区| 久久婷婷成人综合色| 99视频精品在线| 男人的天堂久久精品| 久久久不卡网国产精品二区| 欧洲精品视频在线观看| 久久99精品久久久久久国产越南 | 欧洲生活片亚洲生活在线观看| 六月丁香婷婷色狠狠久久| 国产精品毛片高清在线完整版| 欧美天堂一区二区三区| 国产麻豆精品theporn| 一级女性全黄久久生活片免费| 欧美一级在线视频| 91麻豆国产自产在线观看| 蜜桃视频免费观看一区| 中文字幕在线播放不卡一区| 日韩欧美亚洲一区二区| 91小视频免费观看| 国产一区二区精品久久91| 一区二区三区日本| 久久久激情视频| 日韩精品一区二| 欧美三级资源在线| 91原创在线视频| 国产精品影视在线| 久久国产欧美日韩精品| 亚洲国产日韩综合久久精品| 国产视频一区二区在线观看| 4438x成人网最大色成网站| 91污片在线观看| 国产成人精品综合在线观看| 日本中文一区二区三区| 亚洲视频小说图片| 国产精品三级在线观看| 精品免费日韩av| 日韩三级电影网址| 欧美一区二区三区系列电影| 色哟哟精品一区| 成人av一区二区三区| 国产精品一区久久久久| 免费人成网站在线观看欧美高清| 亚洲香蕉伊在人在线观| 亚洲三级视频在线观看| 中文字幕日韩一区| 国产精品剧情在线亚洲| 日本一区二区三区四区| 久久久久9999亚洲精品| 久久久精品国产免费观看同学| 日韩三级视频在线看| 91精品国产色综合久久不卡电影 | 日韩高清一区在线| 日韩av电影免费观看高清完整版 | 国产乱码精品一区二区三| 精品亚洲aⅴ乱码一区二区三区| 日韩高清在线一区| 免费成人美女在线观看.| 蜜桃av一区二区在线观看| 天使萌一区二区三区免费观看| 亚洲一区二区三区不卡国产欧美| 亚洲欧美日韩在线不卡| 夜夜夜精品看看| 五月激情六月综合| 免费观看91视频大全| 蜜臂av日日欢夜夜爽一区| 毛片av中文字幕一区二区| 国产一区二区三区四| 国产91精品在线观看| 色综合天天天天做夜夜夜夜做| 色屁屁一区二区| 欧美日韩国产首页在线观看| 在线不卡a资源高清| 欧美成人综合网站| 国产精品黄色在线观看| 亚洲一卡二卡三卡四卡| 日本女优在线视频一区二区| 看电视剧不卡顿的网站| av中文字幕在线不卡| 欧美日韩国产免费| 久久久www成人免费毛片麻豆 | 久久久亚洲高清| 国产精品久久久久久亚洲伦 | 最近中文字幕一区二区三区| 亚洲国产aⅴ天堂久久| 狠狠色丁香婷婷综合| 色哟哟欧美精品| 精品久久久久av影院| 国产精品情趣视频| 丝袜美腿亚洲综合| 丰满放荡岳乱妇91ww| 6080国产精品一区二区| 国产精品色哟哟| 日本vs亚洲vs韩国一区三区二区 | 欧美人妖巨大在线| 精品sm在线观看| 亚洲欧美日韩人成在线播放| 奇米色一区二区三区四区| 成人黄色大片在线观看| 91精品国产乱| 亚洲婷婷综合色高清在线| 精品在线免费视频| 欧美羞羞免费网站| 亚洲国产精品成人综合色在线婷婷| 亚洲va在线va天堂| 成+人+亚洲+综合天堂| 91麻豆精品国产91久久久更新时间 | 亚洲综合免费观看高清完整版| 麻豆91免费观看| 欧美亚洲高清一区| 国产精品国产精品国产专区不片| 三级一区在线视频先锋| 色激情天天射综合网| 国产日韩欧美麻豆| 美女被吸乳得到大胸91| 欧美日韩精品系列| 亚洲国产精品精华液2区45| 免费观看在线综合色| 欧美色区777第一页| 亚洲色图视频网| 国产精品99久久久久久有的能看| 欧美一区在线视频| 亚洲成人激情社区| 欧美揉bbbbb揉bbbbb| 亚洲免费看黄网站| 不卡的看片网站| 国产精品免费免费| 懂色av中文字幕一区二区三区| 欧美一区二区三区不卡| 日本午夜一本久久久综合| 欧美精品亚洲二区| 亚洲一二三区视频在线观看| 一本久久a久久免费精品不卡| 中文文精品字幕一区二区| 国产福利视频一区二区三区| 精品乱码亚洲一区二区不卡| 久久www免费人成看片高清| 精品国产1区二区|