How to assign a number between 0-1 determining the sate of each of the neighbours. (That is in principle, each node has a number(state) associated to it! So that when I call a node; it has the information of its neighbours and their corresponding states! something like a Multi-dimmensional array in C!
So that the final information is something like ; node 5 has 4 neighbours which are 1,2,3,4 each with a state 0.1,0.4,0.6,0.8. I will further use these states in my calculations, so preferably an array containing this information will work.
import networkx as nx
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
G = nx.barabasi_albert_graph(100,2)
for u in G.nodes():
neighbors = nx.neighbors(G, u)
print(neighbors)