calculation of the node degree

Asked by Andrea on 2012-11-04

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

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

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

d = sum(A,2)

Revision history for this message
Andrea (andreacosta88) said :
#2

Thanks David Gleich, that solved my question.