[Maxima] [Maxima-commits] CVS: maxima/share/contrib/graphs graph_core.lisp, 1.15, 1.16
O.Kullmann at swansea.ac.uk
Mon May 5 18:34:49 CDT 2008
Even Perl hashes arbitrary values.
In Maxima it should be simple:
Isn't every object a term? So just evaluate this term,
take it as a string, use a standard hash function for
strings, and use bucket hashing.
So do you say that in Maxima you don't have general hash-table
But the hash-table from the graphs-package works normally!
It is just that under certain circumstances, which I still
don't understand, it does this annotation business.
h : hash_table();
Looks all perfectly reasonable to me.
Only under certain circumstances, as this example in my
reply in the original thread shows, Maxima or CLisp (perhaps
the latter) starts distinguishing identical terms.
What is the effect of your change below (I don't know that alike1)?
Will it disable the mostly correct working of that graphs-hash-table
(and I have quite extensive tests running)??
On Mon, May 05, 2008 at 04:48:11PM -0400, Raymond Toy (RT/EUS) wrote:
> Andrej Vodopivec wrote:
> > Update of /cvsroot/maxima/maxima/share/contrib/graphs
> > In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv13769
> > Modified Files:
> > graph_core.lisp
> > Log Message:
> > Use alike1 instead of equal in user defined hash tables.
> > Index: graph_core.lisp
> > ===================================================================
> > RCS file: /cvsroot/maxima/maxima/share/contrib/graphs/graph_core.lisp,v
> > retrieving revision 1.15
> > retrieving revision 1.16
> > diff -u -d -r1.15 -r1.16
> > --- graph_core.lisp 25 Apr 2008 13:54:22 -0000 1.15
> > +++ graph_core.lisp 5 May 2008 20:38:42 -0000 1.16
> > @@ -2008,7 +2008,7 @@
> > ;;;;;;
> > (defun $hash_table ()
> > - (make-hash-table :test #'equal))
> > + (make-hash-table :test #'alike1))
> You can't use an arbitrary test in a Common Lisp hash table. Some lisps
> will allow you to define your own, but that's not portable.
> Maxima mailing list
> Maxima at math.utexas.edu
More information about the Maxima