On 10/22/22 12:53 AM, Kevin Bailey wrote:
Steven,
Just because you don't see the value doesn't mean I don't. You should
try to
be more helpful, or don't bother.
I just mean that I don't understand what iterating from a random
position in the AA is. Why not iterate from the beginning? It
ah, I knew that I could iterate over byKey, but I didn't know
that it was a
tangible thing, that you could hold in your hand. This should be
fine, and
I'll use your template trick for passing it to a function.
Thanks Paul and Ali!
On 10/22/22 08:21, Kevin Bailey wrote:
> his claim that there was no value.
I think he was questioning the need for iterating from a point forward
inside an unordered container. When the container is unordered, the
elements that are accessed after a found element could be anything. I
think
On Saturday, 22 October 2022 at 15:21:07 UTC, Kevin Bailey wrote:
OTOH, a forward iterator (i.e. copyable but does not need to
go backwards) solves the problem elegantly and efficiently.
The builtin function [`byKeyValue`][1] returns a forward range
(D's version of a forward iterator) over
Siarhei,
Thanks for this possibility. I didn't know D had "pointers" like
this.
Unfortunately, it appears that you can't pick up where you left
off with
that pointer? You have to re-scan forward?
bachmeier,
I didn't reply to Steven's question; I replied to his claim that
there
was no
On Friday, 21 October 2022 at 22:03:53 UTC, Kevin Bailey wrote:
I'm trying to do this equivalent C++:
unordered_map map;
for (auto i = map.find(something); i != map.end(); ++i)
...do something with i...
in D, but obviously with an associative array. It seems that
it's quite
On Saturday, 22 October 2022 at 04:53:09 UTC, Kevin Bailey wrote:
Steven,
Just because you don't see the value doesn't mean I don't. You
should try to
be more helpful, or don't bother.
Programs are written to do things that have value. Programming
languages are designed to support that
On Friday, 21 October 2022 at 22:03:53 UTC, Kevin Bailey wrote:
I'm trying to do this equivalent C++:
unordered_map map;
for (auto i = map.find(something); i != map.end(); ++i)
...do something with i...
in D, but obviously with an associative array. It seems that
it's quite
Hi Sergey,
While the unordered map doesn't guarantee an ordering (since its
contents are
hashed), the order should remain static if you don't insert or
delete.
Hi JG,
Thanks for the red-black tree reference. I'll read up on it in
case I need it
but I'd prefer to use the built-in O(1) hash
On 10/21/22 6:03 PM, Kevin Bailey wrote:
I'm trying to do this equivalent C++:
unordered_map map;
for (auto i = map.find(something); i != map.end(); ++i)
...do something with i...
in D, but obviously with an associative array. It seems that it's quite
easy to iterate
On 10/21/22 15:03, Kevin Bailey wrote:
I'm trying to do this equivalent C++:
unordered_map map;
for (auto i = map.find(something); i != map.end(); ++i)
...do something with i...
in D, but obviously with an associative array. It seems that it's quite
easy to iterate through
On Friday, 21 October 2022 at 22:03:53 UTC, Kevin Bailey wrote:
I'm trying to do this equivalent C++:
unordered_map map;
for (auto i = map.find(something); i != map.end(); ++i)
...do something with i...
in D, but obviously with an associative array. It seems that
it's quite
On Friday, 21 October 2022 at 22:03:53 UTC, Kevin Bailey wrote:
I'm trying to do this equivalent C++:
unordered_map map;
for (auto i = map.find(something); i != map.end(); ++i)
...do something with i...
in D, but obviously with an associative array. It seems that
it's quite
I'm trying to do this equivalent C++:
unordered_map map;
for (auto i = map.find(something); i != map.end(); ++i)
...do something with i...
in D, but obviously with an associative array. It seems that it's
quite
easy to iterate through the whole "map", but not start from the
14 matches
Mail list logo