Quantcast
Channel: NodeXL: Network Overview, Discovery and Exploration for Excel
Viewing all articles
Browse latest Browse all 4386

New Post: Apply Clauset-Newman-Moore algorithm to Clusters in a group

$
0
0
Hi,

I am trying to implement Clauset-Newman-Moore algorithm for my graph( node XL and .net)..
I have created 2 groups and added different vertices into it...
I could group it together... Expand as well collapse..
My requirement is to apply Clauset-Newman-Moore algorithm to Clusters the graph.. I am not able to do..

Can anybody show one example in dot.net

here is my clode snippet

GroupInfo Group1 = new GroupInfo();
            Group1.Name = "Group1";
            GroupInfo Group2 = new GroupInfo();
            Group2.Name = "Group2";
if (vertexMetaKeys.Contains("vertex.color"))
            {
                foreach (IVertex vertex in nodeXLControl1.Graph.Vertices)
                {
                    vertex.SetValue(ReservedMetadataKeys.PerColor, System.Drawing.Color.FromName((string)vertex.GetValue("vertex.color")));
                    vertex.SetValue(ReservedMetadataKeys.PerVertexToolTip, vertex.GetValue("name"));
                    if (vertex.GetValue("vertex.color").ToString() == "red")
                    {
                        vertex.SetValue(ReservedMetadataKeys.PerVertexShape, VertexShape.Sphere);
                        vertex.SetValue(ReservedMetadataKeys.PerColor, System.Drawing.Color.FromName("red"));
                        Group1.Vertices.AddFirst(vertex);
                        vertex.Tag = "Group1";

                    }
                    else
                    {
                        Group2.Vertices.AddFirst(vertex);
                       vertex.Tag = "Group2";
                                                }

                }
            }
nodeXLControl1.Graph.SetValue(ReservedMetadataKeys.GroupInfo, new GroupInfo[] { Group1, Group2 });

Viewing all articles
Browse latest Browse all 4386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>