first of all, thanks to all those who were kind enough to respond to
my edge-list question earlier...
Another question on the same vein... How can I extend this array to
become an array of linked lists? i.e.
+--+
| -----> edge 1 ---> edge 2 ...
+--+
| -----> edge 2.1 ---> edge 2.2 ...
+--+
Etc.. This would be an array of structure pointers in C, using malloc
to allocate space for each in a singly linked list from each array element.
Is this similar to a lisp vector? (BTW, can't seem to find Steele's book
*GASP* anywhere around... I assume it covers this sort of thing... I'll
grab it when I can find it!)
Thanks again..
Neal Ensor
·····@cs.utk.edu
In article <············@utkcs2.cs.utk.edu> ·····@cs.utk.edu (Neal Ensor) writes:
>Another question on the same vein... How can I extend this array to
>become an array of linked lists? i.e.
By default, Lisp arrays can contain objects of any type. Just use (setf
(aref <array> <index>) <object>) to set it. Unlike C, Lisp arrays don't
actually "contain" objects of any specific type, they just contain
references to objects, just like conses, variables, structure slots, etc.
>Is this similar to a lisp vector? (BTW, can't seem to find Steele's book
>*GASP* anywhere around... I assume it covers this sort of thing... I'll
>grab it when I can find it!)
CLtL is more of a references than a tutorial, so if you're having trouble
understanding this, it may not clear things up too much. Take a look at
some of the books mentioned in section 1-1 of the FAQ.
--
Barry Margolin
System Manager, Thinking Machines Corp.
······@think.com {uunet,harvard}!think!barmar