swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inconsistency in Map/KeyedCollection?


From: glen e. p. ropella
Subject: Re: Inconsistency in Map/KeyedCollection?
Date: Fri, 14 Jan 2000 14:09:29 -0800

At 11:36 PM 1/13/00 -0700, you wrote:
If my understanding is correct this this text is misleading
and should be taken out, since none of the collections that
implement the KeyedCollection protocol actually creates a
collection for duplicate members.

The 'collection of duplicate members' feature would of
course be useful, but can be implemented fairly easily by
the user.

Right.  It should be in a design document and the docs shouldn't
be ambiguous about what's implemented and what's not implemented
even if we left the stubs in.

I've thus turned to creating a string from the double and
implementing this compare: method:

Replacing the compare method is the right thing to do.
I would have designed a compare method to work with
doubles, myself.  Or, I might have used Double Objects
instead of native doubles.

PS. Marcus has been advocating the use of Java collections
instead of Swarm collections. How do Java Maps fare on this
front?

Standard Java.util.Map doesn't allow 1-to-many mappings,
either.  For that reason (and a few other aesthetic ones)
I use JGL from ObjectSpace.  The problem you run into there
is that it screws up the Activity API, because it won't
accept JGL collections.  So, unfortunately, I've ended up
using JGL's algorithms for much of my bag operators in my
Java models, rather than relying on the forEach methods
in Activity.

But, overall, the JGL is, to me, an adequate implementation of
collections, whereas Swarm's collections isn't.

And while I'm on the integrationist's soapbox, I'll mention the
JNL (Java Numerics Library) from Visual Numerics (the publishers
of IMSL and PV-Wave/JWave).  That's a pleasant little math library
for Java.  I can actually do Cholesky decomposition without
being distracted with thoughts about creating or interfacing to
a more obscure implementation.

glen
refs:
http://www.objectspace.com
http://www.vni.com

--
glen e. p. ropella =><= Feeding the hamster wheel.  Hail Eris!
Home: http://www.swarm.com/gepr                (505) 424-0448
Work: http://www.swarm.com                      (505) 995-0818

                 ==================================
  Swarm-Support is for discussion of the technical details of the day
  to day usage of Swarm.  For list administration needs (esp.
  [un]subscribing), please send a message to <address@hidden>
  with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]