File tree 8 files changed +29
-428
lines changed
8 files changed +29
-428
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -57,7 +57,6 @@ a guide that can help you out:
57
57
* [ Strings] ( guide-strings.html )
58
58
* [ Pointers] ( guide-pointers.html )
59
59
* [ References and Lifetimes] ( guide-lifetimes.html )
60
- * [ Containers and Iterators] ( guide-container.html )
61
60
* [ Tasks and Communication] ( guide-tasks.html )
62
61
* [ Foreign Function Interface] ( guide-ffi.html )
63
62
* [ Writing Unsafe and Low-Level Code] ( guide-unsafe.html )
Original file line number Diff line number Diff line change 10
10
11
11
//! A priority queue implemented with a binary heap.
12
12
//!
13
+ //! Insertions have `O(log n)` time complexity and checking or popping the largest element is
14
+ //! `O(1)`. Converting a vector to a priority queue can be done in-place, and has `O(n)`
15
+ //! complexity. A priority queue can also be converted to a sorted vector in-place, allowing it to
16
+ //! be used for an `O(n log n)` in-place heapsort.
17
+ //!
13
18
//! # Example
14
19
//!
15
20
//! This is a larger example which implements [Dijkstra's algorithm][dijkstra]
Original file line number Diff line number Diff line change 8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
- //! A double-ended queue implemented as a circular buffer.
12
- //!
13
- //! `RingBuf` implements the trait `Deque`. It should be imported with
14
- //! `use collections::Deque `.
11
+ //! This crate implements a double-ended queue with `O(1)` amortized inserts and removals from both
12
+ //! ends of the container. It also has `O(1)` indexing like a vector. The contained elements are
13
+ //! not required to be copyable, and the queue will be sendable if the contained type is sendable.
14
+ //! Its interface `Deque` is defined in ` collections`.
15
15
16
16
use core:: prelude:: * ;
17
17
Original file line number Diff line number Diff line change 8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
- //! An ordered map and set implemented as self-balancing binary search
12
- //! trees. The only requirement for the types is that the key implements
13
- //! `Ord`.
11
+ //! Maps are collections of unique keys with corresponding values, and sets are
12
+ //! just unique keys without a corresponding value. The `Map` and `Set` traits in
13
+ //! `std::container` define the basic interface.
14
+ //!
15
+ //! This crate defines the `TreeMap` and `TreeSet` types. Their keys must implement `Ord`.
16
+ //!
17
+ //! `TreeMap`s are ordered.
14
18
//!
15
19
//! ## Example
16
20
//!
Original file line number Diff line number Diff line change 8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
- //! Ordered containers with unsigned integer keys,
12
- //! implemented as radix tries (`TrieSet` and `TrieMap` types).
11
+ //! Maps are collections of unique keys with corresponding values, and sets are
12
+ //! just unique keys without a corresponding value. The `Map` and `Set` traits in
13
+ //! `std::container` define the basic interface.
14
+ //!
15
+ //! This crate defines `TrieMap` and `TrieSet`, which require `uint` keys.
16
+ //!
17
+ //! `TrieMap` is ordered.
13
18
14
19
use core:: prelude:: * ;
15
20
Original file line number Diff line number Diff line change 8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
- //! An owned, growable vector.
11
+ //! A growable list type, written `Vec<T>` but pronounced 'vector.'
12
+ //!
13
+ //! Vectors have `O(1)` indexing, push (to the end) and pop (from the end).
12
14
13
15
use core:: prelude:: * ;
14
16
Original file line number Diff line number Diff line change @@ -56,12 +56,6 @@ loop {
56
56
57
57
This `for` loop syntax can be applied to any iterator over any type.
58
58
59
- ## Iteration protocol and more
60
-
61
- More detailed information about iterators can be found in the [container
62
- guide](http://doc.rust-lang.org/guide-container.html) with
63
- the rest of the rust manuals.
64
-
65
59
*/
66
60
67
61
use clone:: Clone ;
You can’t perform that action at this time.
0 commit comments