crazy behaviour of graphs hash_table



thanks!!

I understand now better what's going on, and actually using strings
seems to be a nice solution:

always cleaning the hash table creates some time overhead,
while strings are easily created by sconcat and back by
eval_string.

Oliver

On Tue, May 06, 2008 at 08:03:08AM +0200, Andrej Vodopivec wrote:
> 2008/5/6 Andrej Vodopivec <andrej.vodopivec at gmail.com>:
> > Hi Oliver,
> >
> >  the extra info in the lists loaded from a file is added when the lists
> >  are loaded. It is there for debugging reasons (Read the Debugging
> >  chapter in the manual).
> >
> >  Here is a simple function which removes the debugging info from simple
> >  expressions (put it in a lisp file)
> >  --------------------------------------------------
> >  (defun $clean_expr (expr)
> >   (cond ((atom expr) expr)
> >         ((member 'array (car expr) :test #'eq)
> >          `((,(caar expr) simp array) ,@(mapcar #'$clean_expr (cdr expr))))
> >         (t `((,(caar expr) simp) ,@(mapcar #'$clean_expr (cdr expr))))))
> >  --------------------------------------------------
> >  You will need to clean the expression right after loading it from a
> >  file. After that it looks on the lisp level just like you would enter
> >  it from the command line.
> 
> Maybe a better option is to change your expressions to strings before
> putting them into the hash table:
> 
>   ht:hash_table()
>   expr:[x^2+1,2]
>   set_hash(sconcat(expr), ht, 12)
> 
> 
> -- 
> Andrej