← Back to team overview

gephi.team team mailing list archive

[Question #169525]: Problems with graph.isAdjacent();

 

New question #169525 on Gephi:
https://answers.launchpad.net/gephi/+question/169525

Hi everyone,
i am writing a bachelor thesis on social network analysis and use gephi for visualizing. I am also trying to test new metrics by writing an own plugin. The plugin works fine, but when i use graph.isAdjacent() the plugin aborts without any failure but the rest of the code wont be executed.
When i use graph.getEdge(u, r) !=null instead the algorithm works fine:

The whole working codefragment is:

     for (int c1 = 0; c1 < N; c1++) 
            {
                Node u = indicies.get(c1);  
                centralities[c1]=graph.getDegree(u);
                
                for (int c2 = 0; c2 < N; c2++)
                    {
                    Node v = indicies.get(c2);       
                    
                    for(int c3=0; c3 < N; c3++)
                        {
                            Node r = indicies.get(c3);

                           if( graph.getEdge(u, r) !=null && graph.getEdge(v, r) !=null)
                            {     
                                d[c1][c2]+= 1;
                            }     
                            
                        }
                   
                   if(d[c1][c2]>= 1)
                        {
                            centralities[c1]+= gamma;
                        }
                    }
             }

Are there also any classes for getting shortest distance maps or so available, or do i have to program this for myself or taking it out of the shortestpath metrics?

I'm just a math student, so this stuff is very difficult for me :)


Cheers,

Lukas


-- 
You received this question notification because you are a member of
Gephi Team, which is an answer contact for Gephi.