[Lemon-user] How to order edges by weight?
Timothy Rice
t.rice at ms.unimelb.edu.au
Tue Jul 24 03:14:18 CEST 2012
Hello Lemon users,
I'm new to your list and this is my first email here. I'm currently doing
a PhD in bioinformatics at Melbourne University.
TLDR: Does Lemon offer a way to order a graph's nodes or edges by their
mapped values?
Longer:
I've been using Lemon as part of a small project. My goal was to write a
program that partitions a graph (given by its adjacency matrix in mtx
format) into its components (i.e. the maximal connected subgraphs). Thanks
to Lemon being very nice to work with, this was fairly easy.
Now I'd like to order the output. We haven't decided yet whether the order
should be by edge weight (a non-unique, positive, floating point value) or
node id (a unique, non-negative integer) or some combination of the two.
Either way, it isn't obvious whether Lemon will automate this for me.
Of course, I could write my own algorithm, eg using merge sort, but if a
pre-existing solution exists, I suspect it would be much better than
anything I could do by myself. Is there some easy way, maybe using some
kind of map, for obtaining such an order in Lemon? Part 7.4 of the Lemon
tutorial seems to imply the possibility, but it's not clear, and maybe I'm
misreading.
Thank you for considering my question.
Cheers,
Tim Rice, BSc. (Hons)
NICTA
Melbourne University
http://www.ms.unimelb.edu.au/~trice
More information about the Lemon-user
mailing list