名前空間
変種
操作

std::deque

提供: cppreference.com
< cpp‎ | container


 
 
 
はstd :: dequeの
メンバ関数
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
deque::deque
deque::~deque
deque::operator=
deque::assign
deque::get_allocator
要素アクセスの循環参照を解除するために使用されている
Original:
Element access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
deque::front
deque::back
イテレータ
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
deque::begin
deque::cbegin

(C++11)
deque::end
deque::cend

(C++11)
deque::rbegin
deque::crbegin

(C++11)
deque::rend
deque::crend

(C++11)
容量
Original:
Capacity
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
deque::empty
deque::size
deque::max_size
deque::shrink_to_fit
修飾子
Original:
Modifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
deque::clear
deque::insert
deque::emplace
deque::erase
deque::push_front
deque::emplace_front
deque::pop_front
deque::push_back
deque::emplace_back
deque::pop_back
deque::resize
deque::swap
 
Defined in header <deque>
template<

    class T,
    class Allocator = std::allocator<T>

> class deque;
std::deque(両端キュー)は、先頭と末尾の両方で高速挿入と削除を可能にするインデックス付きシーケンスコンテナです。また、両端のどちらかの端に挿入したり削除すると、残りの要素へのポインタや参照を無効決して.
Original:
std::deque (double-ended queue) is an indexed sequence container that allows fast insertion and deletion at both the beginning and the end. In addition, insertion and deletion at either end of a deque never invalidates pointers or references to the rest of the elements.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::vectorとは対照的に、両端キューの要素が連続して格納されていません:典型的な実装は、個別に割り当てられた固定サイズの配列のシーケンスを使用し.
Original:
As opposed to std::vector, the elements of a deque are not stored contiguously: typical implementations use a sequence of individually allocated fixed-size arrays.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
dequeのストレージは自動的に展開され、必要に応じて収縮する。それが新しいメモリ位置への既存の要素のコピーを伴わないためdequeの拡大はstd::vectorの拡大よりも安いです.
Original:
The storage of the deque is automatically expanded and contracted as needed. Expansion of a deque is cheaper than the expansion of a std::vector because it does not involve copying of the existing elements to a new memory location.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
dequeの上の一般的な操作の複雑さ(効率)は次のようになります
Original:
The complexity (efficiency) of common operations on deques is as follows:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • ランダムアクセス - 定数O(1)
    Original:
    Random access - constant O(1)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • 末尾または先頭に挿入または要素の除去 - 償却定数O(1)
    Original:
    Insertion or removal of elements at the end or beginning - amortized constant O(1)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • 要素の挿入または取り外し - リニアO(n)
    Original:
    Insertion or removal of elements - linear O(n)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
std::dequeContainerの要件を満たし、AllocatorAwareContainerSequenceContainerReversibleContainer.
Original:
std::deque meets the requirements of Container, AllocatorAwareContainer, SequenceContainer and ReversibleContainer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

目次

[編集] メンバータイプ

メンバー·タイプ
Original:
Member type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Definition
value_type T [edit]
allocator_type Allocator [edit]
size_type
符号なし整数型(通常size_t
Original:
Unsigned integral type (usually size_t)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
difference_type Signed integer type (usually ptrdiff_t) [edit]
reference Allocator::reference (C + + 11時まで)
value_type& (C + + 11以来) [edit]
const_reference Allocator::const_reference (C + + 11時まで)
const value_type& (C + + 11以来) [edit]
pointer Allocator::pointer (C + + 11時まで)
std::allocator_traits<Allocator>::pointer (C + + 11以来) [edit]
const_pointer Allocator::const_pointer (C + + 11時まで)
std::allocator_traits<Allocator>::const_pointer (C + + 11以来) [edit]
iterator RandomAccessIterator [edit]
const_iterator
一定のランダムアクセス反復子を返します
Original:
Constant random access iterator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
reverse_iterator std::reverse_iterator<iterator> [edit]
const_reverse_iterator std::reverse_iterator<const_iterator> [edit]

[編集] メンバ関数

dequeを構築します
Original:
constructs the deque
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]
destructs the deque
(パブリックメンバ関数) [edit]
コンテナに値を割り当てます
Original:
assigns values to the container
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]
コンテナに値を割り当てます
Original:
assigns values to the container
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]
関連したアロケータを返す
Original:
returns the associated allocator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]
要素アクセスの循環参照を解除するために使用されている
Original:
Element access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
指定された要素にアクセスします。境界チェックを行います。
(パブリックメンバ関数) [edit]
指定された要素にアクセスします
Original:
access specified element
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]
最初の要素にアクセスします
Original:
access the first element
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]
末尾の要素にアクセスします
(パブリックメンバ関数) [edit]
イテレータ
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
先頭を指すイテレータを返します
(パブリックメンバ関数) [edit]
末尾を指すイテレータを返す
Original:
returns an iterator to the end
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]
逆イテレータの先頭を返します
(パブリックメンバ関数) [edit]
逆イテレータの末尾を返します
(パブリックメンバ関数) [edit]
容量
Original:
Capacity
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
コンテナが空であるかどうかをチェックします
(パブリックメンバ関数) [edit]
要素数を返します
Original:
returns the number of elements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]
要素の最大数を返します
Original:
returns the maximum possible number of elements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]
未使用のメモリを解放してメモリ使用量を減らすことができます
Original:
reduces memory usage by freeing unused memory
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]
修飾子
Original:
Modifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
全ての要素を削除します
(パブリックメンバ関数) [edit]
要素を挿入します
(パブリックメンバ関数) [edit]
(C++11)
constructs element in-place
(パブリックメンバ関数) [edit]
要素を消去します
(パブリックメンバ関数) [edit]
コンテナの末尾に要素を追加します
(パブリックメンバ関数) [edit]
終了時にその場で要素を構成します
Original:
constructs elements in-place at the end
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]
最後の要素を削除します
Original:
removes the last element
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]
先頭に挿入要素
Original:
inserts elements to the beginning
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]
冒頭でその場で要素を構成します
Original:
constructs elements in-place at the beginning
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]
最初の要素を削除します
Original:
removes the first element
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]
changes the number of elements stored
(パブリックメンバ関数) [edit]
コンテナの内容をスワップします
(パブリックメンバ関数) [edit]

[編集] 非メンバ関数

辞書的にdeque内の値を比較します
Original:
lexicographically compares the values in the deque
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(関数テンプレート) [edit]
特殊化されたstd::swapアルゴリズム
(関数テンプレート) [edit]