calculation of the node degree

Asked by Andrea

Hi, I have a weighted graph, and using MatlabBGL I can not calcolate the node strenght (or node weight or node weighted connectivity), the natural generalization of the degree ki of a node i. The strengths integrate the information on the number (degree) and the weights of links incident in a node.

Thank you for your consideration, I look forward to hearing from you.

Kind regards

Andrea Costamagna

Question information

English Edit question
Matlab BGL Edit question
No assignee Edit question
Solved by:
David Gleich
Last query:
Last reply:
Revision history for this message
Best David Gleich (dgleich) said :

Just use the row-sums of the matrix. These are the degrees.

d = sum(A,2)

Revision history for this message
Andrea (andreacosta88) said :

Thanks David Gleich, that solved my question.