On Mon, May 5, 2008 at 12:51 PM, Oliver Kullmann
<O.Kullmann at swansea.ac.uk> wrote:
> I'm using the hash-table from graph_core.lisp in the graphs-package....
> Now the above bug is explained: Entering a plain list [1,1] into the hash-table
> is not good enough, since it doesn't match with the original [1,1] which has
> these annotations....
This is an elementary problem. When comparing two Maxima values for
structural equality, all annotations in the cdar of the expression and
its subexpressions should be ignored. The "equal" operator is alike1:
:lisp (alike1 '((mplus Napoleon) 2 a) '((mplus Wellington) 2 a)) => T
Obviously if you hash the whole list structure including
Napoleon/Wellington, you will get incorrect results.
>From your email, it sounds as though you're reusing the internals of
the graph package, not the Maxima interface to the graph package. Is
that correct? Perhaps the internals aren't designed for your
application? Can you reproduce the problem using only the externally
defined Maxima interfaces to the graph package? If so, it would be
very useful to communicate the exact scenario to the list.
> Is this behaviour common with Maxima??
Not sure what you mean by "this behavior". Do you mean, "should I
expect there to be bugs"? Yes, as with any software package. Note,
too, that the graph package is part of the "contrib" directory, i.e.
is not really part of Maxima itself, but is a contribution from a
member of the community.
-s