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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? vector.txt

?? 大數(shù)運算類
?? 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一区二区三区免费野_久草精品视频
亚洲高清不卡在线| 国产精品沙发午睡系列990531| 亚洲蜜臀av乱码久久精品| 成人免费视频视频在线观看免费| 久久先锋影音av| 韩国成人在线视频| 国产亚洲精品超碰| www.av亚洲| 亚洲成国产人片在线观看| 欧美日韩国产三级| 久久精品国产99国产精品| 久久久三级国产网站| 91蜜桃免费观看视频| 一区二区三区.www| 91麻豆精品91久久久久同性| 久久精品二区亚洲w码| 国产精品激情偷乱一区二区∴| 色婷婷综合久久| 看片的网站亚洲| 亚洲欧美自拍偷拍| 91精品国产色综合久久不卡蜜臀| 激情五月婷婷综合网| 亚洲视频在线观看一区| 欧美精品粉嫩高潮一区二区| 国产成人精品一区二区三区四区| 亚洲免费av高清| 精品毛片乱码1区2区3区| aaa欧美日韩| 蜜臀av一区二区在线免费观看 | 亚洲一区欧美一区| 日韩精品中文字幕在线一区| www.66久久| 久久精品国产精品亚洲综合| 亚洲乱码国产乱码精品精98午夜| 91精品午夜视频| 一本色道a无线码一区v| 国模冰冰炮一区二区| 亚洲综合免费观看高清完整版| 欧美精品一区二区三区在线播放| 欧洲国内综合视频| 成人动漫在线一区| 日韩经典中文字幕一区| 亚洲精品美国一| 久久久久综合网| 555www色欧美视频| 色一情一伦一子一伦一区| 国产乱码字幕精品高清av| 亚洲国产aⅴ成人精品无吗| 欧美国产视频在线| 欧美成人vps| 欧美三日本三级三级在线播放| 成人性视频免费网站| 另类小说色综合网站| 亚洲国产欧美在线| 亚洲欧洲精品一区二区三区不卡| 久久综合五月天婷婷伊人| 欧美精品aⅴ在线视频| 色综合久久中文字幕| 成人免费看片app下载| 国产主播一区二区| 麻豆传媒一区二区三区| 婷婷国产在线综合| 亚洲狠狠爱一区二区三区| 国产精品久久久久影院亚瑟| 国产亚洲1区2区3区| 久久久欧美精品sm网站| 日韩亚洲电影在线| 日韩三级视频中文字幕| 69久久夜色精品国产69蝌蚪网| 欧美亚洲日本一区| 在线欧美一区二区| 91久久线看在观草草青青| 91污在线观看| 色综合视频一区二区三区高清| 成人黄色a**站在线观看| 国产91富婆露脸刺激对白| 高清av一区二区| 粉嫩嫩av羞羞动漫久久久| 国产ts人妖一区二区| 国产成人综合亚洲网站| 国产高清精品网站| 成人精品视频.| 成人av电影免费在线播放| a亚洲天堂av| 色8久久人人97超碰香蕉987| 色哟哟亚洲精品| 欧美日韩色一区| 91精品黄色片免费大全| 精品国产91亚洲一区二区三区婷婷| 日韩一卡二卡三卡| 2020国产精品久久精品美国| 久久久久久久久伊人| 国产精品不卡视频| 一区二区三区在线高清| 日韩av一级片| 国产在线视频不卡二| 成人精品视频一区二区三区尤物| 色综合久久中文综合久久97 | 欧美a级理论片| 国产真实乱偷精品视频免| 成人av网站大全| 欧美在线你懂得| 精品粉嫩超白一线天av| 国产精品美女久久福利网站| 亚洲成人一二三| 久久99精品久久只有精品| 粉嫩嫩av羞羞动漫久久久| 欧美亚洲愉拍一区二区| 欧美tk丨vk视频| 亚洲免费观看高清完整版在线观看| 一区二区三区四区在线播放| 青青草国产成人av片免费| 不卡一卡二卡三乱码免费网站| 欧美网站一区二区| 精品91自产拍在线观看一区| 亚洲三级在线免费观看| 亚洲 欧美综合在线网络| 国产成人午夜视频| 欧美三级视频在线观看| 久久久亚洲欧洲日产国码αv| 亚洲欧美国产高清| 久久97超碰色| 欧美视频中文字幕| 欧美经典三级视频一区二区三区| 亚洲一级不卡视频| 国产成人免费视频| 欧美精品vⅰdeose4hd| 中文字幕制服丝袜成人av| 日韩成人一区二区三区在线观看| 成人av在线一区二区| 日韩欧美一级二级三级久久久| 国产精品久线在线观看| 日韩av电影免费观看高清完整版 | 久久99精品国产| 欧美中文字幕不卡| 国产精品黄色在线观看| 久久狠狠亚洲综合| 欧美日韩国产中文| 亚洲少妇30p| 国产精品中文欧美| 欧美一卡2卡3卡4卡| 一区二区三区四区av| 国产成人av电影在线播放| 日韩欧美一级在线播放| 亚洲一二三四区| 99久久精品99国产精品 | 中文字幕一区二区三区精华液| 蜜臀久久久久久久| 欧美日韩国产免费一区二区| 樱桃视频在线观看一区| 成人深夜在线观看| 久久亚洲二区三区| 国产一区999| 日韩免费在线观看| 欧美aaaaa成人免费观看视频| 欧美色老头old∨ideo| 亚洲精品视频一区| av一区二区三区黑人| 国产精品久久久久久久久久久免费看| 韩国午夜理伦三级不卡影院| 欧美一级生活片| 免费观看成人av| 日韩欧美中文一区二区| 麻豆精品新av中文字幕| 日韩视频一区二区| 老司机精品视频线观看86| 欧美电视剧在线观看完整版| 极品销魂美女一区二区三区| 欧美大片拔萝卜| 狠狠色2019综合网| 久久久99免费| 国产东北露脸精品视频| 国产欧美一区二区三区在线看蜜臀| 国产精品一品二品| 中文字幕免费不卡| 91免费观看视频在线| 亚洲第四色夜色| 日韩一区二区在线播放| 韩国成人精品a∨在线观看| 国产欧美日韩亚州综合 | 国内精品免费**视频| 国产丝袜欧美中文另类| 波多野结衣的一区二区三区| 亚洲精品水蜜桃| 欧美日韩电影在线播放| 日本aⅴ精品一区二区三区| 久久只精品国产| 99视频精品全部免费在线| 一区二区三区四区国产精品| 51精品秘密在线观看| 国产主播一区二区| 亚洲视频在线一区观看| 欧美日韩高清影院| 国产一区二区三区四区五区入口 | 欧美亚洲动漫精品| 日韩精品五月天| 国产无人区一区二区三区| 91亚洲精品久久久蜜桃网站| 午夜电影久久久| 欧美国产一区视频在线观看|