5. Dynamic Array: array sorting and search

Source: Internet
Author: User

* Carrayx

-The array keyword can be used to define the attributes of array elements for sorting and searching the entire array.

-The abstract base class of the array keyword is tkey, and its derived class has

· Tkeyarrayfix: Array Used for fixed-length elements

· Tkeyarrayvar: Array Used for variable-length elements

· Tkeyarraypak: An array for packaging elements (variable length)

-To access elements in a keyword order, you need to construct appropriate tkeyarrayfix, tkeyarrayvar, or tkeyarraypak objects, and pass them to the member functions sort (), insertisql (), find (), or findisq () of the array () medium

 

* Rarray and rpointerarray

-Sorting and searching are more efficient than carrayx.

-Objects contained in rarray and rpointerarray can be sorted using comparison functions of element classes.

-Encapsulate sorting objects in the tlinearorder <class T> package

-Similar search operations, which must be encapsulated in tidentityrelation <class T>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.