필터 지우기
필터 지우기

How to rank nodes on a graph?

조회 수: 6 (최근 30일)
BENEDETTO PIETRO Casu
BENEDETTO PIETRO Casu 2021년 11월 11일
이동: Steven Lord 2023년 10월 11일
Hello everybody! I am a newbie in Matlab and I have tried my way with the forum, guides, articles, etc., but I am not able to find what (I think) I need. So here is it: I have an undirected graph and I would like to select and use only some of its node, based on their rank. For instance, I have to run on it an algorithm to check its conductance, thus I need only the nodes with a selected centrality. Furthermore, my adiacency matrix changes every time I run the code, because it is the result of another code (I cannot name the nodes once and for all, unfortunately). I tried working with G.nodes syntax but I am not really great at it.
Can somebody help me? Thank you in advance!
Cheers,
Ben

답변 (2개)

ag
ag 2023년 10월 11일
Hi Benedetto,
I understand that you need to assign ranks to the nodes present in your graph, and then use only those nodes which qualify the required ranking conditions.
To do so, you can use the “Custom attributes” functionality to add the attribute “ranks” to each node.
Please refer to the following documentation for more details:
https://www.mathworks.com/help/matlab/math/add-graph-node-names-edge-weights-and-other-attributes.html#AddGraphNodeNamesEdgeWeightsAndOtherAttributesExample-4
Hope this helps!
Best Regards,
Aryan Gupta

Christine Tobler
Christine Tobler 2023년 10월 11일
이동: Steven Lord 2023년 10월 11일
It depends what you mean by the rank of a node.
There are various centrality measures available through the centrality function on a graph. It seems sometimes the rank of a node is also measured in terms of its position in a search done on that graph, is this what you are looking for?

카테고리

Help CenterFile Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by