Re: graph ADT
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: graph ADT

From: <Andreas.Burman@gmail.com>
Date: Thu Apr 06 2006 - 15:59:08 CEST

Evertjan. skrev:

> Andreas.Burman@gmail.com wrote on 06 apr 2006 in comp.lang.javascript:

> > I'm writing an extension to firefox where I want to grade all links on
> > the pages the user visits and then store this information in a weighted
> > graph (grade as edges, uri as nodes), to make it possible to find the
> > "best" link on the page or calculate the median grade of the path
> > between to pages the user has visited, etc.
>
> Clientside drawing of graphs is possible,
> but should be carfully cross-browser designed.
>
> An IE example of mine from 2003:
>
> <http://devrijehuisarts.org/test/jsgraph.asp>
>

I dont want to draw graphs just store data in them i.e the
datastructure graph and then be able to traverse it depending on the
values of the edges.

> >
> > What I want to know is how to implement the graph datastructure in
> > javascript in the most efficient way (performance wise and to some
> > extent also memory wise). I was thinking on using an adjacency matrix
> > but it would probably be to sparse since most urls on the web are not
> > connected to each other, and I wonder if someone had an better idea.
>
> 'Graph datastructures' and 'adjacency matrices', do you need such beasts?

Not sure there may be some better way to implement it. It's just that a
graph seemed like the natural choice since the internet already is a
graph.

> --
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)
Received on Mon May 1 04:45:30 2006