[Lemon-devel] General map utilities

Alpár Jüttner alpar at cs.elte.hu
Sat Dec 22 15:35:25 CET 2007


Hi,

I ported the general map utilities (lemon/maps.h and dependencies) into
hg and somewhat revised its doc. You can find it in my repository:

http://lime.cs.elte.hu/~alpar/hgwebdir.cgi/lemon/rev/61bf7f22a6d6

(
you can get it either by cloning this version of my repo:

hg clone -r 61bf7f22a6d6
http://lime.cs.elte.hu/~alpar/hgwebdir.cgi/lemon

or by cloning the full repo then updating to this version:

hg clone http://lime.cs.elte.hu/~alpar/hgwebdir.cgi/lemon tmp-repo
cd tmp-repo
hg up  -r 61bf7f22a6d6
)

I found however, that there are a lot of special purpose tools
in /lemon/maps.h which are of very little use in general. For example
there are several classes which acts as a writable bool map and does
something special when a 'true' value is assigned to a key. These seems
to be a bit superfluous for me, not to mention their messy and
incomplete documentation.
My suggestion would be to replace all these classes with a single one
that is able to apply a
void f(const Key &k)
or
void f(const Key &k, bool val)
type functor for true/false or all assignments. What is your opinion?

There are other inconsistences and probably wrong namings in
lemon/maps.h, I marked them with a \todo doxygen command. Please comment
them.

All the best,
Alpar





More information about the Lemon-devel mailing list