Graph coloring code for optical wavelength assignment problem

Hi,
I'd like someonte share with me code for graph coloring where the input is a network routing matrix and the output have to be the wavelength assignment.
Duano Silva

回答 (1 件)

Image Analyst
Image Analyst 2016 年 2 月 14 日

0 投票

Perhaps the hsv() function will help:
colormap(hsv(256))
colorbar

3 件のコメント

Duano Silva
Duano Silva 2016 年 2 月 14 日
編集済み: Walter Roberson 2016 年 2 月 14 日
My task is to find code where the input is a network routing matrix such as
M = {'0','1 4 2','1 4 5 3','1 4','1 4 5'; '1 4 2','0','2 3','2 4','2 4 5'; '1 4 5 3','2 3','3 5 4','3 5','0'; '1 4','2 4','3 5 4','0','4 5'; '1 4 5','2 4 5','3 5','4 5','0'}
First of all I have to transform the matrix in a array to transform the original graph in a new equivalent graph where the elements of the array (are the superior diagonal of the M matrix) corresponds to a equivalent graph node. To get the new graph, I have to compare each elements and its inverse of the array to other. The result must be one if the sequence or all element belong to another. For example comparing the element '1 5 6' in the array to '1 5' the result have to be one. Or comparing '1 5 6' to '6 5' the result is also one.
Walter Roberson
Walter Roberson 2016 年 2 月 14 日
No, if that was what you wanted to do then that would be a duplicate of your question http://uk.mathworks.com/matlabcentral/answers/267935-how-i-get-a-graph-coloring-from-a-routing-matrix. As we know you would not knowingly post the same question twice, you must have accidentally copied that question when you meant to ask something different here.
Image Analyst
Image Analyst 2016 年 2 月 14 日
I don't know much about graphs/networks. I was simply notifying you about a function that makes a nice list of colors in a rainbow spectrum. Use it as you see fit, if it helps you. I can't help beyond that, but, good luck.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeNetworks についてさらに検索

タグ

質問済み:

2016 年 2 月 14 日

コメント済み:

2016 年 2 月 14 日

Community Treasure Hunt

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

Start Hunting!

Translated by