Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?

Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su
いろいろな言語で、キーと値とを対応づけるデータ構造、いわゆる連想配列、辞書、……たちがどのように呼ばれているか、気になったので調べてみた。 おおよそ、対応表(map)、辞書(dictionary)、実装の名前をそのまま(hash-table)、 Perl風(hash)に分けられると思う。 Common Lisp: hash-table Scheme: hash-table (SRFI-69, SRFI-125 → R7RS-large), hashtable (R6RS Scheme, SRFI-126), map (SRFI-44), mapping (SRFI-146) Haskell: Map OCaml: Hashtbl, Map SML: hash_table (sml-nj-lib) C++: map, multimap, unordered_map, unordered_mu
プログラムを書いていると、入力値が辞書に含まれているかを調べたいようなことがあります。たとえば、ユーザーに都道府県名を入力させて、それが正しい都道府県名であるかどうかを調べたい、というようなことがあるかもしれません。 このような内容をPHPで書く際、キーに都道府県名を持つような連想配列を作る習慣がある人は多いはずです。これは典型的な連想配列の使い方といえるでしょう。 <?php $prefs = array( "北海道" => true, "青森" => true, // ... "沖縄" => true, ); if (isset($prefs[$input])) { // 都道府県名が正しい時の処理 } 一方で、in_array関数を使うやり方も考えられます。 <?php $prefs = array( "北海道", "青森", // ... "沖縄", ); if (in_array
優先度付きキュー(ゆうせんどつきキュー、英: priority queue)は、以下の4つの操作をサポートする抽象データ型である。 キューに対して要素を優先度付きで追加する。 最も高い優先度を持つ要素をキューから取り除き、それを返す。 (オプション) 最も高い優先度を持つ要素を取り除くことなく参照する。 (オプション) 指定した要素を取り除くことなく優先度を変更する 優先度付きキューを実装する最も簡単な方法は、連想配列を用いて、それぞれの優先度に要素のリストを繋げることである。連想リストやハッシュテーブルを連想配列の実装に用いた場合は、要素の追加はO(1)であるが、要素の削除や先頭の参照にはすべてのキーを探索しなければならないのでO(n)かかる。もし、平衡2分探索木を使用した場合は、上記の3つの操作をO(log n)で行うことができる。平衡木は用意されているが、それ以上のものは用意されてい
The bash man page has long had the following bug listed: "It's too big and too slow" (at the very bottom of the man page). If you agree with that, then you probably won't want to read about the "new" associative arrays that were added in version 4.0 of bash. On the other hand, if you've ever used any modern Office Suite and seen code-bloat at its finest and just think the bash folks are exaggerati
すべての Microsoft 製品 Global Microsoft 365 Teams Copilot Windows Surface Xbox セール 法人向け サポート ソフトウェア Windows アプリ AI OneDrive Outlook Skype OneNote Microsoft Teams PC とデバイス Xbox を購入する アクセサリ VR & 複合現実 エンタメ Xbox Game Pass Ultimate Xbox とゲーム PC ゲーム Windows ゲーム 映画とテレビ番組 法人向け Microsoft Cloud Microsoft Security Azure Dynamics 365 一般法人向け Microsoft 365 Microsoft Industry Microsoft Power Platform Windows 365 開発者
連想配列(れんそうはいれつ、英語: associative array)とは、コンピュータプログラミングにおいて、添え字にスカラー数値以外のデータ型(文字列型等)も使用できる配列である。抽象データ型のひとつ。連想リスト、連想コンテナ、辞書(あるいはカタカナでディクショナリ 英語: dictionary)、ハッシュ(英語: hash)、マップ(英語: map)とも呼ばれる。 歴史的には、最初に LISP の連想リストとして広く認知された。その後、SNOBOL で table として、AWK で連想配列として実装したことで、その潜在能力がさらに広く知られるようになった。現在、Rubyなど一部の言語では、添え字にはどのようなデータでも使えるものもある。 プログラミングにおける単純な配列は、特定のアドレスからのオフセット(ずれ)をインデックスとして、アドレスとオフセットによって目的の値を得る。これ
In April 2020, NoSQL-Database.org joined forces with hostingdata.co.uk. These two websites and the teams responsible for their creation will now work together. The decision was made after the owners recognized that they have a common objective – helping people in the UK (and beyond) understand web hosting and all its intricacies, including NoSQL databases. This list is updated monthly. We’ve teste
"Dictionary (data structure)" redirects here and is not to be confused with data dictionary. "Associative container" redirects here. For their C++ implementation, see associative containers (C++). In computer science, an associative array, key-value store, map, symbol table, or dictionary is an abstract data type that stores a collection of (key, value) pairs, such that each possible key appears a
この記事は検証可能な参考文献や出典が全く示されていないか、不十分です。 出典を追加して記事の信頼性向上にご協力ください。(このテンプレートの使い方) 出典検索?: "ハッシュテーブル" – ニュース · 書籍 · スカラー · CiNii · J-STAGE · NDL · dlib.jp · ジャパンサーチ · TWL (2016年9月) ハッシュテーブルの例(名前をキーとして電話番号を検索) ハッシュテーブル (英: hash table) は、キーと値の組(エントリと呼ぶ)を複数個格納し、キーに対応する値をすばやく参照するためのデータ構造。ハッシュ表ともいう。ハッシュテーブルは連想配列や集合の効率的な実装のうち1つである。 ハッシュテーブルはキーをもとに生成されたハッシュ値を添え字とした配列である。通常、配列の添え字には非負整数しか扱えない。そこで、キーを要約する値であるハッシュ値を
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く