Mauro,
Thanks for taking the time to respond. First, with regard to the existing
Dict in Julia, just to be sure I understand, the order of the keys is not
the order given by the '<' operation acting on the keys but is rather the
order in which they were inserted, is that correct?
With regard to the inner and outer constructor both needed, can you give me
a reference? I have read the manual section you mentioned; the constructor
for the Point example in the manual takes arguments and so it doesn't seem
to cover my case.
With regard to default key values, I'm still not getting it, so let me ask
the question in more detail. A data node in my structure looks like this:
immutable TreeLeaf{K,D}
k::K
d::D
parent::Int
end
To initialize a map, I need to create an Array{TreeLeaf{K,D},2). The two
initial entries are markers for the start and end of the data. The k and d
fields of these two nodes don't matter, but the parent values do matter.
So apparently I need something like this:
data = Array{TreeLeaf{K,D}, 2}
data[1] = TreeLeaf(undefinedK, undefinedD, 1)
data[2] = TreeLeaf(undefinedK, undefinedD, 1)
What should I put for 'undefinedK' and 'undefinedD' here? After seeing
your post, I tried this: u = Array{K,1}, and then I used u[1] for
undefinedK, but this gave an error ("access to undefined reference").
There are some other places in my code where I have a similar problem.
With regard to Kevin's work on a sorted dict, maybe I should wait for him
to finish? Is there an estimated completion time?
Thanks,
Steve Vavasis