[jgrapht-users] Re : Cycles in graph
Brought to you by:
barak_naveh,
perfecthash
From: aravindh r. <coo...@gm...> - 2011-07-13 07:14:59
|
Hello I am having a Graph That contain cycle Let the graph be simple like a->b->c->d->e b<-m<-d i.e, b->c->d->m->b is a cycle... I detected that using CycleDetector and made is as a SubGraph(SG).. Now when I try to manipulate the graph again,Its showing only edges as [(a,b), (m,b), (b,c), (c,d), (d,e), (d,m)] I want to make it as [(a,SG),(SG,e)]...So that SG becomes like a node of the graph.. pls let me know if it possible with JGraphT..? Also When there are more than one loop I want each of then to be a subGraph.To my knowledge Cycle detector finds all the cycles as a single list which is difficult to make two subgraphs.. For example, a->b->c->d->e->f->g b<-m<-d e<-f The cycles are b->c->d->m->b and e->f->e The edges Cycle Detector detects is [{m,b}, {b,c}, {c,d}, {d,e}, {d,m}, {f,e}, {e,f}] But i want it as [{m,b}, {b,c}, {c,d}, {d,e}, {d,m}] [{f,e}, {e,f}] So that I can make two subgraphs SG1 and SG2 there by making the graph a->SG1->SG2->g... Pls help me by providing a solution to it.. Regards Aravindh R Research Intern TIFR,Mumbai |