添加的内容 删除的内容
小 (机器人:删除1个模板:Wayback) |
(// Edit via Wikiplus) |
||
(未显示1个用户的3个中间版本) | |||
第6行: | 第6行: | ||
== 概览 == |
== 概览 == |
||
容器可以三种方式看待: |
容器可以三种方式看待: |
||
* ''访问'':即访问容器中对象的方式。在[[数组]]中,访问凭借数组索引完成。在[[堆栈]]中,访问遵循[[先進先出|先入后出]](或后入先出)的顺序<ref name = "investopedia LIFO">{{Cite web |url=http://www.investopedia.com/terms/l/lifo.asp#axzz1ZoGPLx59 |title=LIFO(investopedia.com) |accessdate=2016-08-19 |
* ''访问'':即访问容器中对象的方式。在[[数组]]中,访问凭借数组索引完成。在[[堆栈]]中,访问遵循[[先進先出|先入后出]](或后入先出)的顺序<ref name = "investopedia LIFO">{{Cite web |url=http://www.investopedia.com/terms/l/lifo.asp#axzz1ZoGPLx59 |title=LIFO(investopedia.com) |accessdate=2016-08-19 }}</ref>。在[[队列]]中,访问遵循[[先進先出|先入先出]](或后入后出)的顺序<ref name = "Investopedia FIFO">{{Cite web |url=http://www.investopedia.com/terms/f/fifo.asp#axzz1ZoGPLx59 |title=FIFO(investopedia.com) |accessdate=2016-08-19 }}</ref><ref name = "businessdictionary">{{Cite web |url=http://www.businessdictionary.com/definition/first-in-first-out-FIFO.html |title=FIFO(businessdictionary.com) |accessdate=2016-08-19 }}</ref>。 |
||
* ''存储'':即存储容器中对象的方式。 |
* ''存储'':即存储容器中对象的方式。 |
||
* ''遍历'':即遍历容器中对象的方式。 |
* ''遍历'':即遍历容器中对象的方式。 |
||
第33行: | 第33行: | ||
== 不同实现 == |
== 不同实现 == |
||
* .NET: [http://msdn.microsoft.com/en-us/library/system.collections.aspx System.Collections (MSDN)] |
* .NET: [http://msdn.microsoft.com/en-us/library/system.collections.aspx System.Collections (MSDN)] |
||
* ActionScript3: [ |
* ActionScript3: [http://sibirjak.com/osflash/projects/as3commons-collections/ AS3Commons Collections Framework] |
||
* C++: [[C++标准库]] (SC++L) or the obsolete [[标准模板库]] (STL) |
* C++: [[C++标准库]] (SC++L) or the obsolete [[标准模板库]] (STL) |
||
** 容器在[[标准模板库]]中被分为[[关联容器]]和标准的[[序列容器]]。除了这两种类型之外,也存在[[标准模板库#容器|容器适配器]]。由容器实现的数据结构包含[[数组]]、[[列表]]、[[映射]]、[[队列]]、[[集合 (计算机科学)|集合]]、[[堆栈]]、[[表格|表]]、[[树 (数据结构)|树]]以及[[Vector (STL)|向量]]。 |
** 容器在[[标准模板库]]中被分为[[关联容器]]和标准的[[序列容器]]。除了这两种类型之外,也存在[[标准模板库#容器|容器适配器]]。由容器实现的数据结构包含[[数组]]、[[列表]]、[[映射]]、[[队列]]、[[集合 (计算机科学)|集合]]、[[堆栈]]、[[表格|表]]、[[树 (数据结构)|树]]以及[[Vector (STL)|向量]]。 |
||
第42行: | 第42行: | ||
| accessdate = 2013-04-20 |
| accessdate = 2013-04-20 |
||
| url = http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/composites.htm#CIHIEBJC |
| url = http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/composites.htm#CIHIEBJC |
||
| archive-date = 2013-05-09 |
|||
| archive-url = https://web.archive.org/web/20130509034453/http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/composites.htm#CIHIEBJC |
|||
| dead-url = no |
|||
}}</ref> |
}}</ref> |
||
* [[Python]]: 内置容器 ''list''、''dict''、''tuple''和''set'',可使用[https://docs.python.org/3/library/collections.html collections]模块进一步拓展。 |
* [[Python]]: 内置容器 ''list''、''dict''、''tuple''和''set'',可使用[https://docs.python.org/3/library/collections.html collections]模块进一步拓展。 |
||
第64行: | 第61行: | ||
* [http://www.grantjenks.com/docs/sortedcontainers/ Python SortedContainers module] A fast implementation of sorted list, sorted dict, and sorted set data types in Python. |
* [http://www.grantjenks.com/docs/sortedcontainers/ Python SortedContainers module] A fast implementation of sorted list, sorted dict, and sorted set data types in Python. |
||
{{数据类型}} |
{{数据类型}} |
||
[[面向对象编程]] |
|||
{{DEFAULTSORT:容器 (数据结构)}} |
|||
[[Category:数据结构]] |
[[Category:数据结构]] |
||
[[Category:抽象数据类型]] |
[[Category:抽象数据类型]] |