Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: How to compare two undirected graphs?

by sundialsvc4 (Abbot)
on Oct 18, 2010 at 14:16 UTC ( [id://865944]=note: print w/replies, xml ) Need Help??


in reply to How to compare two undirected graphs?

As others have said, you need to ponder what “shape” means to you.   Then, I suggest that you consider generating a simple list of (start_node, end_node) tuples.   Sort this list, thus placing the identical node-names conveniently next to one another, and count them.   Or, stuff the data into an SQLite database (file...) and let it do the dirty work for you.   (They are fast, they are “just files,” and yet you can query them.)

You might decide, for instance, that the “shape” of a node is defined by the number of nodes that connect to or from it.   You might calculate the “depth” of each node and then count the number of connections at the same depth.   Or, whatever you decide is right for you.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://865944]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-03-28 14:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found