public void CGVertexHandler(object sender, CondensationGraphVertexEventArgs arg) { IVertex vCG = arg.CondensationGraphVertex; Console.WriteLine("Added CG vertex <{0}> with connected component vertices -", vCG.ID); foreach (IVertex v in arg.StronglyConnectedVertices) { ((MyVertex)vCG).Name += (v is MyVertex)? ((MyVertex)v).Name + " " : v.ID.ToString() + " "; Console.Write("{0} ", (v is MyVertex)?((MyVertex)v).Name : v.ID.ToString()); } Console.WriteLine(); }
public void CGVertexHandler(object sender, CondensationGraphVertexEventArgs arg) { CondensedVertex cgv = arg.CondensationGraphVertex as CondensedVertex; cgv.IsSCC = true; foreach (TypeVertex tv in arg.StronglyConnectedVertices) { if (tv.ImutableExternalType) { cgv.ImutableExternalType = true; } } cgv.Condense(arg.StronglyConnectedVertices); }