The tag has no wiki summary.

learn more… | top users | synonyms

-4
votes
0answers
29 views

Printing a dictionary to a CSV file when some keys have more than one value [closed]

I have a CSV file, from which I am reading some fields (columns) into a dictionary (so that one column serves as a key and other as a value). To be more precise, I have keys in numerical format and ...
0
votes
1answer
85 views

What are the advantages of linear probing over separate chaining or vice-versa when implementing hash tables?

I've been brushing up on algorithms and reviewed these two methods of implementing hash tables. It seems like they largely have similar performance characteristics and memory requirements. I can ...
1
vote
1answer
447 views

Efficiency of C# dictionaries

C# dictionaries are a simple way to find if something exists etc etc. I have a question though on how they work. Let's say instead of a dictionary I use an ArrayList. Instead of using ContainsKey (or ...
4
votes
2answers
192 views

In Python, is there any difference (apart from a few listed exceptions) between classes and dictionaries?

My logic goes like this: def A(val): return {'a':val} print(A(7)['a']) is the same as class A: def __init__(self, val): self.a = val print(A(7).a) Obviously, there are problems ...
-3
votes
1answer
86 views

Understanding searching through dicts in python [closed]

I'm trying to understand the differences between dict, dict.items and dict.iteritems. I know that items returns a list of all the items, while iteritems returns an iterator, which for large lists can ...
0
votes
2answers
279 views

Critique the Structure of my Horse Racing Betting Platform

I am creating a program (mostly just for fun) that displays live prices for horse racing markets and the prices that several models predict they should be. I am very interested in the optimal way to ...
3
votes
2answers
4k views

Efficient solution for dictionary updates

Let's start with the problem: There is a large dictionary X that contains {key, value} pairs, i.e.: X = [{100, 10}, {101, 0}, {103, 0}, {106, 2}, {110, 1}] Every t seconds, X has to be updated ...
0
votes
3answers
243 views

Class or Dictionary

I want to create a immutable Scale class in C#. public sealed class Scale { string _Name; string _Description; SomeOrderedCollection _ScaleValueDefinitions; Unit _Unit // ...
0
votes
1answer
134 views

Algorithm for compression of a dictionary (words and definitions)

The theoretical situation is this: Let's say that we have a digital dictionary (by which I mean a traditional list of words and definitions, not an associative array). For the sake of simplicity, ...
0
votes
1answer
835 views

Fast lookup hash map implementations

I'm in the process of implementing a programming language on top of LLVM. For my polymorphic system, I'm looking for suggestions for a ultra-fast dictionary. I am not concerned with insert time, as ...
29
votes
4answers
22k views

Why store a function inside a python dictionary?

I'm a python beginner, and I just learned a technique involving dictionaries and functions. The syntax is easy and it seems like a trivial thing, but my python senses are tingling. Something tells me ...
3
votes
2answers
565 views

History of Associative Array?

In quite a lot of modern scripting languages (e.g. Perl, Python, Ruby, PHP, Lua, JavaScript), associative arrays are supported as a primitive or first-class data type (with various names like map, ...
5
votes
2answers
378 views

What is a good way to keep track of strings for dictionary lookups?

I am working through the Windows 8 app tutorial. They have some code about saving app data like so: private void NameInput_TextChanged(object sender, TextChangedEventArgs e) { ...
5
votes
5answers
13k views

Efficient methods for storing tens of millions of objects for querying, with a high number of inserts per second?

This is basically a logging/counting application that is counting the number of packets and counting the type of packet, etc. on a p2p chat network. This equates to about 4-6 million packets in a 5 ...
5
votes
2answers
511 views

What are the relative advantages of dictionaries versus databases?

I have an environment that supports both dictionaries (json style) and databases (not relational or anything, just formatted data by row and column). My application doesn't really need database ...
6
votes
3answers
9k views

Practical size limits of a Hashtable and Dictionary in c#

What are the practical limits for the number of items a C# 4 Dictionary or Hashtable can contain and the total number of bytes these structures can reasonable contain. I'll be working with large ...
3
votes
2answers
1k views

Should I use a Class or Dictionary to Store Form Values

I am working on a C# .NET Application, where I have a Form with lots of controls. I need to perform computations depending on the values of the controls. Therefore, I need to pass the Form values to a ...