Questions tagged [dictionary]

A dictionary, in computer science, is a data structure that maps keys to values such that given a key its corresponding value can be efficiently retrieved.

16 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7
votes
0answers
98 views

Agent-based Immutable Map

I am in the process of removing the last few pieces of mutable state from an F#-based distributed system. Some of the remaining mutable state is a ...
6
votes
0answers
379 views

IndexedArray Class: Uses a Dictionary Keys to Index a 2 Dimensional Array of Values

This class encapsulates a 2D Array and a Scripting Dictionary. Values are add or returned from to the Array using a Key and a ColumnIndex, e.g. ...
5
votes
0answers
189 views

Recursive conversion from ExpandoObject to Dictionary<string, object> #2

Because my original question was lacking many details, I have been advised to ask a new question. I will repeat the important parts of the original question and add examples etc to hopefully make it ...
5
votes
0answers
66 views

Elegant way to alter datasets with explicit filters

I would like to write a small helper to filter datasets. Each dataset is a dictionary and some filters I want to apply are common to all the datasets. That my needs, I wrote this following pattern: <...
5
votes
0answers
1k views

Decode HTML Entities in VBA using regex and dictionary

I receive HTML-encoded text that includes named and numbered entities, and I need the decoded HTML. There were just too many bad solutions for this online. I use regex pattern ...
4
votes
0answers
72 views

General Purpose C Dictionary

I'm trying to create a general purpose C dictionary (as an opaque data type) capable of dynamically allocating basic types (ints, floats, strings and longs) as well as accepting void pointers to ...
3
votes
1answer
65 views

identifying pairwise groups from dictionary

I have a dictionary that looks like this ...
3
votes
0answers
292 views

Alternative for VLOOKUP/Index-Match in VBA

I am sharing this function I wrote with the community to provide an alternative to slow VLOOKUP and/or Index-...
2
votes
0answers
46 views

List of lists from file

I'm writing a sub-routine in AppleScript to get text from a file and insert that text in a list of lists forming a dictionary. Text File: a:b c:d e:f Expected ...
1
vote
0answers
342 views

Filling values for nested dictionaries

I have a text file where any name followed with sequence word is considered a dictionary. The task is to go through the keys and values of a particular dictionary, which is already identified, and see ...
1
vote
0answers
66 views

A fast integer key map in Java via a van Emde Boas tree

Introduction The following data structure is a dictionary mapping primitive int values to any value type. Basically, under the hood it is a hash table, where a ...
1
vote
0answers
56 views

Calculating the number of matches for a tuple, a pair of nodes and a mapping

For a current node_pair, this program computes the number of variables matches it has. The matches for a node pair combined with a key are stored in a weight_dictionary with keys for each node pair. ...
1
vote
0answers
54 views

Generate user form fields based on a dictionary that may have nested dictionaries

This piece of code is doing what I need it to do but I'm still not happy with it. Here's the main logic to it: Iterating over a dictionary, I want to treat differently the one item that has the key '...
1
vote
0answers
2k views

Ordered-by-insertion map

The main problem that I tried to tackle here was trying not to have the erase method to be \$O(n)\$. I kept two data structures: a linked-list of pairs and a map of a key and a pair containing a value ...
1
vote
0answers
83 views

Implement “at” lens for Data.Map

I've been working on adding an operation like Data.Lens.At.at to Data.Map. This uses an extremely fast, extremely small, and ...
0
votes
0answers
84 views

Dictionary search: compare many values in a dictionary using keys

What I have: Mainly, a graph consists of 10000 nodes and around 500000 edges. I would like to construct a dictionary where keys are the edges and the value for each edge is an array consists of 0, ...