Multiple "pointers" to "objects"

Nick Name nick.name@inwind.it
Sat, 12 Jul 2003 20:37:59 +0200


On Sat, 12 Jul 2003 07:47:02 -0700 (PDT)
Ron de Bruijn <rondebruijn@yahoo.com> wrote:

> 
>  It's ofcourse possible to put a list of Subjects that
>  a Teacher teaches in the data declaration of the
>  teacher. But then there is no way of saying
>  efficiently (O(1) Just a pointer or index):"Give me a
>  list of all teachers that give Physics", and that's
>  just what I need.

Are you sure that your data structure shouldn't be expressed by a graph?
In that case, there is a very recent thread (last post today) on
functional graph algorithms. I think that the difficulties you are
facing are from the fact that you are trying to express a purely
functional "updatable" graph.

V.