Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re^2: Finding connected components in a graph.

by zing (Beadle)
on Oct 03, 2012 at 15:50 UTC ( #997081=note: print w/replies, xml ) Need Help??

in reply to Re: Finding connected components in a graph.
in thread Finding connected components in a graph.

Hi guys, I have this code which takes in input in the form of triplets of vertices(see DATA)
use strict; use warnings; use Data::Dumper; my @S; while (<DATA>) { push @S, [split]; } print "-----TRIPLETS-------\n"; print Dumper \@S; __DATA__ b c a a c d d e b
What Im stuck with is this :: Suppose I have these points=(a,b,c,d); Then I want to find the set of triplets induced by these 4 vertices. For example for above four points the induced triplets should be:
b c a a c d
Whereas for vertices=(d,e,a) there isn't any triplet in the data.

Similarly for vertices=(b,e,d) there is a triplet (d e b) in the data(the last one).

Replies are listed 'Best First'.
Re^3: Finding connected components in a graph.
by choroba (Bishop) on Oct 03, 2012 at 15:56 UTC
    This is barely related to the post you replied to. Please, if you have a new question, start a new thread. It can bring you more attention.
    لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
      Thanks for the suggestion choroba.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://997081]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (10)
As of 2018-06-22 18:00 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (124 votes). Check out past polls.