
Laurent_R
Veteran
/ Moderator
Oct 3, 2012, 9:33 AM
Post #2 of 3
(2673 views)
|
Re: [zing] Finding subgraphs induced by a set of given vertices.
[In reply to]
|
Can't Post
|
|
Yes, and what are you trying to do exactly? Are you looking for all the triplets i your DATA section that are a subset of quadruplet (a, b, c, d)? Are your triplets commutative, i.e. is, for example, (a b c) the same thing as (c b a), (b a c), etc. If such is the case, you should probably look for some form of "canonical" form. For example, the nodes of a triplet (or any other set) should be presented in alphabetical order. In other words, the triplets in you data section should then be: a b c, a c d and b d e. This would make your searches far easier, I think. Then, you should probably take a look at the List::Util module, which is likely to contain most of the subroutines you might be looking for. Other modules of possible interest for you are Scalar::Util and List::MoreUtils.
|