Hey,
I'm experiencing some problems with breaking my code to reusable parts using templates and inheritance. I'd like to achieve that my tree class and avltree class use the same node class and that avltree class inherits some methods from the tree class and adds some specific ones. So I came up with the code below. Compiler throws an e...
Is it possible to send a structure as a datatype in Open MPI?
...
Imagine we need to pass a a number structured objects to the web application - for instance, locale, layout settings and a definition of some query. This can be easily done with JSON or XML similar to the following fragment:
<Locale>en</Locale>
<Layout>
<Block id="header">hide</Block>
<Block id="footer">hide</Block>
<Block...
To me they are both same and that is why i am wondering why we have dictionary data structure when we can do everything with arrays/list? What is so fancy in dictionaries?
...
I have a large number of user IDs (integers), potentially millions. These users all belong to various groups (sets of integers), such that there are on the order of 10 million groups.
To simplify my example and get to the essence of it, let's assume that all groups contain 20 user IDs.
I want to find all pairs of integer sets that hav...
Hi
I need to have objects sorted by price (decimal) value for fast access. I need to be able to find all objects with price more then A or less than B. I was thinkg about SortedList, but it does not provide a way to find ascending or descending enumerator starting from given key value (say give me all objects with price less than $120)....
Hi,
I was trying to understand the difference between early and late binding, and in the process realized that the concept of binding is nebulous to me. I think I understand that it relates to the way data-as-a-word-of-memory is linked to type-as-a-set-of-language-features but I am not sure those are the right concepts. Also, how does...
Here is my actual table schema (I'm using Mysql) :
Table experiment :
code(int)
sample_1_id
sample_2_id
... until ... sample_12_id
rna_1_id
rna_2_id
... until ... rna_12_id
experiment_start
How can I optimize both part : sample_n_id and rna_n_id (all are bigint(20) and allow null=true) ?
About values : we can have : ex :
sample_1_id ...
Hello. Suppose I have such chunk of a sentence:
(NP
(NP (DT A) (JJ single) (NN page))
(PP (IN in)
(NP (DT a) (NN wiki) (NN website))))
At a certain moment of time I have a reference to (JJ single) and I want to get the NP node binding A single page. If I get it right, that NP is the parent of the node, A and page a...
I'm relatively new to flash, and is confused about what I should use to store and retrieve key value pairs. After some googling I've found various map-like things to choose from:
1) Use a Object:
var map:Object = new Object();
map["key"] = "value";
The problem is that it seems to lack some very basic features. For example to even get...
There are different collections are used in Java like hashtable, hashset, vector, treeset, treemap and hashmap. How are they implemented internally? What are the actual datastructure used for these collection? And, What is order?
It would be good if we discuss just a little bit about implementation of collection.
Thanks,
-Abhishek
...
I was reading a Java article, but found no differences in the declaration and was confused over. Can anyone list me out this?
Added the Article
http://www.theparticle.com/javadata2.html
...
Im running through a set of DirectX tutorials online and I have the following structure:
struct CUSTOMVERTEX
{
FLOAT x, y, z, rhw; // from the D3DFVF_XYZRHW flag
DWORD color; // from the D3DFVF_DIFFUSE flag
}
My basic understanding of directX leads me to thing tha color is made up of 8-bit alpha, red, green and blue channels.
...
I recently came across some Java code that simply put some strings into a Java TreeSet, implemented a distance based comparator for it, and then made its merry way into the sunset to compute a given score to solve the given problem.
My questions,
Is there an equivalent data structure available for Python?
The Java treeset looks basi...
Hey everyone.
I have a problem with the rb-trees. according to wikipedia, rb-tree needs to follow the following:
A node is either red or black.
The root is black. (This rule is used in some definitions and not others. Since the root can always be changed from red to black but not necessarily vice-versa this rule has little effect on a...
Possible Duplicate:
Learning Algorithms and Data Structures Fundamentals
Hi,
I'm trying to practice my programming. What sort of projects would be helpful to try implimenting real life usage of various data structures?
Thanks,
SEC
...
I'm curious how to specify options to a jQuery plugin in a way that some are required, some are optionally overridden, and some can't be touched.
I started off with the usual:
jQuery.fn.plugin = function (options){
var defaults = { username: "", posts:10, api: "http://myapi.com" }
var settings = jQuery.extend({}, defaults, options...
given a large list of alphabetically sorted words in a file,I need to write a program that, given a word x, determines if x is in the list. Preprocessing is ok since I will be calling this function many times over different inputs.
priorties: 1. speed. 2. memory
I already know I can use (n is number of words, m is average length of the...
Oddly enough, MSDN has no information on the order preserving properties of data structures. So I've been making the assumption that:
Hashtable and Hashset do not preserve the insertion order (aka the "hash" in there is a giveaway)
Dictionary and List DO preserve the insertion order.
from this I extrapolate that if I have a Dictionar...
The question is, basically: what would be more preferable, both performance-wise and design-wise - to have a list of objects of a Python class or to have several lists of numerical properties?
I am writing some sort of a scientific simulation which involves a rather large system of interacting particles. For simplicity, let's say we hav...